Package wt.clients.dndMicroApplet
This package implements an applet whose intent
is to supply targeted drag-and-drop functionality for use within HTML pages
whose content is primarily HTML (in terms of screen real-estate and user
focus), not Java. The applet class is wt.clients.dndMicroApplet.DnDMicroApplet
and is deployed as a signed JAR, <Windchill codebase>/wt/clients/dndMicroApplet/DnDApplet.jar.
See:
Description
|
Class Summary |
| DnDMicroApplet |
Simple applet capable of drawing icons and serving as a drag source of
file and string data and as a drop target of file and string data. |
Package wt.clients.dndMicroApplet Description
This package implements an applet whose intent
is to supply targeted drag-and-drop functionality for use within HTML pages
whose content is primarily HTML (in terms of screen real-estate and user
focus), not Java. The applet class is wt.clients.dndMicroApplet.DnDMicroApplet
and is deployed as a signed JAR, <Windchill codebase>/wt/clients/dndMicroApplet/DnDApplet.jar.
The applet is implemented as a "micro" applet, which is to say that
the applet is an extremely small, self-contained download. The small
size and targeted behavior of the applet allow it to download and launch
extremely quickly. Unfortunately, the download of the Java Runtime
Environment is still quite noticeable if (and only if) the user in question
does not yet have it installed. Also, the first usage of the Java
Plug In within a given browser session is accompanied by some delay.
Finally, the first usage of a PTC-signed JAR will force a grant/deny privilege
dialog. Overall, however, every reasonable effort has been taken
to ensure that the applet download and launch will inconvenience the user
as little as possible.
The capabilities and behaviors of the applet are described at length
in DnDMicroAppletConstants and HTTPParameterConstants.
The former describes the applet inputs, i.e. the supported applet parameters,
while the latter describes the HTTP-request parameters that are used to
communicate output data. In a nutshell, however, the applet provides
the following:
-
A simple graphical display consisting of a "normal" state icon, a "drag-over"
state icon (which will be displayed instead of the "normal" state icon
when acceptable data is being dragged over the applet), and a "glyph" icon
which will be drawn over both of these.
-
Drag source capability. The applet can be configured to be a source
of string (text) and/or file list data (or neither). The string (text)
is provided either directly via an applet parameter or via JavaScript callbacks
specified via applet parameters and is intended primarily to enable such an
applet to be dragged and dropped onto other such applets. [The JavaScript
callback capability is intended to allow a representation of form data, e.g.
a set of checkboxes to be dragged to other applets.] The file drag data
is a hyperlink file to either a remote location or a local file containing
content downloaded from a remote location -- depending on the applet parameters
specified. This allows hyperlinks to applets to be dragged to the desktop
to obtain links to locations or actual downloaded file content as appropriate.
-
Drop target capability. The applet can be configured to be a drop
target for string (text) and/or file list data (or neither). The
drop data can be sent to a JavaScript function or an HTTP address, depending
on which is specified in the applet parameters. The support for string
(text) drops is primarily intended to support inter-applet drag-and-drop,
whereas the file drop support is primarily intended for usages like file
upload UI's.
-
Double-click handling. The applet can be configured to send double-click
events to a JavaScript function or an HTTP address, depending on which
is specified in the applet parameters.
Additional technical considerations:
-
In order to enable full use of drag-and-drop functionalities, this applet
requires the Java 2 Plug-In v1.3 or higher.
-
The applet uses only HTTP (or HTTPS) to communicate with the server, so
RMI tunneling is not required.
-
The applet is signed in order to allow simple file operations, specifically:
-
Determining whether a given File object represents a directory (via File.isDirectory()).
-
Creating files in the temp directory.
-
Removing files it created in the case of an error.
Every effort has been taken to ensure that these outside-the-sandbox operations
cannot be abused for nefarious purposes. For instance, existing files
cannot be overwritten and only files created by this applet can be deleted
by it.
-
The applet can has no specific dependency on Windchill code, versions,
servers, etc.