Class DrawAction
- java.lang.Object
-
- com.actelion.research.share.gui.editor.actions.DrawAction
-
- All Implemented Interfaces:
Action
- Direct Known Subclasses:
ArrowAction
,AtomHighlightAction
,ZoomRotateAction
public abstract class DrawAction extends java.lang.Object implements Action
Basic class which handles all actions which interact with the drawing surface
-
-
Field Summary
Fields Modifier and Type Field Description static double
HIGHLIGHT_ATOM_RADIUS
static int
KEYSTROKEFONTSIZE
static int
MAX_CONNATOMS
protected Model
model
static java.lang.String
UNKNOWN
-
Constructor Summary
Constructors Constructor Description DrawAction(Model m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
drawAtomHighlight(IDrawContext ctx, StereoMolecule mol, int theAtom)
protected void
drawAtomKeyStrokes(IDrawContext ctx, StereoMolecule mol, int theAtom)
protected void
drawBondHighlight(IDrawContext ctx, StereoMolecule mol, int theBond)
int
getCursor()
protected void
highlightAtom(StereoMolecule mol, int atom)
boolean
isCommand()
void
onActionEnter()
void
onActionLeave()
void
onCommand()
boolean
onDoubleClick(IMouseEvent ev)
boolean
onKeyPressed(IKeyEvent evt)
boolean
onKeyReleased(IKeyEvent evt)
protected java.awt.geom.Point2D
suggestNewX2AndY2(int atom)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.actelion.research.share.gui.editor.actions.Action
onMouseDown, onMouseMove, onMouseUp, paint
-
-
-
-
Field Detail
-
HIGHLIGHT_ATOM_RADIUS
public static final double HIGHLIGHT_ATOM_RADIUS
- See Also:
- Constant Field Values
-
MAX_CONNATOMS
public static final int MAX_CONNATOMS
- See Also:
- Constant Field Values
-
UNKNOWN
public static final java.lang.String UNKNOWN
- See Also:
- Constant Field Values
-
KEYSTROKEFONTSIZE
public static final int KEYSTROKEFONTSIZE
- See Also:
- Constant Field Values
-
model
protected Model model
-
-
Constructor Detail
-
DrawAction
public DrawAction(Model m)
-
-
Method Detail
-
onKeyPressed
public boolean onKeyPressed(IKeyEvent evt)
- Specified by:
onKeyPressed
in interfaceAction
-
onKeyReleased
public boolean onKeyReleased(IKeyEvent evt)
- Specified by:
onKeyReleased
in interfaceAction
-
onDoubleClick
public boolean onDoubleClick(IMouseEvent ev)
- Specified by:
onDoubleClick
in interfaceAction
-
onActionLeave
public void onActionLeave()
- Specified by:
onActionLeave
in interfaceAction
-
onActionEnter
public void onActionEnter()
- Specified by:
onActionEnter
in interfaceAction
-
drawBondHighlight
protected void drawBondHighlight(IDrawContext ctx, StereoMolecule mol, int theBond)
-
highlightAtom
protected void highlightAtom(StereoMolecule mol, int atom)
-
drawAtomHighlight
protected void drawAtomHighlight(IDrawContext ctx, StereoMolecule mol, int theAtom)
-
drawAtomKeyStrokes
protected void drawAtomKeyStrokes(IDrawContext ctx, StereoMolecule mol, int theAtom)
-
suggestNewX2AndY2
protected java.awt.geom.Point2D suggestNewX2AndY2(int atom)
-
-