com.smartwerkz.jupload.classic
Class JUpload

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
                          extended by com.smartwerkz.jupload.classic.JUpload
All Implemented Interfaces:
ParameterEnvironment, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer

public class JUpload
extends Plugin

The main applet which contains the basic GUI, basic setup and is used to call the basic javascript methods upon.

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
 java.util.List plugins
          Contains all plugins within this instance' JUploadContext
 
Fields inherited from class com.smartwerkz.jupload.classic.plugin.Plugin
DEFAULTS, jupload, juploadContext, page, params, prefSize, 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
JUpload()
           
 
Method Summary
protected  void addPlugin(Plugin plugin)
           
 Config cfg()
           
 void checkImageConversion()
          Checks if -in case that image conversion is required- all readable formats are also writable or gives a warning in case that there is no default conversion format.
 void checkJavaVersion()
           
 void destroyPlugin()
          Needs to be implemented to kill all background tasks and executors.
 java.lang.String getAppletInfo()
           
 java.lang.String[][] getDefaultParams()
          Returns the default parameters for this environment.
 HttpObserver getHttpObserver()
           
static JUpload getJUpload(Plugin plugin)
          This method is called by Plugin.init() to set its jupload instance.
 java.lang.String getName()
           
 java.lang.String getPluginDescription()
           
 java.lang.String getPluginName()
           
 Plugin[] getPlugins(java.lang.String pluginClass)
           
 java.lang.String getPluginVendor()
           
 java.lang.String getPluginVersion()
           
 JUploadGui gui()
           
 void initPlugin()
          Implement this method instead of overriding Plugin.init().
 JSWrapper js()
           
 Listeners listeners()
           
 void redirect(boolean error)
          Redirects to the configured URL in case of completition or error.
 void showDocument(java.net.URL url)
           
 void showDocument(java.net.URL url, java.lang.String target)
           
 void toggleUpload()
           
 UploadManager uploadManager()
           
 UploadTree uploadTree()
           
 void waitForPlugin(java.lang.String pluginClassName)
          Will wait for the plugin with the given signature.
 
Methods inherited from class com.smartwerkz.jupload.classic.plugin.Plugin
destroy, getId, getPage, getParameter, getParameters, getPreferredSize, init, jupload, juploadContext, setPreferredSize
 
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, 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
 

Field Detail

plugins

public final java.util.List plugins
Contains all plugins within this instance' JUploadContext

Constructor Detail

JUpload

public JUpload()
Method Detail

cfg

public Config cfg()

gui

public JUploadGui gui()

uploadTree

public UploadTree uploadTree()

uploadManager

public UploadManager uploadManager()

listeners

public Listeners listeners()
Returns:
A Listeners object which is a convinient access point for all installable listeners.

getHttpObserver

public HttpObserver getHttpObserver()

js

public JSWrapper js()

getName

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

getPluginName

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

getPluginDescription

public java.lang.String getPluginDescription()

getPluginVersion

public java.lang.String getPluginVersion()
Specified by:
getPluginVersion in class Plugin
Returns:
Version of your plugin

getPluginVendor

public java.lang.String getPluginVendor()
Specified by:
getPluginVendor in class Plugin
Returns:
Your name or website address

getAppletInfo

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

getDefaultParams

public java.lang.String[][] getDefaultParams()
Description copied from interface: ParameterEnvironment
Returns the default parameters for this environment. One parameter must have the form: key, stringValue, type[, elementType[, elementType2]].


initPlugin

public void initPlugin()
Description copied from class: Plugin
Implement this method instead of overriding Plugin.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.

Specified by:
initPlugin in class Plugin

checkImageConversion

public void checkImageConversion()
Checks if -in case that image conversion is required- all readable formats are also writable or gives a warning in case that there is no default conversion format.


checkJavaVersion

public void checkJavaVersion()

getJUpload

public static JUpload getJUpload(Plugin plugin)
This method is called by Plugin.init() to set its jupload instance. If the JUpload instance for the given context is not loaded, method will block until it is loaded.

Returns:
the JUpload instance of the plugin's context.

waitForPlugin

public void waitForPlugin(java.lang.String pluginClassName)
Will wait for the plugin with the given signature. The name must be fully qualified (including its package). Example: The name of the JUpload class is: "com.smartwerkz.jupload.classic.JUpload" Note that every plugin will wait for its JUpload instance to be loaded before initializing anyway.


addPlugin

protected void addPlugin(Plugin plugin)

getPlugins

public Plugin[] getPlugins(java.lang.String pluginClass)
Returns:
All plugins of the given class that are currently registered.

destroyPlugin

public void destroyPlugin()
Description copied from class: Plugin
Needs to be implemented to kill all background tasks and executors.

Specified by:
destroyPlugin in class Plugin

redirect

public void redirect(boolean error)
Redirects to the configured URL in case of completition or error.


showDocument

public void showDocument(java.net.URL url)

showDocument

public void showDocument(java.net.URL url,
                         java.lang.String target)

toggleUpload

public void toggleUpload()


Copyright © 2007 smartwerkz.com. All Rights Reserved.