ucar.unidata.idv.control
Class AppletFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by ucar.unidata.idv.control.AppletFrame
All Implemented Interfaces:
AppletContext, AppletStub, ImageObserver, MenuContainer, Serializable

public class AppletFrame
extends JComponent
implements AppletContext, AppletStub

Class for supporting applets. Doesn't work yet

Version:
$Revision: 1.8 $
Author:
IDV Development Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
AppletFrame(Applet a, int w, int h, String baseDirPath, Hashtable params)
          Construct an AppletFrame.
 
Method Summary
 void appletResize(int width, int height)
          Resize the applet to the width and height
 Applet getApplet(String name)
          Get the applet of said name
 AppletContext getAppletContext()
          Get the applet's context
 Enumeration getApplets()
          Get an enumeration of the applets.
 AudioClip getAudioClip(URL url)
          Get the audio clip at the location specified.
 URL getCodeBase()
          Get the code base
 URL getDocumentBase()
          Get the document base
 Image getImage(URL url)
          Get the image at the url
 String getParameter(String name)
          Get a parameter from the list of parameters
 InputStream getStream(String key)
          Get the InputStream for the given key
 Iterator getStreamKeys()
          Get the keys for a given stream
 boolean isActive()
          See if the applet is active
 void setStream(String key, InputStream stream)
          Set the input stream for the given key
 void showDocument(URL url)
          Show the document at the location specified
 void showDocument(URL url, String target)
          Show the document at the url with the target
 void showStatus(String status)
          Show the status of this applet
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, updateUI
 
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, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppletFrame

public AppletFrame(Applet a,
                   int w,
                   int h,
                   String baseDirPath,
                   Hashtable params)
Construct an AppletFrame.

Parameters:
a - the applet
w - width of the frame
h - height of the frame
baseDirPath - base directory path
params - applet parameters
Method Detail

appletResize

public void appletResize(int width,
                         int height)
Resize the applet to the width and height

Specified by:
appletResize in interface AppletStub
Parameters:
width - new width
height - new height

getAppletContext

public AppletContext getAppletContext()
Get the applet's context

Specified by:
getAppletContext in interface AppletStub
Returns:
applet's context

getCodeBase

public URL getCodeBase()
Get the code base

Specified by:
getCodeBase in interface AppletStub
Returns:
code base

getDocumentBase

public URL getDocumentBase()
Get the document base

Specified by:
getDocumentBase in interface AppletStub
Returns:
document base

getParameter

public String getParameter(String name)
Get a parameter from the list of parameters

Specified by:
getParameter in interface AppletStub
Parameters:
name - name of the parameter
Returns:
get the parameters for this name

isActive

public boolean isActive()
See if the applet is active

Specified by:
isActive in interface AppletStub
Returns:
true

getImage

public Image getImage(URL url)
Get the image at the url

Specified by:
getImage in interface AppletContext
Parameters:
url - location of image
Returns:
the image

showStatus

public void showStatus(String status)
Show the status of this applet

Specified by:
showStatus in interface AppletContext
Parameters:
status - applet status

getApplet

public Applet getApplet(String name)
Get the applet of said name

Specified by:
getApplet in interface AppletContext
Parameters:
name - name of the applet
Returns:
null

getApplets

public Enumeration getApplets()
Get an enumeration of the applets.

Specified by:
getApplets in interface AppletContext
Returns:
null in this implementation

getAudioClip

public AudioClip getAudioClip(URL url)
Get the audio clip at the location specified.

Specified by:
getAudioClip in interface AppletContext
Parameters:
url - location of clip
Returns:
the clip

showDocument

public void showDocument(URL url)
Show the document at the location specified

Specified by:
showDocument in interface AppletContext
Parameters:
url - document location

showDocument

public void showDocument(URL url,
                         String target)
Show the document at the url with the target

Specified by:
showDocument in interface AppletContext
Parameters:
url - document URL
target - target

getStream

public InputStream getStream(String key)
Get the InputStream for the given key

Specified by:
getStream in interface AppletContext
Parameters:
key - key for stream
Returns:
null

getStreamKeys

public Iterator getStreamKeys()
Get the keys for a given stream

Specified by:
getStreamKeys in interface AppletContext
Returns:
null

setStream

public void setStream(String key,
                      InputStream stream)
Set the input stream for the given key

Specified by:
setStream in interface AppletContext
Parameters:
key - key to use
stream - stream for key