|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEventSource
artofillusion.ui.NinePointManipulator
public class NinePointManipulator
This class displays a set of handles around a selection in a ViewerCanvas. It processes mouse clicks on them, and translates them into higher level events which are dispatched for further processing, most often by an EditingTool. As the name suggests, this manipulator can display up to nine handles, corresponding to the eight compass points plus center.
Nested Class Summary | |
---|---|
class |
NinePointManipulator.HandleDraggedEvent
This is the event class generated when the user drags on a handle. |
class |
NinePointManipulator.HandleEvent
This is the superclass of the various events generated by the manipulator. |
static class |
NinePointManipulator.HandlePosition
Instances of this class represent the nine handle positions. |
class |
NinePointManipulator.HandlePressedEvent
This is the event class generated when the user clicks on a handle. |
class |
NinePointManipulator.HandleReleasedEvent
This is the event class generated when the user releases on a handle. |
Constructor Summary | |
---|---|
NinePointManipulator(java.awt.Image[] images)
Create a new NinePointManipulator. |
Method Summary | |
---|---|
void |
draw(ViewerCanvas view,
BoundingBox selectionBounds)
Draw the handles onto a ViewerCanvas. |
void |
mouseDragged(WidgetMouseEvent ev,
ViewerCanvas view)
This should be invoked when the mouse is dragged. |
boolean |
mousePressed(WidgetMouseEvent ev,
ViewerCanvas view,
BoundingBox selectionBounds)
This should be invoked when the mouse is pressed. |
void |
mouseReleased(WidgetMouseEvent ev,
ViewerCanvas view)
This should be invoked when the mouse is released. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Image ARROWS_N_S
public static final java.awt.Image ARROWS_E_W
public static final java.awt.Image ARROWS_NW_SE
public static final java.awt.Image ARROWS_NE_SW
public static final java.awt.Image ARROWS_N_W
public static final java.awt.Image ARROWS_N_E
public static final java.awt.Image ARROWS_S_W
public static final java.awt.Image ARROWS_S_E
public static final java.awt.Image ARROWS_ALL
public static final java.awt.Image ROTATE_TOP
public static final java.awt.Image ROTATE_BOTTOM
public static final java.awt.Image ROTATE_LEFT
public static final java.awt.Image ROTATE_RIGHT
public static final java.awt.Image ROTATE_TOPLEFT
public static final java.awt.Image ROTATE_TOPRIGHT
public static final java.awt.Image ROTATE_BOTTOMLEFT
public static final java.awt.Image ROTATE_BOTTOMRIGHT
public static final NinePointManipulator.HandlePosition NW
public static final NinePointManipulator.HandlePosition N
public static final NinePointManipulator.HandlePosition NE
public static final NinePointManipulator.HandlePosition W
public static final NinePointManipulator.HandlePosition CENTER
public static final NinePointManipulator.HandlePosition E
public static final NinePointManipulator.HandlePosition SW
public static final NinePointManipulator.HandlePosition S
public static final NinePointManipulator.HandlePosition SE
Constructor Detail |
---|
public NinePointManipulator(java.awt.Image[] images)
images
- an array of images to use for the nine handles in the following order:
NW, N, NE, W, CENTER, E, SW, S, SE. If an element is null, there will
not be any handle at the corresponding position. All images should be
of the same size.Method Detail |
---|
public void draw(ViewerCanvas view, BoundingBox selectionBounds)
draw
in interface Manipulator
view
- the canvas onto which to draw the handlesselectionBounds
- a BoundingBox enclosing whatever is selected in the canvaspublic boolean mousePressed(WidgetMouseEvent ev, ViewerCanvas view, BoundingBox selectionBounds)
mousePressed
in interface Manipulator
ev
- the event which has occurredview
- the ViewerCanvas in which the event occurredselectionBounds
- a BoundingBox enclosing whatever is selected in the canvas
public void mouseDragged(WidgetMouseEvent ev, ViewerCanvas view)
mouseDragged
in interface Manipulator
ev
- the event which has occurredview
- the ViewerCanvas in which the event occurredpublic void mouseReleased(WidgetMouseEvent ev, ViewerCanvas view)
mouseReleased
in interface Manipulator
ev
- the event which has occurredview
- the ViewerCanvas in which the event occurred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |