|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
javax.swing.border.LineBorder
de.fhg.igd.ui.DropZone
A generic drop zone for object selections. This
DropZone inherits from Border and
can be added to existing components easily. Whenever
a drag enter is recognized the border is highlighted
until the drop is complete or aborted or a drag exit
is recognized.
| Field Summary | |
protected DropDelegate |
delegate_
The delegate that receives dropped data. |
static DataFlavor |
DROPZONE_FLAVOR
The DataFlavor supported by this
drop zone. |
protected DropTarget |
dtarget_
The DropTarget of this label. |
protected Color |
off_
The color in passive "off" mode. |
protected Color |
on_
The color in active "on" mode. |
protected JComponent |
parent_
The parent component that must be redrawn when the state of the drop zone changes. |
| Fields inherited from class javax.swing.border.LineBorder |
lineColor, roundedCorners, thickness |
| Constructor Summary | |
DropZone(Color on,
Color off,
int thickness)
Creates an instance with the given colors and thickness. |
|
DropZone(int thickness)
Creates a default drop zone with gray color in passive mode and white in active mode. |
|
| Method Summary | |
private Object |
deserialize(InputStream in)
|
void |
dragEnter(DropTargetDragEvent dtde)
|
void |
dragExit(DropTargetEvent dte)
|
void |
dragOver(DropTargetDragEvent dtde)
|
void |
drop(DropTargetDropEvent dtde)
|
void |
dropActionChanged(DropTargetDragEvent dtde)
|
void |
setColor(Color color)
Sets the line color. |
void |
setDelegate(DropDelegate delegate)
|
void |
setParentComponent(JComponent parent)
Sets the parent component of this drop zone. |
| Methods inherited from class javax.swing.border.LineBorder |
createBlackLineBorder, createGrayLineBorder, getBorderInsets, getBorderInsets, getLineColor, getRoundedCorners, getThickness, isBorderOpaque, paintBorder |
| Methods inherited from class javax.swing.border.AbstractBorder |
getInteriorRectangle, getInteriorRectangle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final DataFlavor DROPZONE_FLAVOR
DataFlavor supported by this
drop zone.
protected JComponent parent_
protected DropTarget dtarget_
DropTarget of this label.
protected DropDelegate delegate_
protected Color on_
protected Color off_
| Constructor Detail |
public DropZone(int thickness)
public DropZone(Color on,
Color off,
int thickness)
| Method Detail |
public void setDelegate(DropDelegate delegate)
DropDelegate that receives dropped
data.public void setColor(Color color)
color - The line color.public void setParentComponent(JComponent parent)
parent - The parent component.public void dragEnter(DropTargetDragEvent dtde)
dragEnter in interface DropTargetListenerpublic void dragOver(DropTargetDragEvent dtde)
dragOver in interface DropTargetListenerpublic void dropActionChanged(DropTargetDragEvent dtde)
dropActionChanged in interface DropTargetListenerpublic void dragExit(DropTargetEvent dte)
dragExit in interface DropTargetListenerpublic void drop(DropTargetDropEvent dtde)
drop in interface DropTargetListenerprivate Object deserialize(InputStream in)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||