com.smartwerkz.jupload.classic.plugin
Class Plugin

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.smartwerkz.jupload.classic.plugin.Plugin
All Implemented Interfaces:
ParameterEnvironment, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer
Direct Known Subclasses:
JUpload

public abstract class Plugin
extends javax.swing.JApplet
implements ParameterEnvironment

Base class for all JUpload Plugins (derived from JApplet). Plugins will wait until the JUpload instance of the current context started.

Since:
Sep 10 2005
Author:
Mike Haller, Dominik Seifert
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String[][] DEFAULTS
           
protected  JUpload jupload
           
protected  JUploadContext juploadContext
           
protected  netscape.javascript.JSObject page
           
protected  Parameters params
           
protected  java.awt.Dimension prefSize
           
protected  java.util.Properties props
           
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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
Plugin()
           
 
Method Summary
 void destroy()
          Finalized, implement destroyPlugin() instead.
abstract  void destroyPlugin()
          Needs to be implemented to kill all background tasks and executors.
 java.lang.String getId()
           
 java.lang.String getName()
           
 netscape.javascript.JSObject getPage()
           
 java.lang.String getParameter(java.lang.String name)
          Returns customized parameters for this environment.
 Parameters getParameters()
           
abstract  java.lang.String getPluginName()
           
abstract  java.lang.String getPluginVendor()
           
abstract  java.lang.String getPluginVersion()
           
 java.awt.Dimension getPreferredSize()
           
 void init()
          Overridden to wait for JUpload instance and ensure basic decoration.
abstract  void initPlugin()
          Implement this method instead of overriding init().
 JUpload jupload()
          Returns the JUpload instance within this context.
 JUploadContext juploadContext()
           
 void setPreferredSize(int w, int h)
           
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, 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, 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, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, 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, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.smartwerkz.jupload.classic.config.params.ParameterEnvironment
getCodeBase, getDefaultParams
 

Field Detail

DEFAULTS

public static final java.lang.String[][] DEFAULTS

params

protected Parameters params

juploadContext

protected JUploadContext juploadContext

jupload

protected JUpload jupload

page

protected netscape.javascript.JSObject page

props

protected java.util.Properties props

prefSize

protected java.awt.Dimension prefSize
Constructor Detail

Plugin

public Plugin()
Method Detail

setPreferredSize

public void setPreferredSize(int w,
                             int h)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Container

init

public final void init()
Overridden to wait for JUpload instance and ensure basic decoration. TODO: Loose dependency to JSWrapper

Overrides:
init in class java.applet.Applet

getPage

public netscape.javascript.JSObject getPage()

getId

public java.lang.String getId()

getParameter

public java.lang.String getParameter(java.lang.String name)
Description copied from interface: ParameterEnvironment
Returns customized parameters for this environment.

Specified by:
getParameter in interface ParameterEnvironment
Overrides:
getParameter in class java.applet.Applet

destroy

public final void destroy()
Finalized, implement destroyPlugin() instead.

Overrides:
destroy in class java.applet.Applet

destroyPlugin

public abstract void destroyPlugin()
Needs to be implemented to kill all background tasks and executors.


initPlugin

public abstract void initPlugin()
Implement this method instead of overriding init(). The default init method is used to setup the plugin and will call this method right before decorating the gui according to the Configuration. Correspondingly the GUI should bes created during the call of this method.


getParameters

public Parameters getParameters()

juploadContext

public JUploadContext juploadContext()

jupload

public JUpload jupload()
Returns the JUpload instance within this context.


getName

public java.lang.String getName()
Overrides:
getName in class java.awt.Component

getPluginName

public abstract java.lang.String getPluginName()
Returns:
Name of your plugin which can be displayed in the GUI

getPluginVersion

public abstract java.lang.String getPluginVersion()
Returns:
Version of your plugin

getPluginVendor

public abstract java.lang.String getPluginVendor()
Returns:
Your name or website address


Copyright © 2007 smartwerkz.com. All Rights Reserved.