|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.bc.webarts.widgets.dnd.FileDropBean
If you wish to use the FileDrop package as a JavaBean, this class will act as
an interface to the FileDrop
class that handles all the dirty work.
After instantiating the bean, add components as drop targets using the
addFileDropTarget(...)
method. If the component
is a Container
, then all elements contained within will be
marked as a drop target as well.
Using the FileDrop
technique manually in your code will give you more options.
I'm releasing this code into the Public Domain. Enjoy.
Original author: Robert Harder, rharder@usa.net
Field Summary | |
private javax.swing.event.EventListenerList |
listenerList
|
Constructor Summary | |
FileDropBean()
Creates new FileDropBean |
Method Summary | |
void |
addFileDropListener(FileDropListener listener)
Register a listener for FileDropEvent s. |
void |
addFileDropTarget(java.awt.Component comp)
Registers a component as a drop target. |
protected void |
fireFileDropHappened(java.io.File[] files)
Fires a FileDropEvent with the given non-null
list of dropped files. |
void |
removeFileDropListener(FileDropListener listener)
Unregister a listener for FileDropEvent s. |
boolean |
removeFileDropTarget(java.awt.Component comp)
Unregisters a component as a drop target. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private javax.swing.event.EventListenerList listenerList
Constructor Detail |
public FileDropBean()
Method Detail |
public void addFileDropTarget(java.awt.Component comp)
comp
- The component to register as a drop targetpublic boolean removeFileDropTarget(java.awt.Component comp)
comp
- The component to unregisterpublic void addFileDropListener(FileDropListener listener)
FileDropEvent
s.
listener
- The listener to registerpublic void removeFileDropListener(FileDropListener listener)
FileDropEvent
s.
listener
- The listener to unregisterprotected void fireFileDropHappened(java.io.File[] files)
FileDropEvent
with the given non-null
list of dropped files.
files
- The files that were dropped
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |