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 doubleHIGHLIGHT_ATOM_RADIUSstatic intKEYSTROKEFONTSIZEstatic intMAX_CONNATOMSprotected Modelmodelstatic java.lang.StringUNKNOWN
-
Constructor Summary
Constructors Constructor Description DrawAction(Model m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddrawAtomHighlight(IDrawContext ctx, StereoMolecule mol, int theAtom)protected voiddrawAtomKeyStrokes(IDrawContext ctx, StereoMolecule mol, int theAtom)protected voiddrawBondHighlight(IDrawContext ctx, StereoMolecule mol, int theBond)intgetCursor()protected voidhighlightAtom(StereoMolecule mol, int atom)booleanisCommand()voidonActionEnter()voidonActionLeave()voidonCommand()booleanonDoubleClick(IMouseEvent ev)booleanonKeyPressed(IKeyEvent evt)booleanonKeyReleased(IKeyEvent evt)protected java.awt.geom.Point2DsuggestNewX2AndY2(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:
onKeyPressedin interfaceAction
-
onKeyReleased
public boolean onKeyReleased(IKeyEvent evt)
- Specified by:
onKeyReleasedin interfaceAction
-
onDoubleClick
public boolean onDoubleClick(IMouseEvent ev)
- Specified by:
onDoubleClickin interfaceAction
-
onActionLeave
public void onActionLeave()
- Specified by:
onActionLeavein interfaceAction
-
onActionEnter
public void onActionEnter()
- Specified by:
onActionEnterin 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)
-
-