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:
  • 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.


    Variable Index

     o CROSSHAIR_CURSOR
     o DEFAULT_CURSOR
     o E_RESIZE_CURSOR
     o HAND_CURSOR
     o MOVE_CURSOR
     o N_RESIZE_CURSOR
     o NE_RESIZE_CURSOR
     o NW_RESIZE_CURSOR
     o S_RESIZE_CURSOR
     o SE_RESIZE_CURSOR
     o SW_RESIZE_CURSOR
     o TEXT_CURSOR
     o W_RESIZE_CURSOR
     o WAIT_CURSOR

    Constructor Index

     o DragBean()
    The constructor

    Method Index

     o addDragListener(DragListener)
    Adds drag event listener
     o addPropertyChangeListener(PropertyChangeListener)
    The addPropertyChangeListener method was generated to support the propertyChange field.
     o dragBegin(Point)
    DDSource interface implementation method
     o dragDropEnd(boolean)
    DDSource imlementation method.
     o dragEnter()
    DDSource imlementation method.
     o dragExit()
    DDSource imlementation method.
     o dragOver()
    DDSource imlementation method.
     o firePropertyChange(String, Object, Object)
    The firePropertyChange method was generated to support the propertyChange field.
     o getAboutThisBean()
    Gets the aboutThisBean property (java.lang.String) value.
     o getComponent()
    Gets the component property (java.awt.Component) value.
     o getCursorType()
    Gets the cursorType property (int) value.
     o getDragCursor()
    Gets java.awt.Image value of drag cursor icon.
     o getDragData(Point)
    DDSource interface implementation method.
     o getDragIconImage()
    Gets the dragIconImage property (java.lang.String) value.
     o getDropCursor()
    Gets java.awt.Image value of drop cursor icon.
     o getDropIconImage()
    Gets the dropIconImage property (java.lang.String) value.
     o isDDSourceActive()
    DDSource interface implementation method.
     o removeDragListener(DragListener)
    Removes the drag event listener
     o removePropertyChangeListener(PropertyChangeListener)
    The removePropertyChangeListener method was generated to support the propertyChange field.
     o setAboutThisBean(String)
    Sets the aboutThisBean property (java.lang.String) value.
     o setComponent(Component)
    Sets the component property (java.awt.Component) value.
     o setCursorType(int)
    Sets the cursorType property (int) value.
     o setDragCursor(Image)
    Sets java.awt.Image value of drag cursor icon.
     o setDragIconImage(String)
    Sets the dragIconImage property (java.lang.String) value.
     o setDropCursor(Image)
    Sets java.awt.Image value of drop cursor icon.
     o setDropIconImage(String)
    Sets the dropIconImage property (java.lang.String) value.
     o setInputObject(Object)
    Sets the inputObject property (java.lang.Object) value.

    Variables

     o CROSSHAIR_CURSOR
     public static final int CROSSHAIR_CURSOR
    
     o DEFAULT_CURSOR
     public static final int DEFAULT_CURSOR
    
     o TEXT_CURSOR
     public static final int TEXT_CURSOR
    
     o WAIT_CURSOR
     public static final int WAIT_CURSOR
    
     o SW_RESIZE_CURSOR
     public static final int SW_RESIZE_CURSOR
    
     o SE_RESIZE_CURSOR
     public static final int SE_RESIZE_CURSOR
    
     o NW_RESIZE_CURSOR
     public static final int NW_RESIZE_CURSOR
    
     o NE_RESIZE_CURSOR
     public static final int NE_RESIZE_CURSOR
    
     o N_RESIZE_CURSOR
     public static final int N_RESIZE_CURSOR
    
     o S_RESIZE_CURSOR
     public static final int S_RESIZE_CURSOR
    
     o W_RESIZE_CURSOR
     public static final int W_RESIZE_CURSOR
    
     o E_RESIZE_CURSOR
     public static final int E_RESIZE_CURSOR
    
     o HAND_CURSOR
     public static final int HAND_CURSOR
    
     o MOVE_CURSOR
     public static final int MOVE_CURSOR
    

    Constructors

     o DragBean
     public DragBean()
    
    The constructor

    Methods

     o addDragListener
     public void addDragListener(DragListener newListener)
    
    Adds drag event listener

    Parameters:
    newListener - com.ibm.dnd.DragEventListener
     o addPropertyChangeListener
     public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
    
    The addPropertyChangeListener method was generated to support the propertyChange field.

     o dragBegin
     public void dragBegin(Point point)
    
    DDSource interface implementation method

    Parameters:
    point - - the point the drag starts at
    See Also:
    dragBegin
     o dragDropEnd
     public void dragDropEnd(boolean success)
    
    DDSource imlementation method.

    Parameters:
    success - - whether drop was success or not
    See Also:
    dragDropEnd
     o dragEnter
     public void dragEnter()
    
    DDSource imlementation method.

    See Also:
    dragEnter
     o dragExit
     public void dragExit()
    
    DDSource imlementation method.

    See Also:
    dragExit
     o dragOver
     public void dragOver()
    
    DDSource imlementation method.

    See Also:
    dragOver
     o firePropertyChange
     public void firePropertyChange(String propertyName,
                                    Object oldValue,
                                    Object newValue)
    
    The firePropertyChange method was generated to support the propertyChange field.

     o getAboutThisBean
     public String getAboutThisBean()
    
    Gets the aboutThisBean property (java.lang.String) value.

    Returns:
    The aboutThisBean property value.
    See Also:
    setAboutThisBean
     o getComponent
     public Component getComponent()
    
    Gets the component property (java.awt.Component) value.

    Returns:
    The component property value.
    See Also:
    setComponent
     o getCursorType
     public int getCursorType()
    
    Gets the cursorType property (int) value.

    Returns:
    The cursorType property value.
    See Also:
    setCursorType
     o getDragCursor
     public Image getDragCursor()
    
    Gets java.awt.Image value of drag cursor icon.

    Returns:
    java.awt.Image
    See Also:
    setDragCursor
     o 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
     o getDragIconImage
     public String getDragIconImage()
    
    Gets the dragIconImage property (java.lang.String) value.

    Returns:
    The dragIconImage property value.
    See Also:
    setDragIconImage
     o getDropCursor
     public Image getDropCursor()
    
    Gets java.awt.Image value of drop cursor icon.

    Returns:
    java.awt.Image.
    See Also:
    setDropCursor
     o getDropIconImage
     public String getDropIconImage()
    
    Gets the dropIconImage property (java.lang.String) value.

    Returns:
    The dropIconImage property value.
    See Also:
    setDropIconImage
     o 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
     o removeDragListener
     public void removeDragListener(DragListener listener)
    
    Removes the drag event listener

    Parameters:
    listener - com.ibm.dnd.DragEventListener
    See Also:
    addDragListener
     o removePropertyChangeListener
     public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
    
    The removePropertyChangeListener method was generated to support the propertyChange field.

     o 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
     o 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
     o setCursorType
     public void setCursorType(int cursorType)
    
    Sets the cursorType property (int) value.

    Parameters:
    cursorType - The new value for the property.
    See Also:
    getCursorType
     o setDragCursor
     public void setDragCursor(Image dragCursor) throws IOException
    
    Sets java.awt.Image value of drag cursor icon.

    See Also:
    getDragCursor
     o 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
     o setDropCursor
     public void setDropCursor(Image dropCursor) throws IOException
    
    Sets java.awt.Image value of drop cursor icon.

    See Also:
    getDropCursor
     o 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
     o 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