Package org.opencms.gwt.client.ui
Class CmsAreaSelectPanel
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.gwt.client.ui.CmsAreaSelectPanel
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasClickHandlers
,com.google.gwt.event.dom.client.HasMouseDownHandlers
,com.google.gwt.event.dom.client.HasMouseMoveHandlers
,com.google.gwt.event.dom.client.HasMouseUpHandlers
,com.google.gwt.event.dom.client.MouseDownHandler
,com.google.gwt.event.dom.client.MouseMoveHandler
,com.google.gwt.event.dom.client.MouseUpHandler
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasValueChangeHandlers<CmsPositionBean>
,com.google.gwt.event.shared.EventHandler
,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.IndexedPanel
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
,Iterable<com.google.gwt.user.client.ui.Widget>
public class CmsAreaSelectPanel
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.event.logical.shared.HasValueChangeHandlers<CmsPositionBean>, com.google.gwt.event.dom.client.HasMouseDownHandlers, com.google.gwt.event.dom.client.HasMouseUpHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasMouseMoveHandlers, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.MouseMoveHandler
Select area widget. Allows the user to select an area inside the widget.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
The ui-binder interface.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
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.dom.client.Element
The marker.protected com.google.gwt.dom.client.Element
Select overlay.protected com.google.gwt.dom.client.Element
Select overlay.protected com.google.gwt.dom.client.Element
Select overlay.protected com.google.gwt.dom.client.Element
Select overlay.protected com.google.gwt.user.client.ui.FlowPanel
The panel holding added widgets.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(com.google.gwt.user.client.ui.Widget w) com.google.gwt.event.shared.HandlerRegistration
addClickHandler
(com.google.gwt.event.dom.client.ClickHandler handler) com.google.gwt.event.shared.HandlerRegistration
addMouseDownHandler
(com.google.gwt.event.dom.client.MouseDownHandler handler) com.google.gwt.event.shared.HandlerRegistration
addMouseMoveHandler
(com.google.gwt.event.dom.client.MouseMoveHandler handler) com.google.gwt.event.shared.HandlerRegistration
addMouseUpHandler
(com.google.gwt.event.dom.client.MouseUpHandler handler) com.google.gwt.event.shared.HandlerRegistration
addValueChangeHandler
(com.google.gwt.event.logical.shared.ValueChangeHandler<CmsPositionBean> handler) void
clear()
void
Removes the current selection.getAreaPosition
(boolean relative) Returns the position of the selected area, ornull
if nothing is selected.com.google.gwt.user.client.ui.Widget
getWidget
(int index) int
int
getWidgetIndex
(com.google.gwt.user.client.ui.Widget child) boolean
Returns if the value change event will always be fired, or only when a select/resize/move operation is finished.Iterator<com.google.gwt.user.client.ui.Widget>
iterator()
void
onMouseDown
(com.google.gwt.event.dom.client.MouseDownEvent event) void
onMouseMove
(com.google.gwt.event.dom.client.MouseMoveEvent event) void
onMouseUp
(com.google.gwt.event.dom.client.MouseUpEvent event) boolean
remove
(int index) boolean
remove
(com.google.gwt.user.client.ui.Widget w) void
Resets the select area ratio.void
setAreaPosition
(boolean relative, CmsPositionBean pos) Sets the selection area.void
setFireAll
(boolean isFireAll) Sets if the value change event will always be fired, or only when a select/resize/move operation is finished.void
setRatio
(double heightToWidth) Sets a fixed selection ratio.Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
Methods 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, 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, 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 com.google.gwt.event.shared.HasHandlers
fireEvent
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
m_marker
The marker. -
m_overlayBottom
Select overlay. -
m_overlayLeft
Select overlay. -
m_overlayRight
Select overlay. -
m_overlayTop
Select overlay. -
m_panel
The panel holding added widgets.
-
-
Constructor Details
-
CmsAreaSelectPanel
public CmsAreaSelectPanel()Constructor.
-
-
Method Details
-
add
- Specified by:
add
in interfacecom.google.gwt.user.client.ui.HasWidgets
- See Also:
-
HasWidgets.add(com.google.gwt.user.client.ui.Widget)
-
addClickHandler
public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler) - Specified by:
addClickHandler
in interfacecom.google.gwt.event.dom.client.HasClickHandlers
- See Also:
-
HasClickHandlers.addClickHandler(com.google.gwt.event.dom.client.ClickHandler)
-
addMouseDownHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler handler) - Specified by:
addMouseDownHandler
in interfacecom.google.gwt.event.dom.client.HasMouseDownHandlers
- See Also:
-
HasMouseDownHandlers.addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler)
-
addMouseMoveHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler handler) - Specified by:
addMouseMoveHandler
in interfacecom.google.gwt.event.dom.client.HasMouseMoveHandlers
- See Also:
-
HasMouseMoveHandlers.addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler)
-
addMouseUpHandler
public com.google.gwt.event.shared.HandlerRegistration addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler handler) - Specified by:
addMouseUpHandler
in interfacecom.google.gwt.event.dom.client.HasMouseUpHandlers
- See Also:
-
HasMouseUpHandlers.addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler)
-
clear
- Specified by:
clear
in interfacecom.google.gwt.user.client.ui.HasWidgets
- See Also:
-
HasWidgets.clear()
-
clearSelection
Removes the current selection. -
getAreaPosition
Returns the position of the selected area, ornull
if nothing is selected.- Parameters:
relative
- iftrue
the relative position is returned, otherwise the absolute position- Returns:
- the position of the selected area
-
getWidget
- Specified by:
getWidget
in interfacecom.google.gwt.user.client.ui.IndexedPanel
- See Also:
-
IndexedPanel.getWidget(int)
-
getWidgetCount
- Specified by:
getWidgetCount
in interfacecom.google.gwt.user.client.ui.IndexedPanel
- See Also:
-
IndexedPanel.getWidgetCount()
-
getWidgetIndex
- Specified by:
getWidgetIndex
in interfacecom.google.gwt.user.client.ui.IndexedPanel
- See Also:
-
IndexedPanel.getWidgetIndex(com.google.gwt.user.client.ui.Widget)
-
isFireAll
Returns if the value change event will always be fired, or only when a select/resize/move operation is finished.- Returns:
true
if the value change event will always be fired
-
iterator
-
onMouseDown
- Specified by:
onMouseDown
in interfacecom.google.gwt.event.dom.client.MouseDownHandler
- See Also:
-
MouseDownHandler.onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent)
-
onMouseMove
- Specified by:
onMouseMove
in interfacecom.google.gwt.event.dom.client.MouseMoveHandler
- See Also:
-
MouseMoveHandler.onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent)
-
onMouseUp
- Specified by:
onMouseUp
in interfacecom.google.gwt.event.dom.client.MouseUpHandler
- See Also:
-
MouseUpHandler.onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent)
-
remove
- Specified by:
remove
in interfacecom.google.gwt.user.client.ui.IndexedPanel
- See Also:
-
IndexedPanel.remove(int)
-
remove
- Specified by:
remove
in interfacecom.google.gwt.user.client.ui.HasWidgets
- See Also:
-
HasWidgets.remove(com.google.gwt.user.client.ui.Widget)
-
resetRatio
Resets the select area ratio. -
setAreaPosition
Sets the selection area.- Parameters:
relative
-true
if provided position is relative to the select area, not absolute to the pagepos
- the area position to select
-
setFireAll
Sets if the value change event will always be fired, or only when a select/resize/move operation is finished.- Parameters:
isFireAll
-true
to always be fire the value change event
-
setRatio
Sets a fixed selection ratio. Set0
to remove the fix.- Parameters:
heightToWidth
- the height to width ratio
-