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
Modifier and TypeFieldDescriptionstatic int
The height necessary for a container page element.static String
The height necessary for a container page element CSS rule. -
Constructor Summary
ConstructorDescriptionCmsSmallElementsHandler
(org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageServiceAsync service) Creates a new small elements handler. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if currently small elements are editable.boolean
Returns true if any small elements are present.protected void
internalSetEditSmallElements
(boolean editable) Sets the mode for displaying small elements.static boolean
isSmall
(com.google.gwt.user.client.ui.Widget widget) Checks if a given widget counts as 'small'.void
prepareSmallElement
(com.google.gwt.user.client.ui.Widget widget) Prepares a small element.void
setEditSmallElements
(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
-