net.sf.jzeno.echo.components
Class DragWrapper

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

public class DragWrapper
extends AbstractComponent
implements FastComponent, Precreation

A wrapper component that enabled drag behaviour for it's children. This component is used in conjunction with the DropWrapper.

By default all child components will become immutable (that is to say the user will not be able to interact with them on the screen, only to drag them).

If you want to limit the drag area to one of the child components (and thus allow interaction by the user with the other child components) you can set the handle property.

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
DragWrapper()
           
 
Method Summary
 void applyContext()
           
 Component getBean()
           The bean property allows you to associate an arbitrary object with your DragWrapper.
 Component getHandle()
           Retrieve the child component that is used as handle.
 void setBean(Component bean)
           
 void setHandle(Component handle)
           Sets the child component that is used as handle.
 
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

DragWrapper

public DragWrapper()
Method Detail

getHandle

public Component getHandle()

Retrieve the child component that is used as handle. null indicates all children will be drag handles.


setHandle

public void setHandle(Component handle)

Sets the child component that is used as handle. null indicates all children will be drag handles.


getBean

public Component getBean()

The bean property allows you to associate an arbitrary object with your DragWrapper. This is handy because the DropWrapper will tell you which component was dropped on it, and that allows you to, for example, find the model object associated with it by using getBean().


setBean

public void setBean(Component bean)

applyContext

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