Logo Search packages:      
Sourcecode: cdk version File versions  Download package

org::openscience::cdk::controller::AbstractController2D Class Reference

Inheritance diagram for org::openscience::cdk::controller::AbstractController2D:

org::openscience::cdk::controller::SimpleController2D org::openscience::cdk::controller::Controller2D org::openscience::cdk::controller::PopupController2D

List of all members.


Detailed Description

Class that acts on MouseEvents and KeyEvents.

Author:
steinbeck

egonw .created 2005-05-02 .keyword mouse events .require java1.4+ .module control .bug 1562511

Definition at line 111 of file AbstractController2D.java.


Public Member Functions

void addCDKChangeListener (ICDKChangeListener listener)
void fireChange ()
IChemModel getChemModel ()
IChemObject getChemObjectInRange (int X, int Y)
Controller2DModel getController2DModel ()
HashMap getFuncgroupsmap ()
int[] getWorldCoordinates (int[] coords)
boolean isUndoableChange ()
void keyPressed (KeyEvent e)
void keyReleased (KeyEvent e)
void keyTyped (KeyEvent e)
void mouseClicked (MouseEvent e)
void mouseDragged (MouseEvent event)
void mouseEntered (MouseEvent e)
void mouseExited (MouseEvent e)
void mouseMoved (MouseEvent event)
void mousePressed (MouseEvent event)
void mouseReleased (MouseEvent event)
void removeCDKChangeListener (ICDKChangeListener listener)
void setChemModel (IChemModel chemModel)
void setController2DModel (Controller2DModel model)
void setFuncgroupsmap (HashMap funcgroupsmap)
void setUndoableChange (boolean isUndoable)
void setUndoRedoHandler (IUndoRedoHandler undoRedoHandler)
void updateAtom (IAtomContainer container, IAtom atom)

Protected Attributes

IChemModel chemModel
Vector lastAction = null
JButton moveButton = null

Package Functions

 AbstractController2D (Renderer2DModel r2dm, Controller2DModel c2dm)
 AbstractController2D (Controller2DModel c2dm)
void centerAtom (IAtom atom, IChemModel chemModel)
IRing createAttachRing (IAtomContainer sharedAtoms, int ringSize, String symbol)
void createNewBond (int startX, int startY, int endX, int endY)
void drawProposedBond (int startX, int startY, int mouseX, int mouseY)
Point2d getConnectedAtomsCenter (IAtomContainer sharedAtoms)
IAtomContainer getContainedAtoms (Polygon polygon)
IAtomContainer getHighlighted ()
abstract IReaction getReactionInRange (int X, int Y)
abstract IReaction getRelevantReaction (IChemModel model, IAtom atom)
void handleMapping (boolean wasDragged, Renderer2DModel r2dm)
void highlightNearestChemObject (int mouseX, int mouseY)
void moveSelectedAtomsWith (int deltaX, int deltaY)
void selectNearestChemObjectIfNoneSelected (int mouseX, int mouseY)
void selectRectangularArea (int startX, int startY, int mouseX, int mouseY)

Package Attributes

Controller2DModel c2dm
HydrogenAdder hydrogenAdder = new HydrogenAdder("org.openscience.cdk.tools.ValencyChecker")
boolean isUndoableChange = false
IAtom lastAtomInRange = null
double moveoldX
double moveoldY
Renderer2DModel r2dm
boolean wasDragged = false

Private Member Functions

void changeElement ()
void changeSymbol ()
void decreaseCharge ()
void dragAndDropSelection ()
void drawBond (int mouseX, int mouseY)
void drawRing (int mouseX, int mouseY)
void enterElement ()
void eraseSelection ()
IAtom getAtomInRange (int X, int Y, IAtom ignore)
IAtom getAtomInRange (int X, int Y)
IBond getBondInRange (int X, int Y)
void increaseCharge ()
void lassoSelection ()
void makeRingAromatic (IRing ring)
void mergeMolecules ()
void shiftMolecule ()
void singleObjectSelected (int mouseX, int mouseY)
double snapAngle (double angle)
void updateAtoms (IAtomContainer container, java.util.Iterator atoms)
void updateMoleculeCoordinates ()

Private Attributes

Vector commonElements
HashMap currentCommonElement = new HashMap()
boolean draggingSelected = true
int dragMode = DRAG_UNSET
HashMap funcgroupsmap = new HashMap()
IAtomContainer getBondInRangeTemporaryAtomContainer = null
Vector listeners = new Vector()
LoggingTool logger
int prevDragCoordX = 0
int prevDragCoordY = 0
double shiftX = 0
double shiftY = 0
IUndoRedoHandler undoRedoHandler

Static Private Attributes

static final int DRAG_DRAWING_PROPOSED_ATOMATOMMAP = 6
static final int DRAG_DRAWING_PROPOSED_BOND = 2
static final int DRAG_DRAWING_PROPOSED_RING = 3
static final int DRAG_MAKING_LASSO_SELECTION = 5
static final int DRAG_MAKING_SQUARE_SELECTION = 4
static final int DRAG_MOVING_SELECTED = 1
static final int DRAG_ROTATE = 7
static final int DRAG_UNSET = 0

Classes

class  EnterElementOrGroupDialog

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index