net.sf.jzeno.echo.components
Class DropWrapper

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.DropWrapper
All Implemented Interfaces:
java.io.Serializable, EventSource, Precreation, Component, FastComponent

public class DropWrapper
extends AbstractComponent
implements FastComponent, EventSource, Precreation

This wrapper component allows you to add drop capabilities to any (collection of) child component(s). It is used in conjuction with DragWrapper.

When a draggable item is released on this component, a server-side event will be triggered. You may set the eventhandler (as allways) by specifying the actionCommand property. This method is the called, and the argument passed in will be the DropWrapper that was the target of the drag-drop operation. Information about the drag-drop operation can be retrieved via multiple properties on that DropWrapper.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
DropWrapper()
           
 
Method Summary
 void applyContext()
           
 void fire()
           
 java.lang.String getActionCommand()
          Gets the event handler for the drop operation.
 java.lang.Object getBean()
           The bean property allows you to associate an arbitrary object with your DropWrapper.
 int getHeight()
           Retrieves the height of the drop zone, measured in pixels on the client.
 DragWrapper getSourceDragWrapper()
           Retrieve the DragWrapper
 int getWidth()
          Retrieves the width of the drop zone, measured in pixels on the client.
 int getX()
           Retrieves the X location of the mouse (relative to the drop zone), at drop-time.
 int getY()
           Retrieves the X location of the mouse (relative to the drop zone), at drop-time.
 void setActionCommand(java.lang.String actionCommand)
          Sets the event handler for the drop operation.
 void setBean(java.lang.Object bean)
           
 void setHeight(int height)
           
 void setSourceDragWrapper(DragWrapper dragWrapper)
           
 void setWidth(int width)
           
 void setX(int x)
           
 void setY(int y)
           
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropWrapper

public DropWrapper()
Method Detail

fire

public void fire()

getActionCommand

public java.lang.String getActionCommand()
Gets the event handler for the drop operation.

Specified by:
getActionCommand in interface EventSource

setActionCommand

public void setActionCommand(java.lang.String actionCommand)
Sets the event handler for the drop operation.

Specified by:
setActionCommand in interface EventSource

getSourceDragWrapper

public DragWrapper getSourceDragWrapper()

Retrieve the DragWrapper


setSourceDragWrapper

public void setSourceDragWrapper(DragWrapper dragWrapper)

getHeight

public int getHeight()

Retrieves the height of the drop zone, measured in pixels on the client.


setHeight

public void setHeight(int height)

getWidth

public int getWidth()
Retrieves the width of the drop zone, measured in pixels on the client.


setWidth

public void setWidth(int width)

getX

public int getX()

Retrieves the X location of the mouse (relative to the drop zone), at drop-time.


setX

public void setX(int x)

getY

public int getY()

Retrieves the X location of the mouse (relative to the drop zone), at drop-time.


setY

public void setY(int y)

getBean

public java.lang.Object getBean()

The bean property allows you to associate an arbitrary object with your DropWrapper. This is handy because it allows you to assocate (for example) a model object with this DropWrapper. Handy to be able to retrieve inside of you event handler.


setBean

public void setBean(java.lang.Object bean)

applyContext

public void applyContext()
Specified by:
applyContext in interface Precreation