Class 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
      • Nested classes/interfaces inherited from class java.awt.Panel

        java.awt.Panel.AccessibleAWTPanel
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • 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.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, 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • 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
    • Constructor Detail

      • AppletWrapper

        public AppletWrapper​(java.lang.String preloadImageName,
                             int preloadThreadCount,
                             java.lang.String[] preloadClassNames)
    • Method Detail

      • destroy

        public void destroy()
        Overrides:
        destroy in class java.applet.Applet
      • isSigned

        public boolean isSigned()
      • getAppletInfo

        public java.lang.String getAppletInfo()
        Overrides:
        getAppletInfo in class java.applet.Applet
      • init

        public void init()
        Overrides:
        init in class java.applet.Applet
      • update

        public void update​(java.awt.Graphics g)
        Overrides:
        update in class javax.swing.JApplet
      • paint

        public void paint​(java.awt.Graphics g)
        Overrides:
        paint in class java.awt.Container
      • handleEvent

        public boolean handleEvent​(java.awt.Event e)
        Overrides:
        handleEvent in class java.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)