public class CmsResourceIcon extends com.vaadin.v7.ui.Label
Important: To avoid issues with click event propagation within tables, we are required to extent the Label component.
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsResourceIcon.IconMode
Enum used to control icon display style.
|
com.vaadin.v7.ui.Label.ValueChangeEventcom.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewercom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listenercom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ICON_CLASS_CHANGED
The changed icon class.
|
static java.lang.String |
ICON_CLASS_LOCK_OTHER
The other user lock icon class.
|
static java.lang.String |
ICON_CLASS_LOCK_OWN
The own user lock icon class.
|
static java.lang.String |
ICON_CLASS_LOCK_PUBLISH
The publish lock icon class.
|
static java.lang.String |
ICON_CLASS_LOCK_SHARED
The shared lock icon class.
|
static java.lang.String |
ICON_CLASS_SIBLING
The sibling icon class.
|
| Constructor and Description |
|---|
CmsResourceIcon()
Constuctor.
|
CmsResourceIcon(CmsResourceUtil resUtil,
CmsResourceState state,
boolean showLocks)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDefaultFileOrDetailType(CmsObject cms,
CmsResource resource)
Returns the default file type or detail type for the given resource.
|
static java.lang.String |
getDetailType(CmsObject cms,
CmsResource detailPage,
CmsResource parentFolder)
Returns the detail content type for container pages that may be detail pages.
|
static java.lang.String |
getIconHTML(CmsResourceUtil resUtil,
CmsResourceState state,
boolean showLocks)
Returns the icon HTML.
|
static com.vaadin.server.Resource |
getSitemapResourceIcon(CmsObject cms,
CmsResource resource,
CmsResourceIcon.IconMode iconMode)
Gets the resource icon for a resource for use in a CmsResourceInfo widget when used in a sitemap context.
|
static java.lang.String |
getTreeCaptionHTML(java.lang.String resourceName,
CmsResourceUtil resUtil,
CmsResourceState state,
boolean showLocks)
Returns the tree caption HTML including the resource icon.
|
void |
initContent(CmsResourceUtil resUtil,
CmsResourceState state,
boolean showLocks,
boolean showDetailIcon)
Initializes the content.
|
void |
initContent(CmsResourceUtil resUtil,
com.vaadin.server.Resource iconResource,
CmsResourceState state,
boolean showLocks,
boolean showDetailIcon)
Initializes the content.
|
addListener, addValueChangeListener, attach, compareTo, fireValueChange, getContentMode, getConverter, getCustomAttributes, getPropertyDataSource, getState, getState, getType, getValue, readDesign, removeListener, removeValueChangeListener, setContentMode, setConverter, setLocale, setPropertyDataSource, setValue, valueChange, writeDesignbeforeClientResponse, getExplicitImmediateValue, isImmediate, isReadOnly, setImmediate, setReadOnlyaddContextClickListener, addListener, addShortcutListener, addStyleName, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddStyleNames, getUI, removeStyleNames, setStyleNameaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerpublic static final java.lang.String ICON_CLASS_CHANGED
public static final java.lang.String ICON_CLASS_LOCK_OTHER
public static final java.lang.String ICON_CLASS_LOCK_OWN
public static final java.lang.String ICON_CLASS_LOCK_PUBLISH
public static final java.lang.String ICON_CLASS_LOCK_SHARED
public static final java.lang.String ICON_CLASS_SIBLING
public CmsResourceIcon()
To be used in declarative layouts. Make sure to call initContent later on.
public CmsResourceIcon(CmsResourceUtil resUtil, CmsResourceState state, boolean showLocks)
resUtil - the resource utilstate - the resource stateshowLocks - true to show the resource lockspublic static java.lang.String getDefaultFileOrDetailType(CmsObject cms, CmsResource resource)
cms - the cms contextresource - the container page resourcepublic static java.lang.String getDetailType(CmsObject cms, CmsResource detailPage, CmsResource parentFolder)
cms - the cms contextdetailPage - the container page resourceparentFolder - the parent folder or nullpublic static java.lang.String getIconHTML(CmsResourceUtil resUtil, CmsResourceState state, boolean showLocks)
resUtil - the resource util for the resourcestate - the resource stateshowLocks - true to show lock state overlaypublic static com.vaadin.server.Resource getSitemapResourceIcon(CmsObject cms, CmsResource resource, CmsResourceIcon.IconMode iconMode)
cms - the CMS contextresource - a resourceiconMode - the icon modepublic static java.lang.String getTreeCaptionHTML(java.lang.String resourceName, CmsResourceUtil resUtil, CmsResourceState state, boolean showLocks)
resourceName - the resource name to displayresUtil - the resource util for the resourcestate - the resource stateshowLocks - true to show lock state overlaypublic void initContent(CmsResourceUtil resUtil, CmsResourceState state, boolean showLocks, boolean showDetailIcon)
resUtil - the resource utilstate - the resource stateshowLocks - true to show the resource locksshowDetailIcon - true to show the detail icon overlaypublic void initContent(CmsResourceUtil resUtil, com.vaadin.server.Resource iconResource, CmsResourceState state, boolean showLocks, boolean showDetailIcon)
resUtil - the resource utiliconResource - the icon pathstate - the resource stateshowLocks - true to show the resource locksshowDetailIcon - true to show the detail icon overlay