All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.dnd.DDManager

java.lang.Object
   |
   +----com.ibm.dnd.DDManager

public class DDManager
extends Object
DDManager is the main class of the DnD implementation. Basic DDManager functions are the following: - registering/unregistering a source component and an associated DDSource object; - registering/unregistering a target component and an associated DDTarget object; - registering/unregistering windows participating in the DnD operations; - determining a target component and an associated DDTarget object from the point in screen coordinates; - notifying DDTarget and DDSource about the current status of the DnD operation.

It gets notified when you start to drag mouse or release the mouse button. Then it determines the window under the mouse and the component that is possible drag target. Later it finds DDTarget associated with that component, calls its appropriate methods.

It is possible to subclass DDManager and set up it as the current DDManager. DDManager has the getDDManager/setDDManager static methods for that purpose. If no DDManager is set explicitly, new DDManager is created when the getDDManager method gets called for the first time.


Constructor Index

 o DDManager()
The DDManager constructor.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
The addPropertyChangeListener method is generated to support the propertyChange field.
 o deregisterSource(DDSource, Component)
Unregisters a DDSource object and a component so that the user is not able to drag anything from the component any more.
 o deregisterTarget(DDTarget, Component)
Unregisters a DDTarget object and a component so that the user is not able to drop anything on the component any more.
 o deregisterWindow(Window)
Unregisters a window so that any component in it will not drop a target any more.
 o firePropertyChange(String, Object, Object)
The firePropertyChange method is generated to support the propertyChange field.
 o getDDManager()
Returns current DDManager.
 o initImages()
This method was created in VisualAge.
 o registerSource(DDSource, Component)
Registers the DDSource object and the component so that the user will be able to drag something from the component.
 o registerTarget(DDTarget, Component)
Registers a DDTarget object and a component so that the user is able to drop something on the component.
 o registerWindow(Window)
This method registeres a window so that the components inside it can be drop targets.
 o removePropertyChangeListener(PropertyChangeListener)
The removePropertyChangeListener method is generated to support the propertyChange field.
 o setDDManager(DDManager)
Sets current DDManager.

Constructors

 o DDManager
 public DDManager()
The DDManager constructor.

Methods

 o addPropertyChangeListener
 public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
The addPropertyChangeListener method is generated to support the propertyChange field.

 o deregisterSource
 public void deregisterSource(DDSource source,
                              Component component)
Unregisters a DDSource object and a component so that the user is not able to drag anything from the component any more.

Parameters:
source - DDSource object that handles DnD events for the component
component - drag source component
 o deregisterTarget
 public void deregisterTarget(DDTarget target,
                              Component component)
Unregisters a DDTarget object and a component so that the user is not able to drop anything on the component any more.

Parameters:
target - DDTarget object that handles DnD events for the component
component - drop target component
 o deregisterWindow
 public void deregisterWindow(Window wnd)
Unregisters a window so that any component in it will not drop a target any more.

Parameters:
wnd - java.awt.Window the window to be deregistered
 o firePropertyChange
 public void firePropertyChange(String propertyName,
                                Object oldValue,
                                Object newValue)
The firePropertyChange method is generated to support the propertyChange field.

 o getDDManager
 public static DDManager getDDManager()
Returns current DDManager. If no has been set yet, new instance of DDManager is created and set.

Returns:
the current DDManager
 o initImages
 public void initImages()
This method was created in VisualAge.

 o registerSource
 public void registerSource(DDSource source,
                            Component component)
Registers the DDSource object and the component so that the user will be able to drag something from the component. It creates new instance of DDListener and attaches it to the component.

Parameters:
source - DDSource object that handles DnD events for the component
component - drag source component
See Also:
DDListener
 o registerTarget
 public void registerTarget(DDTarget target,
                            Component component)
Registers a DDTarget object and a component so that the user is able to drop something on the component.

Parameters:
target - DDTarget object that handles DnD events for the component
component - drop target component
 o registerWindow
 public void registerWindow(Window wnd)
This method registeres a window so that the components inside it can be drop targets.

Parameters:
wnd - java.awt.Window window to be registered
 o removePropertyChangeListener
 public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
The removePropertyChangeListener method is generated to support the propertyChange field.

 o setDDManager
 public static final void setDDManager(DDManager manager)
Sets current DDManager.

Parameters:
mng - dd.DDManager new current DDManager

All Packages  Class Hierarchy  This Package  Previous  Next  Index