Package com.actelion.research.gui
Class JDrawArea
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- com.actelion.research.gui.JDrawArea
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
@Deprecated public class JDrawArea extends javax.swing.JPanel implements java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Deprecated.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description static int
MODE_DRAWING_OBJECTS
Deprecated.static int
MODE_MARKUSH_STRUCTURE
Deprecated.static int
MODE_MULTIPLE_FRAGMENTS
Deprecated.static int
MODE_REACTION
Deprecated.protected static int
UPDATE_CHECK_COORDS
Deprecated.protected static int
UPDATE_CHECK_VIEW
Deprecated.protected static int
UPDATE_INVENT_COORDS
Deprecated.protected static int
UPDATE_NONE
Deprecated.protected static int
UPDATE_REDRAW
Deprecated.protected static int
UPDATE_SCALE_COORDS
Deprecated.protected static int
UPDATE_SCALE_COORDS_USE_FRAGMENTS
Deprecated.-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description JDrawArea(StereoMolecule mol, int mode)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
Deprecated.void
addDrawAreaListener(DrawAreaListener l)
Deprecated.protected void
buttonPressed(int button)
Deprecated.static java.awt.Color
chainHiliteColor()
Deprecated.void
clearAll()
Deprecated.int
getDisplayMode()
Deprecated.DrawingObjectList
getDrawingObjects()
Deprecated.StereoMolecule[]
getFragments()
Deprecated.int
getHiliteAtom()
Deprecated.int
getHiliteBond()
Deprecated.MarkushStructure
getMarkushStructure()
Deprecated.int
getMode()
Deprecated.StereoMolecule
getMolecule()
Deprecated.Reaction
getReaction()
Deprecated.Reaction
getReactionAndDrawings()
Deprecated.boolean
isAtomColorSupported()
Deprecated.void
keyPressed(java.awt.event.KeyEvent e)
Deprecated.void
keyReleased(java.awt.event.KeyEvent e)
Deprecated.void
keyTyped(java.awt.event.KeyEvent e)
Deprecated.static java.awt.Color
lassoColor()
Deprecated.static java.awt.Color
mapToolColor()
Deprecated.void
moleculeChanged()
Deprecated.Use this to inform the JDrawArea after changing its molecule from outside.void
moleculeChanged(boolean userChange)
Deprecated.Ideally don't use this from outside JDrawArea.void
mouseClicked(java.awt.event.MouseEvent e)
Deprecated.void
mouseDragged(java.awt.event.MouseEvent e)
Deprecated.void
mouseEntered(java.awt.event.MouseEvent e)
Deprecated.void
mouseExited(java.awt.event.MouseEvent e)
Deprecated.void
mouseMoved(java.awt.event.MouseEvent e)
Deprecated.void
mousePressed(java.awt.event.MouseEvent e)
Deprecated.void
mouseReleased(java.awt.event.MouseEvent e)
Deprecated.void
paintComponent(java.awt.Graphics g)
Deprecated.protected void
restoreState()
Deprecated.static java.awt.Color
selectionColor()
Deprecated.void
setAllowQueryFeatures(boolean allow)
Deprecated.If set to false then any query features will be removed from the molecule and any functionality that allows to define atom- or bond-query features won't be available.void
setAtomColorSupported(boolean acs)
Deprecated.void
setAtomText(java.lang.String[] atomText)
Deprecated.Defines additional atom text to be displayed in top right position of some/all atom label.void
setClipboardHandler(IClipboardHandler h)
Deprecated.Call this after initialization to get clipboard supportvoid
setDisplayMode(int dMode)
Deprecated.void
setDrawingObjects(DrawingObjectList drawingObjectList)
Deprecated.void
setFragments(StereoMolecule[] fragment)
Deprecated.void
setHiliteBondSet(int[] bondSet)
Deprecated.void
setMarkushStructure(MarkushStructure markush)
Deprecated.void
setMolecule(StereoMolecule theMolecule)
Deprecated.void
setReaction(Reaction rxn)
Deprecated.static void
setReactionMapper(IReactionMapper mapper)
Deprecated.void
setReactionMode(boolean rxn)
Deprecated.protected void
setUpdateMode(int mode)
Deprecated.void
showHelpDialog()
Deprecated.void
storeState()
Deprecated.void
toolChanged(int newTool)
Deprecated.-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
MODE_MULTIPLE_FRAGMENTS
public static final int MODE_MULTIPLE_FRAGMENTS
Deprecated.- See Also:
- Constant Field Values
-
MODE_MARKUSH_STRUCTURE
public static final int MODE_MARKUSH_STRUCTURE
Deprecated.- See Also:
- Constant Field Values
-
MODE_REACTION
public static final int MODE_REACTION
Deprecated.- See Also:
- Constant Field Values
-
MODE_DRAWING_OBJECTS
public static final int MODE_DRAWING_OBJECTS
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_NONE
protected static final int UPDATE_NONE
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_REDRAW
protected static final int UPDATE_REDRAW
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_CHECK_VIEW
protected static final int UPDATE_CHECK_VIEW
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_CHECK_COORDS
protected static final int UPDATE_CHECK_COORDS
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_SCALE_COORDS
protected static final int UPDATE_SCALE_COORDS
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_SCALE_COORDS_USE_FRAGMENTS
protected static final int UPDATE_SCALE_COORDS_USE_FRAGMENTS
Deprecated.- See Also:
- Constant Field Values
-
UPDATE_INVENT_COORDS
protected static final int UPDATE_INVENT_COORDS
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JDrawArea
public JDrawArea(StereoMolecule mol, int mode)
Deprecated.- Parameters:
mol
- an empty or valid stereo moleculemode
- 0 or a meaningful combination of the mode flags, e.g. MODE_REACTION | MODE_DRAWING_OBJECTS
-
-
Method Detail
-
setClipboardHandler
public void setClipboardHandler(IClipboardHandler h)
Deprecated.Call this after initialization to get clipboard support- Parameters:
h
-
-
setReactionMapper
public static void setReactionMapper(IReactionMapper mapper)
Deprecated.
-
paintComponent
public void paintComponent(java.awt.Graphics g)
Deprecated.- Overrides:
paintComponent
in classjavax.swing.JComponent
-
lassoColor
public static java.awt.Color lassoColor()
Deprecated.
-
selectionColor
public static java.awt.Color selectionColor()
Deprecated.
-
mapToolColor
public static java.awt.Color mapToolColor()
Deprecated.
-
chainHiliteColor
public static java.awt.Color chainHiliteColor()
Deprecated.
-
addDrawAreaListener
public void addDrawAreaListener(DrawAreaListener l)
Deprecated.
-
buttonPressed
protected void buttonPressed(int button)
Deprecated.
-
clearAll
public void clearAll()
Deprecated.
-
toolChanged
public void toolChanged(int newTool)
Deprecated.
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Deprecated.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
Deprecated.- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
Deprecated.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
-
showHelpDialog
public void showHelpDialog()
Deprecated.
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
Deprecated.- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
Deprecated.- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
-
restoreState
protected void restoreState()
Deprecated.
-
storeState
public void storeState()
Deprecated.
-
moleculeChanged
public void moleculeChanged()
Deprecated.Use this to inform the JDrawArea after changing its molecule from outside.
-
moleculeChanged
public void moleculeChanged(boolean userChange)
Deprecated.Ideally don't use this from outside JDrawArea. Use moleculeChanged() instead.- Parameters:
userChange
- is true if the change was done within the editor
-
getMolecule
public StereoMolecule getMolecule()
Deprecated.
-
setMolecule
public void setMolecule(StereoMolecule theMolecule)
Deprecated.
-
getFragments
public StereoMolecule[] getFragments()
Deprecated.
-
setFragments
public void setFragments(StereoMolecule[] fragment)
Deprecated.
-
getReaction
public Reaction getReaction()
Deprecated.- Returns:
- mapped reaction with absolute coordinates, but without drawing objects
-
getReactionAndDrawings
public Reaction getReactionAndDrawings()
Deprecated.- Returns:
- mapped reaction with absolute coordinates and drawing objects
-
setReaction
public void setReaction(Reaction rxn)
Deprecated.
-
getMarkushStructure
public MarkushStructure getMarkushStructure()
Deprecated.
-
setMarkushStructure
public void setMarkushStructure(MarkushStructure markush)
Deprecated.
-
getDisplayMode
public int getDisplayMode()
Deprecated.
-
setDisplayMode
public void setDisplayMode(int dMode)
Deprecated.
-
setAllowQueryFeatures
public void setAllowQueryFeatures(boolean allow)
Deprecated.If set to false then any query features will be removed from the molecule and any functionality that allows to define atom- or bond-query features won't be available. This feature is only relevant if the molecule is a fragment.- Parameters:
allow
-
-
setAtomText
public void setAtomText(java.lang.String[] atomText)
Deprecated.Defines additional atom text to be displayed in top right position of some/all atom label. If the atom is charged, then the atom text follows the charge information. If using atom text make sure to update it accordingly, if atom indexes change due to molecule changes. Atom text is not supported for MODE_REACTION, MODE_MULTIPLE_FRAGMENTS or MODE_MARKUSH_STRUCTURE.- Parameters:
atomText
- String[] matching atom indexes (may contain null entries)
-
getDrawingObjects
public DrawingObjectList getDrawingObjects()
Deprecated.
-
setDrawingObjects
public void setDrawingObjects(DrawingObjectList drawingObjectList)
Deprecated.
-
getMode
public int getMode()
Deprecated.
-
getHiliteAtom
public int getHiliteAtom()
Deprecated.
-
getHiliteBond
public int getHiliteBond()
Deprecated.
-
setHiliteBondSet
public void setHiliteBondSet(int[] bondSet)
Deprecated.
-
setReactionMode
public void setReactionMode(boolean rxn)
Deprecated.
-
setUpdateMode
protected void setUpdateMode(int mode)
Deprecated.
-
isAtomColorSupported
public boolean isAtomColorSupported()
Deprecated.
-
setAtomColorSupported
public void setAtomColorSupported(boolean acs)
Deprecated.
-
-