ChemWriter v1.3.0

com.metamolecular.chemwriter.applet
Class PainterApplet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by com.metamolecular.chemwriter.applet.BaseApplet
                          extended by com.metamolecular.chemwriter.applet.PainterApplet
All Implemented Interfaces:
PaintStyler, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer

public class PainterApplet
extends BaseApplet

A 2D structure rendering applet. Renders structures without a user interface.

Author:
Richard L. Apodaca
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PainterApplet()
          Default constructor.
 
Method Summary
 int getBorderWidth()
          Returns the width of the invisible border around this PainterApplet.
 java.lang.String getMolfile()
          Returns the molfile representation of the molecule contained in this applet.
 void init()
           
 boolean isBlank()
          Returns true if this applet's canvas contains no molecule, or false otherwise.
 void setBorderWidth(int width)
          Places an invisible border around this PainterApplet with the indicated width.
 void setMolfile(java.lang.String molfile)
          Replaces the current molecule with one defined by molfile.
 
Methods inherited from class com.metamolecular.chemwriter.applet.BaseApplet
clearAtomColors, copyStyle, flash, getAppletInfo, getAtomColor, getAtomLabelFont, getAtomLabelFonts, getAtomLabelHeight, getBackgroundColor, getBondColor, getCapStyle, getColoredAtoms, getLineEndPadding, getLineOffset, getLineWidth, getParameterInfo, getStereoWidth, isAntialiasing, isAtomColoringEnabled, isCarbonVisible, isRenderVirtualHydrogens, isVirtualizeHydrogens, setAntialiasing, setAtomColor, setAtomColor, setAtomColoringEnabled, setAtomLabelFont, setAtomLabelHeight, setBackgroundColor, setBackgroundColor, setBondColor, setBondColor, setCapStyle, setCarbonVisible, setLineEndPadding, setLineOffset, setLineWidth, setRenderVirtualHydrogens, setStereoWidth, setVirtualizeHydrogens
 
Methods inherited from class javax.swing.JApplet
getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PainterApplet

public PainterApplet()
              throws java.awt.HeadlessException
Default constructor.

Throws:
java.awt.HeadlessException
Method Detail

isBlank

public boolean isBlank()
Description copied from class: BaseApplet
Returns true if this applet's canvas contains no molecule, or false otherwise.

Specified by:
isBlank in class BaseApplet
Returns:
true if this applet's canvas contains no molecule, or false otherwise

init

public void init()
Overrides:
init in class BaseApplet

getMolfile

public java.lang.String getMolfile()
Description copied from class: BaseApplet
Returns the molfile representation of the molecule contained in this applet.

Specified by:
getMolfile in class BaseApplet
Returns:
the molfile representation of the molecule contained in this applet
See Also:
MDL V2000 Molfile Specification

setMolfile

public void setMolfile(java.lang.String molfile)
Description copied from class: BaseApplet
Replaces the current molecule with one defined by molfile.

Specified by:
setMolfile in class BaseApplet
Parameters:
molfile - the molfile representation that will replace the current molecule
See Also:
MDL V2000 Molfile Specification

getBorderWidth

public int getBorderWidth()
Returns the width of the invisible border around this PainterApplet.

Returns:
the width of the invisible border around this PainterApplet
Since:
1.2

setBorderWidth

public void setBorderWidth(int width)
Places an invisible border around this PainterApplet with the indicated width.

Parameters:
width - the width of the invisible border
Since:
1.2

ChemWriter v1.3.0

Copyright © 2007, 2008 Metamolecular, LLC. All Rights Reserved.