|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.ModeImpl
org.tigris.gef.base.FigModifyingModeImpl
org.tigris.gef.base.ModeCreate
org.tigris.gef.base.ModeCreateFigInk
A Mode to interpert user input while creating a FigInk. When creating a FigInk, new points are being added on mouseDragged, and a single mouseReleased ends the Mode. A new point is added whenever the mouse moves a minimum distance.
Field Summary | |
protected int |
_lastX
The position of the last point that was added. |
protected int |
_lastY
The position of the last point that was added. |
static int |
MIN_DELTA
the minium distance that the mouse must move before a new point is added. |
Fields inherited from class org.tigris.gef.base.ModeCreate |
_defaultHeight, _defaultWidth, _newItem, anchorX, anchorY |
Fields inherited from class org.tigris.gef.base.FigModifyingModeImpl |
editor |
Fields inherited from class org.tigris.gef.base.ModeImpl |
_args |
Constructor Summary | |
ModeCreateFigInk()
|
Method Summary | |
org.tigris.gef.presentation.Fig |
createNewItem(java.awt.event.MouseEvent me,
int snapX,
int snapY)
Create a new FigInk instance based on the given mouse down event and the state of the parent Editor. |
protected void |
creationDrag(int x,
int y)
Update the new item to reflect the new mouse position. |
java.lang.String |
instructions()
Reply a string of instructions that should be shown in the statusbar when this mode starts. |
void |
mouseDragged(java.awt.event.MouseEvent me)
Dragging adds points to the ink. |
protected boolean |
nearLast(int x,
int y)
Internal function to test if the current point is so close to the last point that it should not be added to the ink. |
Methods inherited from class org.tigris.gef.base.ModeCreate |
getInitialCursor, keyPressed, mousePressed, mouseReleased, paint |
Methods inherited from class org.tigris.gef.base.FigModifyingModeImpl |
done, getEditor, isFigEnclosedIn, print, setCursor, setEditor |
Methods inherited from class org.tigris.gef.base.ModeImpl |
canExit, getArg, getArgs, init, keyReleased, keyTyped, leave, mouseClicked, mouseEntered, mouseExited, mouseMoved, setArg, setArgs, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.tigris.gef.base.Mode |
canExit, getArg, getArgs, init, setArg, setArgs, start |
Field Detail |
public static final int MIN_DELTA
protected int _lastX
protected int _lastY
Constructor Detail |
public ModeCreateFigInk()
Method Detail |
public java.lang.String instructions()
FigModifyingModeImpl
instructions
in interface FigModifyingMode
instructions
in class FigModifyingModeImpl
public org.tigris.gef.presentation.Fig createNewItem(java.awt.event.MouseEvent me, int snapX, int snapY)
createNewItem
in class ModeCreate
protected void creationDrag(int x, int y)
ModeCreate
creationDrag
in class ModeCreate
ModeCreate.creationDrag(int, int)
public void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class ModeCreate
protected boolean nearLast(int x, int y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |