Package org.opencms.acacia.client.ui
Class CmsInlineEntityWidget
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.acacia.client.ui.CmsInlineEntityWidget
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsRenderable,com.google.gwt.user.client.ui.IsWidget
Widget allowing form based editing for parts of a content to enhance the in-line editing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classFlow panel with handling descendant resizes to reposition pop-up.protected classTimer to update the HTML.Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CmsAttributeChoiceWidgetThe add button.protected CmsAttributeChoiceWidgetThe attribute choice button.protected CmsPushButtonThe down button.protected CmsPushButtonThe injected button.protected CmsPushButtonThe remove button.protected CmsPushButtonThe up button.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsInlineEntityWidgetcreateWidgetForEntity(com.google.gwt.dom.client.Element element, I_CmsInlineFormParent formParent, org.opencms.acacia.shared.CmsEntity parentEntity, CmsAttributeHandler attributeHandler, int attributeIndex, I_CmsInlineHtmlUpdateHandler htmlUpdateHandler, I_CmsWidgetService widgetService) Creates the inline edit widget and injects it next to the context element.intReturns the attribute value index.protected voidPositions the widget button above the reference element.voidsetContentHighlightingVisible(boolean visible) Sets the visibility of the reference element highlighting border.voidupdateButtonVisibility(boolean hasEditButton, boolean hasAddButton, boolean hasRemoveButton, boolean hasSortButtons) Updates the visibility of the add, remove, up and down buttons.Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Field Details
-
m_addButton
The add button. -
m_attributeChoice
The attribute choice button. -
m_downButton
The down button. -
m_editButton
The injected button. -
m_removeButton
The remove button. -
m_upButton
The up button.
-
-
Method Details
-
getAttributeIndex
Returns the attribute value index.- Returns:
- the attribute value index
-
setContentHighlightingVisible
Sets the visibility of the reference element highlighting border.- Parameters:
visible-trueto show the highlighting
-
updateButtonVisibility
public void updateButtonVisibility(boolean hasEditButton, boolean hasAddButton, boolean hasRemoveButton, boolean hasSortButtons) Updates the visibility of the add, remove, up and down buttons.- Parameters:
hasEditButton-trueif the edit button should be visiblehasAddButton-trueif the add button should be visiblehasRemoveButton-trueif the remove button should be visiblehasSortButtons-trueif the sort buttons should be visible
-
positionWidget
Positions the widget button above the reference element.