wt.clients.util
Class HyperlinkFileChooserApplet

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byjavax.swing.JApplet
                      extended bywt.clients.util.HyperlinkFileChooserApplet
All Implemented Interfaces:
Accessible, ActionListener, EventListener, ImageObserver, MenuContainer, RootPaneContainer, Serializable

public class HyperlinkFileChooserApplet
extends JApplet
implements ActionListener

Applet used to select files (actually, filepath strings), requires Java plugin. This applet is used in HTML pages to launch a Java file dialog and return the the selected filepath(s) to the HTML page. Visible portion of applet is a button that looks like a hyperlink, typically saying something like "Add Files..." or "Add Attachments..." When the applet button is clicked, a file chooser dialog is launched. The user uses the file dialog to selects file(s) and clicks "Save" (or custom label) button. The filepath (or multiple concatenated filepaths) string is provided to the page by the applet calling the JavaScript method setPath() (or jsSetMethod-specified custom method). Used in multi-select mode for selecting primary content in Create Multiple Documents wizard, secondary content (attachments) of FormatContentHolder objects, and attachments for ContentHolder objects (such as change objects).

See Also:
FileChooserDropApplet, FileLocatorApplet, The following parameters are absolutely required:, Serialized Form

Nested Class Summary
(package private)  class HyperlinkFileChooserApplet.WorkerThread
           
 
Nested classes inherited from class javax.swing.JApplet
JApplet.AccessibleJApplet
 
Nested classes inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  String actionLabel
           
protected static String BROWSE
           
protected  JButton browseButton
           
private  String buttonLabel
           
(package private)  URL codeBase
           
private  ThreadGroup contextGroup
           
(package private)  boolean DEBUG
           
private  String defaultPath
           
private  String DELIM
           
private  FileAccess fileAccess
           
protected  String imageFilename
           
private  boolean inAnApplet
           
private static Object initSync
           
private  String jsGetMethod
           
private  String jsSetMethod
           
private  boolean MULTI_SELECT_ENABLED
           
private  String orientation
           
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.applet.Applet
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
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
HyperlinkFileChooserApplet()
           
HyperlinkFileChooserApplet(boolean inAnApplet)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
private  boolean confirm(String displayMessage)
           
 String createValidDefaultPath(String path)
           
 void destroy()
           
 String doShowFileLocator(String path)
           
private  String EncodeHTMLPath(String path)
           
private  FileAccess getFileAccess()
           
private  String getParameter(String paramName, String defaultParamValue)
           
 Applet getParentApplet()
           
 Frame getParentFrame()
           
protected  URL getURL(String filename)
           
 void init()
           
 boolean isDirectory(String path)
           
 boolean isValidTarget(String target)
           
static void main(String[] args)
           
 Container makeContentPane()
           
protected  void setElement(String value)
           
 void showFileLocator(String path)
           
 void start()
           
 void stop()
           
 
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, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
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, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, getMouseWheelListeners, getName, 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, isOpaque, 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, setName, 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
 

Field Detail

initSync

private static Object initSync

contextGroup

private ThreadGroup contextGroup

defaultPath

private String defaultPath

actionLabel

private String actionLabel

buttonLabel

private String buttonLabel

jsGetMethod

private String jsGetMethod

jsSetMethod

private String jsSetMethod

fileAccess

private FileAccess fileAccess

MULTI_SELECT_ENABLED

private boolean MULTI_SELECT_ENABLED

DELIM

private String DELIM

BROWSE

protected static final String BROWSE
See Also:
Constant Field Values

DEBUG

boolean DEBUG

browseButton

protected JButton browseButton

orientation

private String orientation

imageFilename

protected String imageFilename

inAnApplet

private boolean inAnApplet

codeBase

URL codeBase
Constructor Detail

HyperlinkFileChooserApplet

public HyperlinkFileChooserApplet()

HyperlinkFileChooserApplet

public HyperlinkFileChooserApplet(boolean inAnApplet)
Method Detail

init

public void init()

start

public void start()

stop

public void stop()

destroy

public void destroy()

makeContentPane

public Container makeContentPane()

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getURL

protected URL getURL(String filename)

main

public static void main(String[] args)

getParentApplet

public Applet getParentApplet()

getParentFrame

public Frame getParentFrame()

getParameter

private String getParameter(String paramName,
                            String defaultParamValue)

showFileLocator

public void showFileLocator(String path)

doShowFileLocator

public String doShowFileLocator(String path)

isValidTarget

public boolean isValidTarget(String target)

confirm

private boolean confirm(String displayMessage)

setElement

protected void setElement(String value)

getFileAccess

private FileAccess getFileAccess()

EncodeHTMLPath

private String EncodeHTMLPath(String path)

createValidDefaultPath

public String createValidDefaultPath(String path)

isDirectory

public boolean isDirectory(String path)