|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
wt.clients.util.FileChooserDropApplet
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).
JFileChooserApplet
,
FileLocatorApplet
,
The following parameters are absolutely required:
,
Serialized FormNested Class Summary | |
class |
FileChooserDropApplet.DragHandler
|
(package private) class |
FileChooserDropApplet.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 String |
addImageFilename
|
protected ImageIcon |
addImageIcon
|
(package private) int |
bgcolor
|
(package private) int |
bgcoloractive
|
protected static String |
BROWSE
|
protected JButton |
browseButton
|
(package private) int |
buttoncolor
|
(package private) int |
buttoncoloractive
|
private String |
buttonLabel
|
(package private) int |
chunk
|
(package private) URL |
codeBase
|
private ThreadGroup |
contextGroup
|
private Font |
crossLocaleFont
|
(package private) boolean |
DEBUG
|
private String |
defaultPath
|
private String |
DELIM
|
protected JButton |
dropButton
|
protected String |
dropImageFilename
|
protected String |
dropImageFilenameActive
|
protected ImageIcon |
dropImageIcon
|
protected ImageIcon |
dropImageIconActive
|
private FileAccess |
fileAccess
|
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 | |
FileChooserDropApplet()
|
|
FileChooserDropApplet(boolean inAnApplet)
|
Method Summary | |
void |
actionPerformed(ActionEvent e)
|
private boolean |
confirm(String displayMessage)
Displays modal dialog of message with OK/Cancel buttons. |
String |
createValidDefaultPath(String path)
|
void |
destroy()
|
private boolean |
display(String displayMessage)
Displays modal dialog of message with OK button. |
String |
doShowFileLocator(String path)
Launches file dialog in this thread. |
private String |
EncodeHTMLPath(String path)
|
void |
enterDragOverState()
Change drop target's appearance to active state |
void |
exitDragOverState()
Return drop target's appearance to inactive state. |
private FileAccess |
getFileAccess()
|
private String |
getParameter(String paramName,
String defaultParamValue)
Return applet parameter value, or return default value if parameter not available. |
Applet |
getParentApplet()
|
Frame |
getParentFrame()
|
protected URL |
getURL(String filename)
|
void |
init()
|
boolean |
isDirectory(File maybeDirectory)
Return true if File is actually a directory |
boolean |
isDirectory(String path)
Return true if path leads to a directory |
boolean |
isValidTarget(File file)
Checks whether local file exists and is readable. |
boolean |
isValidTarget(String target)
Checks whether local file exists and is readable. |
static void |
main(String[] args)
|
Container |
makeContentPane()
|
String |
multipleSelectionProcessing(File[] files)
Return concatenated escaped filepath strings for validated File objects (file exists, is readable, is not a shortcut or directory). |
protected void |
setElement(String returnValue)
Sends value from applet to page. |
protected void |
setElement(String value,
boolean complete)
Used by setElement(String) to send value from applet to page via WTJSObject call. |
void |
showFileLocator(String path)
Launches file dialog in separate thread. |
String |
singleSelectionProcessing(File file)
Return escaped filepath string for validated File object (file exists, is readable, is not a shortcut or directory). |
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Object initSync
private ThreadGroup contextGroup
private String defaultPath
private String actionLabel
private String buttonLabel
private String jsGetMethod
private String jsSetMethod
private FileAccess fileAccess
private boolean MULTI_SELECT_ENABLED
private String DELIM
protected static final String BROWSE
boolean DEBUG
protected JButton browseButton
protected JButton dropButton
private String orientation
int bgcolor
int bgcoloractive
int buttoncolor
int buttoncoloractive
int chunk
protected String addImageFilename
protected String dropImageFilename
protected String dropImageFilenameActive
protected ImageIcon addImageIcon
protected ImageIcon dropImageIcon
protected ImageIcon dropImageIconActive
private boolean inAnApplet
URL codeBase
private Font crossLocaleFont
Constructor Detail |
public FileChooserDropApplet()
public FileChooserDropApplet(boolean inAnApplet)
Method Detail |
public void init()
public void start()
public void stop()
public void destroy()
public Container makeContentPane()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
protected URL getURL(String filename)
public static void main(String[] args)
public Applet getParentApplet()
public Frame getParentFrame()
private String getParameter(String paramName, String defaultParamValue)
public void showFileLocator(String path)
public String doShowFileLocator(String path)
public boolean isValidTarget(String target)
public boolean isValidTarget(File file)
private boolean confirm(String displayMessage)
private boolean display(String displayMessage)
protected void setElement(String returnValue)
protected void setElement(String value, boolean complete)
private FileAccess getFileAccess()
private String EncodeHTMLPath(String path)
public String createValidDefaultPath(String path)
public boolean isDirectory(String path)
public boolean isDirectory(File maybeDirectory)
public String singleSelectionProcessing(File file)
public String multipleSelectionProcessing(File[] files)
public void enterDragOverState()
enterDragOverState
in interface SimpleDragStateListener
public void exitDragOverState()
exitDragOverState
in interface SimpleDragStateListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |