org.jmol.appletwrapper
Class AppletWrapper

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 org.jmol.appletwrapper.AppletWrapper
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AppletWrapper
extends Applet

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  Color bgcolor
           
private  int clockBaseline
           
private  int clockWidth
           
private  int clockX
           
private static String[] colorNames
           
private static Color[] colors
           
private  Font font
           
private  int fontAscent
           
private static String fontFace
           
private  int fontHeight
           
private  FontMetrics fontMetrics
           
private  int fontSize
           
private static int fontSizeDivisor
           
private  boolean isSigned
           
private  MediaTracker mediaTracker
           
private static int MINIMUM_ELAPSED_SECONDS
           
private  boolean needToCompleteInitialization
           
private  int preloadClassIndex
           
private  String[] preloadClassNames
           
private  Image preloadImage
           
private  String preloadImageName
           
private  boolean preloadImagePainted
           
private  boolean preloadImageReadyForDisplay
           
private  String preloadTextMessage
           
private  int preloadThreadCount
           
private  String previousClassName
           
private  long startTime
           
private  Color textColor
           
 WrappedApplet wrappedApplet
           
private  String wrappedAppletClassName
           
 
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
AppletWrapper(String wrappedAppletClassName, String preloadImageName, int preloadThreadCount, String[] preloadClassNames)
           
 
Method Summary
private  boolean completeInitialization(Graphics g, Dimension dim)
           
 void destroy()
           
 String getAppletInfo()
           
private  Color getColorFromName(String strColor)
           
private  Color getContrastingBlackOrWhite(Color color)
           
(package private)  String getNextPreloadClassName()
           
 boolean handleEvent(Event e)
           
 void init()
           
 boolean isSigned()
           
 void paint(Graphics g)
           
(package private)  void repaintClock()
           
 void update(Graphics g)
           
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, 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, addImpl, 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, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wrappedAppletClassName

private String wrappedAppletClassName

preloadImageName

private String preloadImageName

preloadTextMessage

private String preloadTextMessage

preloadThreadCount

private int preloadThreadCount

preloadClassNames

private String[] preloadClassNames

preloadClassIndex

private int preloadClassIndex

previousClassName

private String previousClassName

needToCompleteInitialization

private boolean needToCompleteInitialization

preloadImageReadyForDisplay

private boolean preloadImageReadyForDisplay

preloadImagePainted

private boolean preloadImagePainted

preloadImage

private Image preloadImage

mediaTracker

private MediaTracker mediaTracker

bgcolor

private Color bgcolor

textColor

private Color textColor

wrappedApplet

public WrappedApplet wrappedApplet

startTime

private long startTime

clockX

private int clockX

clockBaseline

private int clockBaseline

clockWidth

private int clockWidth

MINIMUM_ELAPSED_SECONDS

private static int MINIMUM_ELAPSED_SECONDS

fontFace

private static String fontFace

fontSizeDivisor

private static int fontSizeDivisor

fontSize

private int fontSize

font

private Font font

fontMetrics

private FontMetrics fontMetrics

fontAscent

private int fontAscent

fontHeight

private int fontHeight

isSigned

private boolean isSigned

colorNames

private static final String[] colorNames

colors

private static final Color[] colors
Constructor Detail

AppletWrapper

public AppletWrapper(String wrappedAppletClassName,
                     String preloadImageName,
                     int preloadThreadCount,
                     String[] preloadClassNames)
Method Detail

destroy

public void destroy()
Overrides:
destroy in class Applet

isSigned

public boolean isSigned()

getAppletInfo

public String getAppletInfo()
Overrides:
getAppletInfo in class Applet

init

public void init()
Overrides:
init in class Applet

update

public void update(Graphics g)
Overrides:
update in class Container

paint

public void paint(Graphics g)
Overrides:
paint in class Container

repaintClock

void repaintClock()

completeInitialization

private boolean completeInitialization(Graphics g,
                                       Dimension dim)

getColorFromName

private Color getColorFromName(String strColor)

getContrastingBlackOrWhite

private Color getContrastingBlackOrWhite(Color color)

handleEvent

public boolean handleEvent(Event e)
Overrides:
handleEvent in class Component

getNextPreloadClassName

String getNextPreloadClassName()