public abstract class DragControl extends TreeHotSpot
TreeHotSpot that can handle drag events.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
dragging |
protected Point |
dragRefPoint |
parentactive| Constructor and Description |
|---|
DragControl(HotSpot parent)
Create a drag control.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
beginDrag(Point point)
Called when a drag begins.
|
protected abstract void |
drag(Point point)
Called for each point within a drag action.
|
protected void |
endDrag()
Called when a drag action ends.
|
boolean |
isDragging()
Is the control currently dragging?
|
void |
selected(SelectEvent event)
Handle a
SelectEvent and call beginDrag(java.awt.Point), drag(java.awt.Point),
endDrag() as appropriate. |
mouseClicked, mousePressed, mouseReleased, mouseWheelMovedgetCursor, isActive, isConsumed, keyPressed, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, setActiveaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected boolean dragging
protected Point dragRefPoint
public DragControl(HotSpot parent)
parent - The screen area that contains this drag control. Input events that cannot be handled by this object
will be passed to the parent. May be null.protected void beginDrag(Point point)
dragRefPoint.point - Point at which dragging started.protected abstract void drag(Point point)
point - Current drag point.protected void endDrag()
dragRefPoint to null.public boolean isDragging()
public void selected(SelectEvent event)
SelectEvent and call beginDrag(java.awt.Point), drag(java.awt.Point),
endDrag() as appropriate. Subclasses may override this method if they need to handle events other than
drag events.selected in interface SelectListenerselected in interface HotSpotselected in class TreeHotSpotevent - Select event.