Package org.opencms.acacia.client.ui
Class CmsValuePanel
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.google.gwt.user.client.ui.FlowPanel
-
- org.opencms.acacia.client.ui.CmsValuePanel
-
- 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.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.InsertPanel
,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,java.lang.Iterable<com.google.gwt.user.client.ui.Widget>
,I_CmsDropTarget
,I_CmsHasResizeOnShow
public class CmsValuePanel extends com.google.gwt.user.client.ui.FlowPanel implements I_CmsDropTarget, I_CmsHasResizeOnShow
The attribute values panel.
-
-
Nested Class Summary
-
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
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.dom.client.Element
m_placeholder
The current place holder.protected int
m_placeholderIndex
The placeholder position index.
-
Constructor Summary
Constructors Constructor Description CmsValuePanel()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkPosition(int x, int y, CmsDNDHandler.Orientation orientation)
Returns true if the given cursor position is over the drop target.int
getPlaceholderIndex()
Returns the index of the placeholder or -1 if no placeholder is attached.void
highlightOutline()
Highlights the outline of this panel.void
insertPlaceholder(com.google.gwt.dom.client.Element placeholder, int x, int y, CmsDNDHandler.Orientation orientation)
Inserts a new placeholder.void
onDrop(I_CmsDraggable draggable)
Executed on drop.void
removeHighlighting()
Removes the highlighting border.void
removePlaceholder()
Removes the placeholder.void
repositionPlaceholder(int x, int y, CmsDNDHandler.Orientation orientation)
Repositions the placeholder.void
resizeOnShow()
Adjusts widget's size once it's visible.void
updateHighlightingPosition()
Updates the highlighting position if present.-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opencms.gwt.client.dnd.I_CmsDropTarget
getElement
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
-
-
-
Field Detail
-
m_placeholder
protected com.google.gwt.dom.client.Element m_placeholder
The current place holder.
-
m_placeholderIndex
protected int m_placeholderIndex
The placeholder position index.
-
-
Constructor Detail
-
CmsValuePanel
public CmsValuePanel()
Constructor.
-
-
Method Detail
-
checkPosition
public boolean checkPosition(int x, int y, CmsDNDHandler.Orientation orientation)
Description copied from interface:I_CmsDropTarget
Returns true if the given cursor position is over the drop target.- Specified by:
checkPosition
in interfaceI_CmsDropTarget
- Parameters:
x
- the cursor client x positiony
- the cursor client y positionorientation
- the drag and drop orientation- Returns:
true
if the given cursor position is over the drop target- See Also:
I_CmsDropTarget.checkPosition(int, int, org.opencms.gwt.client.dnd.CmsDNDHandler.Orientation)
-
getPlaceholderIndex
public int getPlaceholderIndex()
Description copied from interface:I_CmsDropTarget
Returns the index of the placeholder or -1 if no placeholder is attached.- Specified by:
getPlaceholderIndex
in interfaceI_CmsDropTarget
- Returns:
- the index
- See Also:
I_CmsDropTarget.getPlaceholderIndex()
-
highlightOutline
public void highlightOutline()
Highlights the outline of this panel.
-
insertPlaceholder
public void insertPlaceholder(com.google.gwt.dom.client.Element placeholder, int x, int y, CmsDNDHandler.Orientation orientation)
Description copied from interface:I_CmsDropTarget
Inserts a new placeholder.- Specified by:
insertPlaceholder
in interfaceI_CmsDropTarget
- Parameters:
placeholder
- the placeholder elementx
- the cursor client x positiony
- the cursor client y positionorientation
- the drag and drop orientation- See Also:
I_CmsDropTarget.insertPlaceholder(com.google.gwt.dom.client.Element, int, int, org.opencms.gwt.client.dnd.CmsDNDHandler.Orientation)
-
onDrop
public void onDrop(I_CmsDraggable draggable)
Description copied from interface:I_CmsDropTarget
Executed on drop.- Specified by:
onDrop
in interfaceI_CmsDropTarget
- Parameters:
draggable
- the draggable being dropped- See Also:
I_CmsDropTarget.onDrop(org.opencms.gwt.client.dnd.I_CmsDraggable)
-
removeHighlighting
public void removeHighlighting()
Removes the highlighting border.
-
removePlaceholder
public void removePlaceholder()
Description copied from interface:I_CmsDropTarget
Removes the placeholder.- Specified by:
removePlaceholder
in interfaceI_CmsDropTarget
- See Also:
I_CmsDropTarget.removePlaceholder()
-
repositionPlaceholder
public void repositionPlaceholder(int x, int y, CmsDNDHandler.Orientation orientation)
Description copied from interface:I_CmsDropTarget
Repositions the placeholder.- Specified by:
repositionPlaceholder
in interfaceI_CmsDropTarget
- Parameters:
x
- the cursor client x positiony
- the cursor client y positionorientation
- the drag and drop orientation- See Also:
I_CmsDropTarget.repositionPlaceholder(int, int, org.opencms.gwt.client.dnd.CmsDNDHandler.Orientation)
-
resizeOnShow
public void resizeOnShow()
Description copied from interface:I_CmsHasResizeOnShow
Adjusts widget's size once it's visible.- Specified by:
resizeOnShow
in interfaceI_CmsHasResizeOnShow
- See Also:
I_CmsHasResizeOnShow.resizeOnShow()
-
updateHighlightingPosition
public void updateHighlightingPosition()
Updates the highlighting position if present.
-
-