|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.dnd.DragGestureRecognizer
java.awt.dnd.MouseDragGestureRecognizer
com.bbn.openmap.tools.dnd.DnDListener
com.bbn.openmap.tools.dnd.DefaultDnDCatcher
com.bbn.openmap.tools.beanbox.BeanBoxDnDCatcher
public class BeanBoxDnDCatcher
The BeanBoxDnDCatcher class manages all Java Drag-and-Drop events associated
with openmap layers that implement the
BeanBoxHandlerinterface.
| Field Summary | |
|---|---|
protected java.util.HashMap |
beanInfoMap
contains BeanInfo objects hashed by the class names of the associated bean classes |
protected java.lang.Object |
selectedBean
holds the currently selected bean |
protected BeanBox |
selectedBeanBox
holds the BeanBoxthat manages the
currently selected bean |
protected Layer |
selectedBeanLayer
holds the openmap layer that contains the currently selected bean |
protected java.awt.Point |
selectedBeanLocation
holds the map location of the currently selected bean |
protected java.io.ByteArrayOutputStream |
serBean
holds the serialized version of currently selected bean |
| Fields inherited from class com.bbn.openmap.tools.dnd.DefaultDnDCatcher |
|---|
beanContextChildSupport, layers, md, pcSupport, proj |
| Fields inherited from class com.bbn.openmap.tools.dnd.DnDListener |
|---|
default_action, startDrag |
| Fields inherited from class java.awt.dnd.DragGestureRecognizer |
|---|
component, dragGestureListener, dragSource, events, sourceActions |
| Constructor Summary | |
|---|---|
BeanBoxDnDCatcher()
Constructs a new DnDListener object. |
|
BeanBoxDnDCatcher(java.awt.dnd.DragSource ds)
Constructs a new MouseDragGestureRecognizer given the DragSource for the Component. |
|
BeanBoxDnDCatcher(java.awt.dnd.DragSource ds,
java.awt.Component c)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe. |
|
BeanBoxDnDCatcher(java.awt.dnd.DragSource ds,
java.awt.Component c,
int act)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe and the drag-and-drop action. |
|
BeanBoxDnDCatcher(java.awt.dnd.DragSource ds,
java.awt.Component c,
int act,
java.awt.dnd.DragGestureListener dgl)
Construct a new MouseDragGestureRecognizer given the DragSource for the Component c, and the Component to observe. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
This method is called whenever the user choose a layer to drop or move a bean to. |
protected void |
copySelectedBean()
This method is called when the user chooses to copy a bean by some means such by by pressing Ctrl-C. |
protected void |
cutSelectedBean()
This method is called when the user chooses to cut a bean by some means such by by pressing Ctrl-X. |
protected void |
deleteSelectedBean()
This method is called when the user chooses to delete a bean by some means such by by pressing DEL. |
void |
drop(java.awt.dnd.DropTargetDropEvent dtde)
The drag operation has terminated with a drop on this DropTarget. |
void |
findAndInit(java.lang.Object someObj)
Calls superclass method and then adds the KeyListener to someObj if someObj is of type OpenMapFrame. |
void |
mouseClicked(java.awt.event.MouseEvent evt)
Displays a GenericPropertySheetif
mouse click is on a bean in some layer. |
protected void |
pasteSelectedBean()
This method is called when the user chooses to paste by some means (such by pressing Ctrl-V) a previously copied or cut bean. |
void |
setLayers(Layer[] allLayers)
Asscoiates a DropTarget with each layer. |
void |
startDragAction(java.awt.dnd.DragGestureEvent dge,
java.awt.dnd.DragSourceListener dsl)
Invoked on dragGestureRecognized |
protected void |
unCutSelectedBean()
This method is called when the user chooses to cancel a cut operation on a bean by some means such by by pressing ESC. |
| Methods inherited from class com.bbn.openmap.tools.dnd.DefaultDnDCatcher |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, consume, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, getProjection, mouseDragged, mouseReleased, projectionChanged, propertyChange, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setLayers, setProjection, setProjection |
| Methods inherited from class com.bbn.openmap.tools.dnd.DnDListener |
|---|
dragDropEnd, dragEnter, dragEnter, dragExit, dragExit, dragOver, dragOver, dropActionChanged, dropActionChanged, getCursor, getDefaultAction, setCursor, setDefaultAction |
| Methods inherited from class java.awt.dnd.MouseDragGestureRecognizer |
|---|
mouseEntered, mouseExited, mouseMoved, mousePressed, registerListeners, unregisterListeners |
| Methods inherited from class java.awt.dnd.DragGestureRecognizer |
|---|
addDragGestureListener, appendEvent, fireDragGestureRecognized, getComponent, getDragSource, getSourceActions, getTriggerEvent, removeDragGestureListener, resetRecognizer, setComponent, setSourceActions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.beans.beancontext.BeanContextChild |
|---|
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext |
| Methods inherited from interface java.beans.beancontext.BeanContextMembershipListener |
|---|
childrenAdded, childrenRemoved |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Methods inherited from interface com.bbn.openmap.event.ProjectionListener |
|---|
projectionChanged |
| Methods inherited from interface com.bbn.openmap.event.LayerListener |
|---|
setLayers |
| Field Detail |
|---|
protected java.lang.Object selectedBean
protected java.io.ByteArrayOutputStream serBean
protected java.awt.Point selectedBeanLocation
protected BeanBox selectedBeanBox
BeanBoxthat manages the
currently selected bean
protected Layer selectedBeanLayer
protected java.util.HashMap beanInfoMap
| Constructor Detail |
|---|
public BeanBoxDnDCatcher()
DnDListener object.
public BeanBoxDnDCatcher(java.awt.dnd.DragSource ds)
ds - the DragSource for the Component
public BeanBoxDnDCatcher(java.awt.dnd.DragSource ds,
java.awt.Component c)
ds - the DragSource for the Component cc - the Component to observe
public BeanBoxDnDCatcher(java.awt.dnd.DragSource ds,
java.awt.Component c,
int act)
ds - the DragSource for the Component cc - the Component to observeact - the drag-and-drop action
public BeanBoxDnDCatcher(java.awt.dnd.DragSource ds,
java.awt.Component c,
int act,
java.awt.dnd.DragGestureListener dgl)
ds - the DragSource for the Component cc - the Component to observeact - the drag-and-drop actiondgl - the DragGestureListener| Method Detail |
|---|
public void findAndInit(java.lang.Object someObj)
findAndInit in class DefaultDnDCatcherprotected void copySelectedBean()
protected void pasteSelectedBean()
protected void cutSelectedBean()
protected void unCutSelectedBean()
protected void deleteSelectedBean()
public void drop(java.awt.dnd.DropTargetDropEvent dtde)
DropTarget. This method is responsible for undertaking the
transfer of the data associated with the gesture. The
DropTargetDropEvent provides a means to obtain a
Transferable object that represents the data object(s) to be
transfered.
drop in interface java.awt.dnd.DropTargetListenerdrop in class DefaultDnDCatcherdtde - the DropTargetDropEventpublic void mouseClicked(java.awt.event.MouseEvent evt)
GenericPropertySheetif
mouse click is on a bean in some layer. In case of overlapping beans,
chooses the first bean found to be under the mouse, which is usually a
bean in the top most visible layer.
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class java.awt.dnd.MouseDragGestureRecognizerpublic void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class DefaultDnDCatcherpublic void setLayers(Layer[] allLayers)
setLayers in class DefaultDnDCatcher
public void startDragAction(java.awt.dnd.DragGestureEvent dge,
java.awt.dnd.DragSourceListener dsl)
startDragAction in class DefaultDnDCatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||