Package wt.clients.util
Class FileChooserDropApplet
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
wt.clients.util.FileChooserDropApplet
- Record Components:
java_code- value="wt/clients/util/FileChooserDropApplet" filepath from codebase to applet classjava_codebase- value="" URL for codebase, can obtain value by calling the createCodebase method in wt.htmlutil.HtmlUtil java_archive- value="wt/security/security.jar" filepath from codebase to security.jarcabinets- value="wt/security/security.cab" filepath from codebase to security.cabtype- value="application/x-java-applet;version=1.3" automatically generated by wt.taglib.util.PluginTagGenerator createPluginTag methodcache_archive- value="content.jar" filepath from codebase to Java archive JAR filecache_option- value="Plugin" makes the Java archive JAR file get cached by the Pluginwt- .context.locale value="" locale that the applet should be displaying in, can obtain by calling the createLocale method in wt.htmlutil.HtmlUtil SCRIPTABLE- value="true" needed for applet-JavaScript interaction in IEMAYSCRIPT- value="true" needed for applet-JavaScript interaction in Netscape The following parameters are not strictly required but are strongly recommended for appearance, behavior and performance reasons:bgcolor- value="" to make applet look like it's part of the page, make the bgcolor the same as the bgcolor of the area that the applet is being displayed in. If the bgcolor is hard-coded in the page, can be hard-coded in applet tags as well. Otherwise, if page bgcolor is defined by stylesheet, obtain value by calling wt.enterprise.BasicTemplateProcessor getWCColorDec method with the CSS styleClass name that applies to the location of the applet (styleClass entries that will be referenced by the applet need to have matching entries in the Solution's .css file and the Solution's wt.properties file), defaults to light grey if no value provided buttonLabel- value="" typically will be the localized version of "Browse..." or a string appropriate for that page's usage, such as "Add Attachments..." or "Add Files..." The following parameters are totally optional and have intelligent defaults so you don't need to set them unless you want to change the default behavior. debug- value="<true|false>" Defaults to false. Setting it to true will produce a lot of informative chatter in the Java Console. Typically set by retrieving the wt.clients.debug value from wt.propertiesmultiSelect- value="<true|false>" Defaults to false (single-select). Setting it to true will change file chooser from single-select to multi-select. If setting multiSelect to true, should also provide a delim parameter value to make sure that the applet is using the same delim string as the page.delim- value="" If multiSelect=true, should provide a delim string which will be used by the applet to separate the filepaths if more than one file is chosen. Defaults to ";;;qqq". Typically set for file chooser applet tags, drag-and-drop target applet tags, filepath-handling JavaScript, and processing server code, all by retrieving the wt.doc.hiddenFieldDelimiter value from wt.properties. actionLabel- value="" If no actionLabel value is provided, the file chooser window title and action button will be "Save". If actionLabel is provided, window title and action button will use the actionLabel value string, such as "Open", "Choose File Attachments", "Choose Primary File", etc.. jsSetMethod- value="" If no jsSetMethod value is specified, file chooser output will be used to invoke the JavaScript method setPath( newValue, fileSep ). The jsSetMethod param is specified in order to send the output to a different methodname. The method must accept two and only two arguments: a String which consists of the selected filepath (or multiple paths separated by delim string), and a String which is the file separator character used by the local filesystem. The following parameters are used to control the overall arrangement and appearance of the applet: buttonLook- value="true"|"false" If true, the file-dialog-launching button will look like a standard text-only HTML button, aligned to the far left of the applet panel for use beside an HTML textfield (emulating an HTML file input). If false, the file-dialog-launching button will look like a hyperlink with icon, aligned to the far right of the applet panel (for use in action bar of tables).imageFilename- value="wtcore/images/attach_add.gif"|"" The image which is displayed on the button beside or above the "hyperlink" label when the buttonLook parameter is set to "false". acceptFileBrowse- value="true"|"false" If true, then the applet will include a browse button for selecting files by launching a file dialog.acceptFileDrop- value="true"|"false" If true, then the applet will include a drop target for selecting files by dragging and dropping from the desktop.dropImageFilename- value="wtcore/images/droptarget.gif"|"" The image which is displayed as the drop target, if acceptFileDrop parameter is set to "true". dropImageFilenameActive- value="wtcore/images/droptarget_active.gif"|"" The image which is displayed when the drop target is actively dragged-over, if acceptFileDrop parameter is set to "true".
Supported API:true
Extendable:false
- All Implemented Interfaces:
ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,SimpleDragStateListener
public class FileChooserDropApplet
extends JApplet
implements ActionListener, SimpleDragStateListener
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, or to accept one or more dragged-and-dropped files and
return the dropped filepath(s) to the HTML page.
Visible portion of applet is either a standard button that typically
says "Browse..." or a transparent 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).
The optional drop target is displayed next to the button/"hyperlink".
Used in single-select mode for selecting primary content in
single-document Create/Update/Check In wizards for documents and
document templates.
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:
-
JFileChooserAppletwt.clients.util.FileLocatorAppletThe following parameters are absolutely required:- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JApplet
JApplet.AccessibleJAppletNested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleAppletNested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanelNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Method Summary
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, updateMethods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatusMethods 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods 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, 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, 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