All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.dnd.DragBean
java.lang.Object
|
+----com.ibm.dnd.DragBean
- public class DragBean
- extends Object
- implements DDSource2, Serializable
DragBean allows arbitrary component to be drag source. It has the following
properties for this purpose:
- component - the component to be the drag source.
- inputObject - object to drag from the component
- dropIconImage - an optional image that can describe the inputObject
dragIconImage - an optional image that can describe the inputObject
cursorType - an optional cursor type that can describe the inputObject
When the drag is starting, DragBean fires dragStart event before any other
methods or properties are used. This allows to use dragStart event for setting
inputObject property value.
-
CROSSHAIR_CURSOR
-
-
DEFAULT_CURSOR
-
-
E_RESIZE_CURSOR
-
-
HAND_CURSOR
-
-
MOVE_CURSOR
-
-
N_RESIZE_CURSOR
-
-
NE_RESIZE_CURSOR
-
-
NW_RESIZE_CURSOR
-
-
S_RESIZE_CURSOR
-
-
SE_RESIZE_CURSOR
-
-
SW_RESIZE_CURSOR
-
-
TEXT_CURSOR
-
-
W_RESIZE_CURSOR
-
-
WAIT_CURSOR
-
-
DragBean()
- The constructor
-
addDragListener(DragListener)
- Adds drag event listener
-
addPropertyChangeListener(PropertyChangeListener)
- The addPropertyChangeListener method was generated to support the propertyChange field.
-
dragBegin(Point)
- DDSource interface implementation method
-
dragDropEnd(boolean)
- DDSource imlementation method.
-
dragEnter()
- DDSource imlementation method.
-
dragExit()
- DDSource imlementation method.
-
dragOver()
- DDSource imlementation method.
-
firePropertyChange(String, Object, Object)
- The firePropertyChange method was generated to support the propertyChange field.
-
getAboutThisBean()
- Gets the aboutThisBean property (java.lang.String) value.
-
getComponent()
- Gets the component property (java.awt.Component) value.
-
getCursorType()
- Gets the cursorType property (int) value.
-
getDragCursor()
- Gets java.awt.Image value of drag cursor icon.
-
getDragData(Point)
- DDSource interface implementation method.
-
getDragIconImage()
- Gets the dragIconImage property (java.lang.String) value.
-
getDropCursor()
- Gets java.awt.Image value of drop cursor icon.
-
getDropIconImage()
- Gets the dropIconImage property (java.lang.String) value.
-
isDDSourceActive()
- DDSource interface implementation method.
-
removeDragListener(DragListener)
- Removes the drag event listener
-
removePropertyChangeListener(PropertyChangeListener)
- The removePropertyChangeListener method was generated to support the propertyChange field.
-
setAboutThisBean(String)
- Sets the aboutThisBean property (java.lang.String) value.
-
setComponent(Component)
- Sets the component property (java.awt.Component) value.
-
setCursorType(int)
- Sets the cursorType property (int) value.
-
setDragCursor(Image)
- Sets java.awt.Image value of drag cursor icon.
-
setDragIconImage(String)
- Sets the dragIconImage property (java.lang.String) value.
-
setDropCursor(Image)
- Sets java.awt.Image value of drop cursor icon.
-
setDropIconImage(String)
- Sets the dropIconImage property (java.lang.String) value.
-
setInputObject(Object)
- Sets the inputObject property (java.lang.Object) value.
CROSSHAIR_CURSOR
public static final int CROSSHAIR_CURSOR
DEFAULT_CURSOR
public static final int DEFAULT_CURSOR
TEXT_CURSOR
public static final int TEXT_CURSOR
WAIT_CURSOR
public static final int WAIT_CURSOR
SW_RESIZE_CURSOR
public static final int SW_RESIZE_CURSOR
SE_RESIZE_CURSOR
public static final int SE_RESIZE_CURSOR
NW_RESIZE_CURSOR
public static final int NW_RESIZE_CURSOR
NE_RESIZE_CURSOR
public static final int NE_RESIZE_CURSOR
N_RESIZE_CURSOR
public static final int N_RESIZE_CURSOR
S_RESIZE_CURSOR
public static final int S_RESIZE_CURSOR
W_RESIZE_CURSOR
public static final int W_RESIZE_CURSOR
E_RESIZE_CURSOR
public static final int E_RESIZE_CURSOR
HAND_CURSOR
public static final int HAND_CURSOR
MOVE_CURSOR
public static final int MOVE_CURSOR
DragBean
public DragBean()
- The constructor
addDragListener
public void addDragListener(DragListener newListener)
- Adds drag event listener
- Parameters:
- newListener - com.ibm.dnd.DragEventListener
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- The addPropertyChangeListener method was generated to support the propertyChange field.
dragBegin
public void dragBegin(Point point)
- DDSource interface implementation method
- Parameters:
- point - - the point the drag starts at
- See Also:
- dragBegin
dragDropEnd
public void dragDropEnd(boolean success)
- DDSource imlementation method.
- Parameters:
- success - - whether drop was success or not
- See Also:
- dragDropEnd
dragEnter
public void dragEnter()
- DDSource imlementation method.
- See Also:
- dragEnter
dragExit
public void dragExit()
- DDSource imlementation method.
- See Also:
- dragExit
dragOver
public void dragOver()
- DDSource imlementation method.
- See Also:
- dragOver
firePropertyChange
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
- The firePropertyChange method was generated to support the propertyChange field.
getAboutThisBean
public String getAboutThisBean()
- Gets the aboutThisBean property (java.lang.String) value.
- Returns:
- The aboutThisBean property value.
- See Also:
- setAboutThisBean
getComponent
public Component getComponent()
- Gets the component property (java.awt.Component) value.
- Returns:
- The component property value.
- See Also:
- setComponent
getCursorType
public int getCursorType()
- Gets the cursorType property (int) value.
- Returns:
- The cursorType property value.
- See Also:
- setCursorType
getDragCursor
public Image getDragCursor()
- Gets java.awt.Image value of drag cursor icon.
- Returns:
- java.awt.Image
- See Also:
- setDragCursor
getDragData
public Transferable getDragData(Point point)
- DDSource interface implementation method. Wraps the inputObject property value
into java.awt.datatransfer.Transferable object.
- Returns:
- The object to drag
- See Also:
- getDragData, setInputObject
getDragIconImage
public String getDragIconImage()
- Gets the dragIconImage property (java.lang.String) value.
- Returns:
- The dragIconImage property value.
- See Also:
- setDragIconImage
getDropCursor
public Image getDropCursor()
- Gets java.awt.Image value of drop cursor icon.
- Returns:
- java.awt.Image.
- See Also:
- setDropCursor
getDropIconImage
public String getDropIconImage()
- Gets the dropIconImage property (java.lang.String) value.
- Returns:
- The dropIconImage property value.
- See Also:
- setDropIconImage
isDDSourceActive
public boolean isDDSourceActive()
- DDSource interface implementation method. Returns whether the DragBean active or not.
- Returns:
- boolean indicating whether or not the DragBean is active
- See Also:
- isDDSourceActive
removeDragListener
public void removeDragListener(DragListener listener)
- Removes the drag event listener
- Parameters:
- listener - com.ibm.dnd.DragEventListener
- See Also:
- addDragListener
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- The removePropertyChangeListener method was generated to support the propertyChange field.
setAboutThisBean
public void setAboutThisBean(String aboutThisBean)
- Sets the aboutThisBean property (java.lang.String) value.
- Parameters:
- aboutThisBean - The new value for the property.
- See Also:
- getAboutThisBean
setComponent
public void setComponent(Component component)
- Sets the component property (java.awt.Component) value.
- Parameters:
- component - The new value for the property.
- See Also:
- getComponent
setCursorType
public void setCursorType(int cursorType)
- Sets the cursorType property (int) value.
- Parameters:
- cursorType - The new value for the property.
- See Also:
- getCursorType
setDragCursor
public void setDragCursor(Image dragCursor) throws IOException
- Sets java.awt.Image value of drag cursor icon.
- See Also:
- getDragCursor
setDragIconImage
public void setDragIconImage(String dragIconImage)
- Sets the dragIconImage property (java.lang.String) value.
- Parameters:
- dragIconImage - The new value for the property.
- See Also:
- getDragIconImage
setDropCursor
public void setDropCursor(Image dropCursor) throws IOException
- Sets java.awt.Image value of drop cursor icon.
- See Also:
- getDropCursor
setDropIconImage
public void setDropIconImage(String dropIconImage)
- Sets the dropIconImage property (java.lang.String) value.
- Parameters:
- dropIconImage - The new value for the property.
- See Also:
- getDropIconImage
setInputObject
public void setInputObject(Object inputObject)
- Sets the inputObject property (java.lang.Object) value.
- Parameters:
- inputObject - the new value for the property
All Packages Class Hierarchy This Package Previous Next Index