org.icefaces.ace.component.dnd

## Class DraggableBase

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - org.icefaces.ace.component.dnd.DraggableBase

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IceClientBehaviorHolder, IDraggable
  Direct Known Subclasses:
    Draggable

      public abstract class DraggableBase
      extends javax.faces.component.UIComponentBase
      implements IDraggable, IceClientBehaviorHolder

  Enables an Id-specified component to be moved via dragging. Draggable component can cause events on droppable ones.

  For more information, see the Draggable Wiki Documentation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `DraggableBase.PropertyKeys`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COMPONENT_TYPE`
    `static java.lang.String` | `RENDERER_TYPE`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DraggableBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addClientBehavior(java.lang.String eventName, javax.faces.component.behavior.ClientBehavior behavior)`
    `java.lang.String` | `getAxis()` Return the value of the `axis` property.
    `java.lang.String` | `getContainment()` Return the value of the `containment` property.
    `java.lang.String` | `getCursor()` Return the value of the `cursor` property.
    `java.lang.String` | `getDatasource()` Return the value of the `datasource` property.
    `java.lang.String` | `getDefaultEventName()`
    `java.lang.String` | `getDefaultExecute(java.lang.String event)`
    `java.lang.String` | `getDefaultRender(java.lang.String event)`
    `javax.el.MethodExpression` | `getDragStartListener()` Return the value of the `dragStartListener` property.
    `java.util.Collection<java.lang.String>` | `getEventNames()`
    `java.lang.String` | `getFamily()`
    `java.lang.String` | `getFor()` Return the value of the `for` property.
    `java.lang.String` | `getGrid()` Return the value of the `grid` property.
    `java.lang.String` | `getHandle()` Return the value of the `handle` property.
    `java.lang.String` | `getHelper()` Return the value of the `helper` property.
    `java.lang.String` | `getListenerArgument(java.lang.String event)`
    `java.lang.Double` | `getOpacity()` Return the value of the `opacity` property.
    `java.lang.String` | `getScope()` Return the value of the `scope` property.
    `java.lang.String` | `getSnapMode()` Return the value of the `snapMode` property.
    `int` | `getSnapTolerance()` Return the value of the `snapTolerance` property.
    `java.lang.String` | `getStack()` Return the value of the `stack` property.
    `java.lang.String` | `getWidgetVar()` Return the value of the `widgetVar` property.
    `int` | `getZindex()` Return the value of the `zindex` property.
    `boolean` | `isDisabled()` Return the value of the `disabled` property.
    `boolean` | `isDragOnly()` Return the value of the `dragOnly` property.
    `protected boolean` | `isPropertySet(java.lang.String finder)`
    `boolean` | `isRevert()` Return the value of the `revert` property.
    `boolean` | `isSnap()` Return the value of the `snap` property.
    `void` | `setAxis(java.lang.String axis)` Set the value of the `axis` property.
    `void` | `setContainment(java.lang.String containment)` Set the value of the `containment` property.
    `void` | `setCursor(java.lang.String cursor)` Set the value of the `cursor` property.
    `void` | `setDatasource(java.lang.String datasource)` Set the value of the `datasource` property.
    `void` | `setDisabled(boolean disabled)` Set the value of the `disabled` property.
    `void` | `setDragOnly(boolean dragOnly)` Set the value of the `dragOnly` property.
    `void` | `setDragStartListener(javax.el.MethodExpression dragStartListener)` Set the value of the `dragStartListener` property.
    `void` | `setFor(java.lang.String forValue)` Set the value of the `for` property.
    `void` | `setGrid(java.lang.String grid)` Set the value of the `grid` property.
    `void` | `setHandle(java.lang.String handle)` Set the value of the `handle` property.
    `void` | `setHelper(java.lang.String helper)` Set the value of the `helper` property.
    `void` | `setOpacity(java.lang.Double opacity)` Set the value of the `opacity` property.
    `void` | `setRevert(boolean revert)` Set the value of the `revert` property.
    `void` | `setScope(java.lang.String scope)` Set the value of the `scope` property.
    `void` | `setSnap(boolean snap)` Set the value of the `snap` property.
    `void` | `setSnapMode(java.lang.String snapMode)` Set the value of the `snapMode` property.
    `void` | `setSnapTolerance(int snapTolerance)` Set the value of the `snapTolerance` property.
    `void` | `setStack(java.lang.String stack)` Set the value of the `stack` property.
    `void` | `setValueExpression(java.lang.String name, javax.el.ValueExpression binding)`
    `void` | `setWidgetVar(java.lang.String widgetVar)` Set the value of the `widgetVar` property.
    `void` | `setZindex(int zindex)` Set the value of the `zindex` property.

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder

      `getClientBehaviors`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final java.lang.String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### RENDERER_TYPE

          public static final java.lang.String RENDERER_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DraggableBase

          public DraggableBase()

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Specified by:
        `getFamily` in class `javax.faces.component.UIComponent`

    - #### setAxis

          public void setAxis(java.lang.String axis)

      Set the value of the `axis` property.

      Contents: Restrict the drag movement of this item to an axis. Default is null, possible values include: "x" & "y".

      Specified by:
        `setAxis` in interface `IDraggable`

    - #### getAxis

          public java.lang.String getAxis()

      Return the value of the `axis` property.

      Contents: Restrict the drag movement of this item to an axis. Default is null, possible values include: "x" & "y".

      Specified by:
        `getAxis` in interface `IDraggable`

    - #### setContainment

          public void setContainment(java.lang.String containment)

      Set the value of the `containment` property.

      Contents: JQuery selector of the element whose boundaries should restrict the movement of this draggable. Other possible values are 'parent', 'document', and 'window'.

      Specified by:
        `setContainment` in interface `IDraggable`

    - #### getContainment

          public java.lang.String getContainment()

      Return the value of the `containment` property.

      Contents: JQuery selector of the element whose boundaries should restrict the movement of this draggable. Other possible values are 'parent', 'document', and 'window'.

      Specified by:
        `getContainment` in interface `IDraggable`

    - #### setCursor

          public void setCursor(java.lang.String cursor)

      Set the value of the `cursor` property.

      Contents: Cursor style to set when this component is being dragged. See this page for a reference of what cursor styles your browser supports.

      Specified by:
        `setCursor` in interface `IDraggable`

    - #### getCursor

          public java.lang.String getCursor()

      Return the value of the `cursor` property.

      Contents: Cursor style to set when this component is being dragged. See this page for a reference of what cursor styles your browser supports.

      Specified by:
        `getCursor` in interface `IDraggable`

    - #### setDatasource

          public void setDatasource(java.lang.String datasource)

      Set the value of the `datasource` property.

      Contents: Allows you to set the ID of an UIData component that will provide a Java object as input for the drag start event. That object is defined by matching the index of the draggable to an object at the same index in the UIData component backing.

      Specified by:
        `setDatasource` in interface `IDraggable`

    - #### getDatasource

          public java.lang.String getDatasource()

      Return the value of the `datasource` property.

      Contents: Allows you to set the ID of an UIData component that will provide a Java object as input for the drag start event. That object is defined by matching the index of the draggable to an object at the same index in the UIData component backing.

      Specified by:
        `getDatasource` in interface `IDraggable`

    - #### setDisabled

          public void setDisabled(boolean disabled)

      Set the value of the `disabled` property.

      Contents: If set, movement is disabled.

      Specified by:
        `setDisabled` in interface `IDraggable`

    - #### isDisabled

          public boolean isDisabled()

      Return the value of the `disabled` property.

      Contents: If set, movement is disabled.

      Specified by:
        `isDisabled` in interface `IDraggable`

    - #### setDragOnly

          public void setDragOnly(boolean dragOnly)

      Set the value of the `dragOnly` property.

      Contents: If set, component won't cause drop event.

      Specified by:
        `setDragOnly` in interface `IDraggable`

    - #### isDragOnly

          public boolean isDragOnly()

      Return the value of the `dragOnly` property.

      Contents: If set, component won't cause drop event.

      Specified by:
        `isDragOnly` in interface `IDraggable`

    - #### setDragStartListener

          public void setDragStartListener(javax.el.MethodExpression dragStartListener)

      Set the value of the `dragStartListener` property.

      Contents: MethodExpression reference to a method called whenever the target component starts to be dragged. (It is advised not to use this event for updating the component being dragged, in order to avoid having its markup replaced while still dragging it. See wiki for more details.)

      Specified by:
        `setDragStartListener` in interface `IDraggable`

    - #### getDragStartListener

          public javax.el.MethodExpression getDragStartListener()

      Return the value of the `dragStartListener` property.

      Contents: MethodExpression reference to a method called whenever the target component starts to be dragged. (It is advised not to use this event for updating the component being dragged, in order to avoid having its markup replaced while still dragging it. See wiki for more details.)

      Specified by:
        `getDragStartListener` in interface `IDraggable`

    - #### setFor

          public void setFor(java.lang.String forValue)

      Set the value of the `for` property.

      Contents: Id of the component to add draggable behavior to.

      Specified by:
        `setFor` in interface `IDraggable`

    - #### getFor

          public java.lang.String getFor()

      Return the value of the `for` property.

      Contents: Id of the component to add draggable behavior to.

      Specified by:
        `getFor` in interface `IDraggable`

    - #### setGrid

          public void setGrid(java.lang.String grid)

      Set the value of the `grid` property.

      Contents: Defines the drag movement of this component as though snapping to a grid in defined intervals. Ex: '20x20', measured in pixels.

      Specified by:
        `setGrid` in interface `IDraggable`

    - #### getGrid

          public java.lang.String getGrid()

      Return the value of the `grid` property.

      Contents: Defines the drag movement of this component as though snapping to a grid in defined intervals. Ex: '20x20', measured in pixels.

      Specified by:
        `getGrid` in interface `IDraggable`

    - #### setHandle

          public void setHandle(java.lang.String handle)

      Set the value of the `handle` property.

      Contents: Restrict the drag-event start to an element specified by this JQuery selector.

      Specified by:
        `setHandle` in interface `IDraggable`

    - #### getHandle

          public java.lang.String getHandle()

      Return the value of the `handle` property.

      Contents: Restrict the drag-event start to an element specified by this JQuery selector.

      Specified by:
        `getHandle` in interface `IDraggable`

    - #### setHelper

          public void setHelper(java.lang.String helper)

      Set the value of the `helper` property.

      Contents: Specifies which element to move during the dragging event. Possible values are 'original' or 'clone'.

      Specified by:
        `setHelper` in interface `IDraggable`

    - #### getHelper

          public java.lang.String getHelper()

      Return the value of the `helper` property.

      Contents: Specifies which element to move during the dragging event. Possible values are 'original' or 'clone'.

      Specified by:
        `getHelper` in interface `IDraggable`

    - #### setOpacity

          public void setOpacity(java.lang.Double opacity)

      Set the value of the `opacity` property.

      Contents: The opacity for the helper during dragging. Values can range from 0.00 to 1.00.

      Specified by:
        `setOpacity` in interface `IDraggable`

    - #### getOpacity

          public java.lang.Double getOpacity()

      Return the value of the `opacity` property.

      Contents: The opacity for the helper during dragging. Values can range from 0.00 to 1.00. Default = '1.0'.

      Specified by:
        `getOpacity` in interface `IDraggable`

    - #### setRevert

          public void setRevert(boolean revert)

      Set the value of the `revert` property.

      Contents: If set, the component will return to its original position when dragging stops.

      Specified by:
        `setRevert` in interface `IDraggable`

    - #### isRevert

          public boolean isRevert()

      Return the value of the `revert` property.

      Contents: If set, the component will return to its original position when dragging stops.

      Specified by:
        `isRevert` in interface `IDraggable`

    - #### setScope

          public void setScope(java.lang.String scope)

      Set the value of the `scope` property.

      Contents: This arbitrary keyword allows sets of dragabbles and droppables with the same keyword to be associated with each other exclusively.

      Specified by:
        `setScope` in interface `IDraggable`

    - #### getScope

          public java.lang.String getScope()

      Return the value of the `scope` property.

      Contents: This arbitrary keyword allows sets of dragabbles and droppables with the same keyword to be associated with each other exclusively.

      Specified by:
        `getScope` in interface `IDraggable`

    - #### setSnap

          public void setSnap(boolean snap)

      Set the value of the `snap` property.

      Contents: Enable 'snap to droppable' behavior for this component.

      Specified by:
        `setSnap` in interface `IDraggable`

    - #### isSnap

          public boolean isSnap()

      Return the value of the `snap` property.

      Contents: Enable 'snap to droppable' behavior for this component.

      Specified by:
        `isSnap` in interface `IDraggable`

    - #### setSnapMode

          public void setSnapMode(java.lang.String snapMode)

      Set the value of the `snapMode` property.

      Contents: Specifies which edges on elements to snap to. Possible values include: outer, inner and both.

      Specified by:
        `setSnapMode` in interface `IDraggable`

    - #### getSnapMode

          public java.lang.String getSnapMode()

      Return the value of the `snapMode` property.

      Contents: Specifies which edges on elements to snap to. Possible values include: outer, inner and both.

      Specified by:
        `getSnapMode` in interface `IDraggable`

    - #### setSnapTolerance

          public void setSnapTolerance(int snapTolerance)

      Set the value of the `snapTolerance` property.

      Contents: Distance in pixels from the droppable edges at which snapping should occur.

      Specified by:
        `setSnapTolerance` in interface `IDraggable`

    - #### getSnapTolerance

          public int getSnapTolerance()

      Return the value of the `snapTolerance` property.

      Contents: Distance in pixels from the droppable edges at which snapping should occur.

      Specified by:
        `getSnapTolerance` in interface `IDraggable`

    - #### setStack

          public void setStack(java.lang.String stack)

      Set the value of the `stack` property.

      Contents: JQuery selector that defines the set of items this draggable shares its space with, ensures this item is brought to the front z-index when dragged.

      Specified by:
        `setStack` in interface `IDraggable`

    - #### getStack

          public java.lang.String getStack()

      Return the value of the `stack` property.

      Contents: JQuery selector that defines the set of items this draggable shares its space with, ensures this item is brought to the front z-index when dragged.

      Specified by:
        `getStack` in interface `IDraggable`

    - #### setWidgetVar

          public void setWidgetVar(java.lang.String widgetVar)

      Set the value of the `widgetVar` property.

      Contents: The JavaScript component instance variable name.

      Specified by:
        `setWidgetVar` in interface `IDraggable`

    - #### getWidgetVar

          public java.lang.String getWidgetVar()

      Return the value of the `widgetVar` property.

      Contents: The JavaScript component instance variable name.

      Specified by:
        `getWidgetVar` in interface `IDraggable`

    - #### setZindex

          public void setZindex(int zindex)

      Set the value of the `zindex` property.

      Contents: The z-index to set for the helper object.

      Specified by:
        `setZindex` in interface `IDraggable`

    - #### getZindex

          public int getZindex()

      Return the value of the `zindex` property.

      Contents: The z-index to set for the helper object.

      Specified by:
        `getZindex` in interface `IDraggable`

    - #### isPropertySet

          protected boolean isPropertySet(java.lang.String finder)

    - #### setValueExpression

          public void setValueExpression(java.lang.String name,
                                         javax.el.ValueExpression binding)

      Overrides:
        `setValueExpression` in class `javax.faces.component.UIComponent`

    - #### getEventNames

          public java.util.Collection<java.lang.String> getEventNames()

      Specified by:
        `getEventNames` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getEventNames` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultEventName

          public java.lang.String getDefaultEventName()

      Specified by:
        `getDefaultEventName` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getDefaultEventName` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultRender

          public java.lang.String getDefaultRender(java.lang.String event)

      Specified by:
        `getDefaultRender` in interface `IceClientBehaviorHolder`

    - #### getDefaultExecute

          public java.lang.String getDefaultExecute(java.lang.String event)

      Specified by:
        `getDefaultExecute` in interface `IceClientBehaviorHolder`

    - #### getListenerArgument

          public java.lang.String getListenerArgument(java.lang.String event)

      Specified by:
        `getListenerArgument` in interface `IceClientBehaviorHolder`

    - #### addClientBehavior

          public void addClientBehavior(java.lang.String eventName,
                                        javax.faces.component.behavior.ClientBehavior behavior)

      Specified by:
        `addClientBehavior` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `addClientBehavior` in class `javax.faces.component.UIComponentBase`

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.