|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DraggableManager
An interface which defines a manager whose responsibility is to enable
dragging for Component
's of a Container
which registers itself as the "draggable container"
Field Summary | |
---|---|
static byte |
STATE_DRAGGING
the component is being dragged |
static byte |
STATE_STILL
the component is not being dragged |
static byte |
STATE_UNKNOWN
the state of the component is unknown |
Method Summary | |
---|---|
boolean |
dragging()
Called while the Component is being dragged |
Container |
getDraggableContainer()
Returns the Container which has been registered as the "draggable container" |
DragPolicy |
getDragPolicy()
Returns the DragPolicy for which this manager obides by |
byte |
getState(Draggable draggableComponent)
Returns the state of the given Draggable component |
void |
registerDraggableContainer(Container draggableContainer)
Registers the given Container with this manager to enable the
container's Draggable components to be draggable |
void |
setDragPolicy(DragPolicy dragPolicy)
Set the policy for which components are eligible for dragging |
void |
setNullifyLayout(boolean nullifyLayout)
Sets whether the "draggable container" layout manager should be set to null once a component is dragged, or not. |
boolean |
shouldNullifyLayout()
Returns the "nullify layout" value |
boolean |
startDrag(Component componentToDrag)
Called before a Component is actually dragged |
boolean |
stopDrag()
Called when a Component has stopped being dragged |
void |
unregisterDraggableContainer(Container draggableContainer)
Un-Registers the given Container from this manager which stops
this manager from managing the container |
Methods inherited from interface java.awt.event.ContainerListener |
---|
componentAdded, componentRemoved |
Field Detail |
---|
static final byte STATE_UNKNOWN
static final byte STATE_STILL
static final byte STATE_DRAGGING
Method Detail |
---|
Container getDraggableContainer()
Container
which has been registered as the "draggable container"
Container
which was registered as the "draggable container"
or null
if no Container
is registeredboolean startDrag(Component componentToDrag)
Component
is actually dragged
componentToDrag
- the component which was chosen to be dragged
true
if the "drag" can continue, false
otherwiseboolean dragging()
Component
is being dragged
true
if the dragging can continue,
false
otherwiseboolean stopDrag()
Component
has stopped being dragged
true
if no errors occurred when the drag completed,
false
otherwisevoid registerDraggableContainer(Container draggableContainer)
Container
with this manager to enable the
container's Draggable
components to be draggable
draggableContainer
- the Container
whose Draggable
components should be able to be draggedvoid unregisterDraggableContainer(Container draggableContainer)
Container
from this manager which stops
this manager from managing the container
draggableContainer
- the Container
to unregisterbyte getState(Draggable draggableComponent)
Draggable
component
draggableComponent
- the Draggable
whose state
is of interest
draggableComponent
as defined in this
interfaceSTATE_DRAGGING
,
STATE_STILL
,
STATE_UNKNOWN
void setDragPolicy(DragPolicy dragPolicy)
dragPolicy
- the policy to setgetDragPolicy()
,
DragPolicy
DragPolicy getDragPolicy()
DragPolicy
for which this manager obides by
DragPolicy
for this managersetDragPolicy(DragPolicy)
,
DragPolicy
boolean shouldNullifyLayout()
true
to nullify the layout manager of the "draggable
container", false
otherwisevoid setNullifyLayout(boolean nullifyLayout)
null
once a component is dragged, or not.
null
, the components
may lose their "dragged" position if the container is resized.
true
nullifyLayout
- true
to nullify the layout manager,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |