Class CmsSmallElementsHandler
java.lang.Object
org.opencms.ade.containerpage.client.ui.CmsSmallElementsHandler
This class is responsible for managing the visibility of edit points on small elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe height necessary for a container page element.static StringThe height necessary for a container page element CSS rule. -
Constructor Summary
ConstructorsConstructorDescriptionCmsSmallElementsHandler(org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageServiceAsync service) Creates a new small elements handler. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if currently small elements are editable.booleanReturns true if any small elements are present.protected voidinternalSetEditSmallElements(boolean editable) Sets the mode for displaying small elements.static booleanisSmall(com.google.gwt.user.client.ui.Widget widget) Checks if a given widget counts as 'small'.voidprepareSmallElement(com.google.gwt.user.client.ui.Widget widget) Prepares a small element.voidsetEditSmallElements(boolean editable, boolean save) Enables or disables editing for small elements and optionally saves the setting.
-
Field Details
-
NECESSARY_HEIGHT
The height necessary for a container page element. -
NECESSARY_HEIGHT_RULE
The height necessary for a container page element CSS rule.
-
-
Constructor Details
-
Method Details
-
isSmall
Checks if a given widget counts as 'small'.- Parameters:
widget- the widget to check- Returns:
- true if the widget is small
-
areSmallElementsEditable
Returns true if currently small elements are editable.- Returns:
- true if small elements are editable
-
hasSmallElements
Returns true if any small elements are present.- Returns:
- true if any small elements are present
-
prepareSmallElement
Prepares a small element.- Parameters:
widget- the small element
-
setEditSmallElements
Enables or disables editing for small elements and optionally saves the setting.- Parameters:
editable- if true, enables editing for small elementssave- true if the setting should be saved
-
internalSetEditSmallElements
Sets the mode for displaying small elements.- Parameters:
editable- if true, small elements will be enlarged and their edit buttons shown; if false, the edit buttons will be hidden
-