org.wings.dnd
Class DragAndDropManager

java.lang.Object
  extended by org.wings.SComponent
      extended by org.wings.dnd.DragAndDropManager
All Implemented Interfaces:
Serializable, Cloneable, LowLevelEventListener, Renderable

public class DragAndDropManager
extends SComponent
implements LowLevelEventListener

The Drag and Drop Manager. It receives DnD events and dispatches them to the registered components. You must register your component with this class, which is accessible via the wings session. you should do this in the

Author:
ole
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.wings.SComponent
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME
 
Constructor Summary
DragAndDropManager()
          The constructor.
 
Method Summary
 void deregisterDragSource(DragSource dragSource)
          deregister a dragSource.
 void deregisterDropTarget(DropTarget dropTarget)
          deregister a dropTarget.
 void fireFinalEvents()
          Internal event trigger used by CGs.
 void fireIntermediateEvents()
          fire events which describes a "in progress" state change, like TreeWillExpand, or ListSelectionEvent with getIsAdjusting() true, ...
 SComponent getComponentByName(String name)
           
 List<DragSource> getDragSources()
          getter for the list of drag sources.
 List<DropTarget> getDropTargets()
          getter for the list of drop targets.
 boolean isEnabled()
          Return true if this component is enabled.
 boolean isEpochCheckEnabled()
          Asks the low-level event listener if epoch checking should be perfomed on it.
 void processLowLevelEvent(String name, String[] values)
          Deliver low level/http events (parameters).
 void registerDragSource(DragSource dragSource)
          register a dragSource with the Manager.
 void registerDropTarget(DropTarget dropTarget)
          register a dropTarget with the Manager.
 
Methods inherited from class org.wings.SComponent
addComponentListener, addDynamicStyle, addEventListener, addNotify, addParentFrameListener, addPropertyChangeListener, addPropertyChangeListener, addRenderListener, addScriptListener, addStyle, clone, fireComponentChangeEvent, fireKeyEvents, fireRenderEvent, getActionMap, getBackground, getBorder, getCG, getClientProperty, getComponentPopupMenu, getDynamicStyle, getDynamicStyles, getFocusTraversalIndex, getFont, getForeground, getHorizontalAlignment, getInputMap, getInputMap, getListenerCount, getListenerList, getListeners, getLowLevelEventId, getName, getParent, getParentFrame, getPreferredSize, getRequestURL, getResidesInForm, getScriptListenerList, getScriptListeners, getSession, getShowAsFormComponent, getStyle, getToolTipText, getVerticalAlignment, invite, isDifferent, isFocusOwner, isRecursivelyVisible, isReloadForced, isUpdatePossible, isVisible, paramString, processComponentEvent, processKeyEvents, putClientProperty, reload, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, removeComponentListener, removeDynamicStyle, removeEventListener, removeNotify, removeParentFrameListener, removePropertyChangeListener, removePropertyChangeListener, removeRenderListener, removeScriptListener, removeStyle, requestFocus, scrollRectToVisible, setActionMap, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setBackground, setBorder, setCG, setComponentPopupMenu, setDynamicStyles, setEnabled, setFocusTraversalIndex, setFont, setForeground, setHorizontalAlignment, setInputMap, setInputMap, setName, setNameRaw, setParent, setParentFrame, setPreferredSize, setReloadForced, setShowAsFormComponent, setStyle, setToolTipText, setVerticalAlignment, setVisible, toString, update, updateCG, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wings.LowLevelEventListener
getLowLevelEventId, getName
 

Constructor Detail

DragAndDropManager

public DragAndDropManager()
The constructor. It initializes all fields

Method Detail

registerDragSource

public void registerDragSource(DragSource dragSource)
register a dragSource with the Manager. After registering it will be receivable by dropTargets.

Parameters:
dragSource - the SComponent which is the DragSource

deregisterDragSource

public void deregisterDragSource(DragSource dragSource)
deregister a dragSource.

Parameters:
dragSource - the SComponent which is the DragSource to deregister

registerDropTarget

public void registerDropTarget(DropTarget dropTarget)
register a dropTarget with the Manager. After registering it can receive drop events.

Parameters:
dropTarget - the SComponent which is the DropTarget

deregisterDropTarget

public void deregisterDropTarget(DropTarget dropTarget)
deregister a dropTarget.

Parameters:
dropTarget - the SComponent which is the DropTarget to deregister

getComponentByName

public SComponent getComponentByName(String name)

getDragSources

public List<DragSource> getDragSources()
getter for the list of drag sources. Used for initializing them in the client code.

Returns:
a List of all drag sources

getDropTargets

public List<DropTarget> getDropTargets()
getter for the list of drop targets. Used for initializing them in the client code.

Returns:
a List of all drop targets

processLowLevelEvent

public void processLowLevelEvent(String name,
                                 String[] values)
Description copied from interface: LowLevelEventListener
Deliver low level/http events (parameters). The name-value-pairs of the HTTPRequest are considered low level events.

Specified by:
processLowLevelEvent in interface LowLevelEventListener
Overrides:
processLowLevelEvent in class SComponent
Parameters:
name - the name-value-pair's name
values - the name-value-pair's values

fireIntermediateEvents

public void fireIntermediateEvents()
Description copied from interface: LowLevelEventListener
fire events which describes a "in progress" state change, like TreeWillExpand, or ListSelectionEvent with getIsAdjusting() true, ...

Specified by:
fireIntermediateEvents in interface LowLevelEventListener

fireFinalEvents

public void fireFinalEvents()
Description copied from class: SComponent
Internal event trigger used by CGs. This Method is called internal and should not be called directly

Specified by:
fireFinalEvents in interface LowLevelEventListener
Overrides:
fireFinalEvents in class SComponent

isEnabled

public boolean isEnabled()
Description copied from class: SComponent
Return true if this component is enabled.

Specified by:
isEnabled in interface LowLevelEventListener
Overrides:
isEnabled in class SComponent
Returns:
true if component is enabled

isEpochCheckEnabled

public boolean isEpochCheckEnabled()
Description copied from interface: LowLevelEventListener
Asks the low-level event listener if epoch checking should be perfomed on it. If true the Dispatcher will ignore request originating from old views (typically iniated by triggering browser back and clicking somewhere.)

Specified by:
isEpochCheckEnabled in interface LowLevelEventListener
Returns:
true if epoch checking should be perfomed, false if all request for this component should be processed.


wingS Swings ;-)