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.
-
DDManager()
- The DDManager constructor.
-
addPropertyChangeListener(PropertyChangeListener)
- The addPropertyChangeListener method is generated to support the propertyChange field.
-
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.
-
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.
-
deregisterWindow(Window)
- Unregisters a window so that any component in it will not drop a target any more.
-
firePropertyChange(String, Object, Object)
- The firePropertyChange method is generated to support the propertyChange field.
-
getDDManager()
- Returns current DDManager.
-
initImages()
- This method was created in VisualAge.
-
registerSource(DDSource, Component)
- Registers the DDSource object and the component so that the user
will be able to drag something from the component.
-
registerTarget(DDTarget, Component)
- Registers a DDTarget object and a component so that the user
is able to drop something on the component.
-
registerWindow(Window)
- This method registeres a window so that the components inside it
can be drop targets.
-
removePropertyChangeListener(PropertyChangeListener)
- The removePropertyChangeListener method is generated to support the propertyChange field.
-
setDDManager(DDManager)
- Sets current DDManager.
DDManager
public DDManager()
- The DDManager constructor.
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- The addPropertyChangeListener method is generated to support the propertyChange field.
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
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
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
firePropertyChange
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
- The firePropertyChange method is generated to support the propertyChange field.
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
initImages
public void initImages()
- This method was created in VisualAge.
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
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
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
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- The removePropertyChangeListener method is generated to support the propertyChange field.
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