|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.event.ZCompositeSelectionHandler
ZCompositeSelectionHandler
is a convenience class that allows applications to use a single event handler to manage the multiple jazz selection event handlers.
ZSelectionManager
, ZSelectionModifyHandler
, ZSelectionMoveHandler
, ZSelectionDeleteHandler
, ZSelectionScaleHandler
, ZSelectionResizeHandler
, Serialized Form
Field Summary | |
protected boolean |
active true when event handler is active |
static int |
ALL_AVAILABLE Flag used to indicate all available selection behaviors |
protected ZCanvas |
canvas canvas this event handler attaches to |
static int |
DELETE Flag used to indicate selection deletion |
protected ZLayerGroup |
layer Marquee layer |
static int |
MODIFY Flag used to indicate selection modification |
static int |
MOVE Flag used to indicate selection movement |
protected ZNode |
node node this event handler attaches to |
static int |
RESIZE Flag used to indicate selection resizing |
static int |
SCALE Flag used to indicate selection keyboard scaling |
Constructor Summary | |
ZCompositeSelectionHandler(ZNode node, ZCanvas canvas, ZLayerGroup marqueeLayer) Creates a composite selection handler with all available selection event handler types enabled. |
|
ZCompositeSelectionHandler(ZNode node, ZCanvas canvas, ZLayerGroup marqueeLayer, int flags) Creates a composite selection handler with the specified enabled selection event handler types. |
Method Summary | |
protected ZSelectionDeleteHandler |
createSelectionDeleteHandler() |
protected ZSelectionModifyHandler |
createSelectionModifyHandler() |
protected ZSelectionMoveHandler |
createSelectionMoveHandler() |
protected ZSelectionResizeHandler |
createSelectionResizeHandler() |
protected ZSelectionScaleHandler |
createSelectionScaleHandler() |
ZLayerGroup |
getMarqueeLayer() |
ZSelectionDeleteHandler |
getSelectionDeleteHandler() This method returns the current selection delete handler if ZCompositeSelectionHandler.DELETE is enabled. |
ZSelectionModifyHandler |
getSelectionModifyHandler() This method returns the current selection modify handler if ZCompositeSelectionHandler.MODIFY is enabled. |
ZSelectionMoveHandler |
getSelectionMoveHandler() This method returns the current selection move handler if ZCompositeSelectionHandler.MOVE is enabled. |
ZSelectionResizeHandler |
getSelectionResizeHandler() This method returns the current selection resize handler if ZCompositeSelectionHandler.RESIZE is enabled. |
ZSelectionScaleHandler |
getSelectionScaleHandler() This method returns the current selection scale handler if ZCompositeSelectionHandler.SCALE is enabled. |
boolean |
isActive() Determines if this event handler is active. |
void |
setActive(boolean active) Specifies whether this event handler is active |
void |
setEnabled(int flags, boolean enable) Sets whether the specified event handlers are enabled. |
void |
setMarqueeLayer(ZLayerGroup layer) Sets the marquee layer for this event handler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MODIFY
public static final int MOVE
public static final int SCALE
public static final int DELETE
public static final int RESIZE
public static final int ALL_AVAILABLE
protected boolean active
protected ZNode node
protected ZCanvas canvas
protected ZLayerGroup layer
Constructor Detail |
public ZCompositeSelectionHandler(ZNode node, ZCanvas canvas, ZLayerGroup marqueeLayer)
node
- The node to which this event hander attachescanvas
- The canvas for which this event handler is activemarqueeLayer
- The layer on which marquee selection is drawnpublic ZCompositeSelectionHandler(ZNode node, ZCanvas canvas, ZLayerGroup marqueeLayer, int flags)
flags
include boolean combinations of MOVE
, MODIFY
, SCALE
, DELETE
, and ALL_AVAILABLE
.
node
- The node to which this event hander attachescanvas
- The canvas for which this event handler is activemarqueeLayer
- The layer on which marquee selection is drawnflags
- The event handlers to enableMethod Detail |
public void setActive(boolean active)
setActive
in interface ZEventHandler
active
- True to make this event handler activepublic boolean isActive()
isActive
in interface ZEventHandler
public ZLayerGroup getMarqueeLayer()
public void setMarqueeLayer(ZLayerGroup layer)
layer
- The new marquee layerpublic void setEnabled(int flags, boolean enable)
flags
include boolean combinations of MOVE
, MODIFY
, SCALE
, DELETE
, and ALL_AVAILABLE
.
flags
- The event handlers to enable or disableenable
- Should the specified event handlers be enabled or disabledpublic ZSelectionModifyHandler getSelectionModifyHandler()
ZCompositeSelectionHandler.MODIFY
is enabled. Otherwise it returns null.
public ZSelectionMoveHandler getSelectionMoveHandler()
ZCompositeSelectionHandler.MOVE
is enabled. Otherwise it returns null.
public ZSelectionScaleHandler getSelectionScaleHandler()
ZCompositeSelectionHandler.SCALE
is enabled. Otherwise it returns null.
public ZSelectionDeleteHandler getSelectionDeleteHandler()
ZCompositeSelectionHandler.DELETE
is enabled. Otherwise it returns null.
public ZSelectionResizeHandler getSelectionResizeHandler()
ZCompositeSelectionHandler.RESIZE
is enabled. Otherwise it returns null.
protected ZSelectionMoveHandler createSelectionMoveHandler()
protected ZSelectionResizeHandler createSelectionResizeHandler()
protected ZSelectionModifyHandler createSelectionModifyHandler()
protected ZSelectionScaleHandler createSelectionScaleHandler()
protected ZSelectionDeleteHandler createSelectionDeleteHandler()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |