Package org.jmol.applet
Class AppletWrapper
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Panel
-
- java.applet.Applet
-
- javax.swing.JApplet
-
- org.jmol.applet.AppletWrapper
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
- Direct Known Subclasses:
JmolApplet
public class AppletWrapper extends javax.swing.JApplet
Using Applet only because originally there was the possibility of non-Swing versions of the JRE being used. No real difference, I think.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
-
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Color
bgcolor
private int
clockBaseline
private int
clockWidth
private int
clockX
private static java.lang.String[]
colorNames
private static java.awt.Color[]
colors
private java.awt.Font
font
private int
fontAscent
private static java.lang.String
fontFace
private int
fontHeight
private java.awt.FontMetrics
fontMetrics
private int
fontSize
private static int
fontSizeDivisor
private boolean
isSigned
private java.awt.MediaTracker
mediaTracker
private static int
MINIMUM_ELAPSED_SECONDS
private boolean
needToCompleteInitialization
private int
preloadClassIndex
private java.lang.String[]
preloadClassNames
private java.awt.Image
preloadImage
private java.lang.String
preloadImageName
private boolean
preloadImagePainted
private boolean
preloadImageReadyForDisplay
private java.lang.String
preloadTextMessage
private int
preloadThreadCount
private java.lang.String
previousClassName
private long
startTime
private java.awt.Color
textColor
WrappedApplet
wrappedApplet
-
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
-
-
Constructor Summary
Constructors Constructor Description AppletWrapper(java.lang.String preloadImageName, int preloadThreadCount, java.lang.String[] preloadClassNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
completeInitialization(java.awt.Graphics g, java.awt.Dimension dim)
void
destroy()
java.lang.String
getAppletInfo()
private java.awt.Color
getColorFromName(java.lang.String strColor)
private java.awt.Color
getContrastingBlackOrWhite(java.awt.Color color)
java.lang.String
getNextPreloadClassName()
boolean
handleEvent(java.awt.Event e)
void
init()
boolean
isSigned()
void
paint(java.awt.Graphics g)
protected void
repaintClock()
void
update(java.awt.Graphics g)
-
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler
-
Methods inherited from class java.applet.Applet
getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
-
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
wrappedApplet
public WrappedApplet wrappedApplet
-
preloadImageName
private java.lang.String preloadImageName
-
preloadTextMessage
private java.lang.String preloadTextMessage
-
previousClassName
private java.lang.String previousClassName
-
preloadThreadCount
private int preloadThreadCount
-
preloadClassNames
private java.lang.String[] preloadClassNames
-
preloadClassIndex
private int preloadClassIndex
-
isSigned
private boolean isSigned
-
needToCompleteInitialization
private boolean needToCompleteInitialization
-
preloadImageReadyForDisplay
private boolean preloadImageReadyForDisplay
-
preloadImagePainted
private boolean preloadImagePainted
-
bgcolor
private java.awt.Color bgcolor
-
textColor
private java.awt.Color textColor
-
preloadImage
private java.awt.Image preloadImage
-
mediaTracker
private java.awt.MediaTracker mediaTracker
-
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 java.lang.String fontFace
-
fontSizeDivisor
private static int fontSizeDivisor
-
fontSize
private int fontSize
-
font
private java.awt.Font font
-
fontMetrics
private java.awt.FontMetrics fontMetrics
-
fontAscent
private int fontAscent
-
fontHeight
private int fontHeight
-
colorNames
private static final java.lang.String[] colorNames
-
colors
private static final java.awt.Color[] colors
-
-
Method Detail
-
destroy
public void destroy()
- Overrides:
destroy
in classjava.applet.Applet
-
isSigned
public boolean isSigned()
-
getAppletInfo
public java.lang.String getAppletInfo()
- Overrides:
getAppletInfo
in classjava.applet.Applet
-
init
public void init()
- Overrides:
init
in classjava.applet.Applet
-
update
public void update(java.awt.Graphics g)
- Overrides:
update
in classjavax.swing.JApplet
-
paint
public void paint(java.awt.Graphics g)
- Overrides:
paint
in classjava.awt.Container
-
handleEvent
public boolean handleEvent(java.awt.Event e)
- Overrides:
handleEvent
in classjava.awt.Component
-
getNextPreloadClassName
public java.lang.String getNextPreloadClassName()
-
repaintClock
protected void repaintClock()
-
completeInitialization
private boolean completeInitialization(java.awt.Graphics g, java.awt.Dimension dim)
-
getColorFromName
private java.awt.Color getColorFromName(java.lang.String strColor)
-
getContrastingBlackOrWhite
private java.awt.Color getContrastingBlackOrWhite(java.awt.Color color)
-
-