|
|||||||||||
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.Window
java.awt.Dialog
wt.clients.content.SelectFilesDialog
SelectFilesDialog
is a Dialog
which displays a list of
files (ApplicationData
items) and supports the selection of files
in the list. The files to be displayed can either be explicitly specified or
can be retrieved from a given ContentHolder
object.
For example, this dialog could be used to pick files to be downloaded:
SelectFilesDialog select_dialog = new SelectFilesDialog( my_frame, true ); select_dialog.setContentHolder( myContentHolder ); select_dialog.useAllFiles( true ); select_dialog.show(); Vector selected_files = select_dialog.getSelectedFiles();
Nested Class Summary | |
private class |
SelectFilesDialog.ActionThread
|
(package private) class |
SelectFilesDialog.SymAction
|
(package private) class |
SelectFilesDialog.SymKey
|
(package private) class |
SelectFilesDialog.SymWindow
|
Nested classes inherited from class java.awt.Dialog |
Dialog.AccessibleAWTDialog |
Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
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 | |
(package private) Panel |
buttonPanel
|
private boolean |
cancel
|
(package private) Button |
cancelButton
|
private ContentHolder |
contentHolder
|
private ThreadGroup |
contextGroup
|
(package private) Label |
dialogLabel
|
(package private) boolean |
fComponentsAdjusted
|
private static int |
FILE_NAME
|
(package private) WTMultiList |
fileMultiList
|
private Vector |
files
|
private static int |
FORMAT
|
(package private) symantec.itools.awt.shape.HorizontalLine |
horizontalLine1
|
private static IconCache |
iconCache
|
protected static int |
INIT_FILE_CONTENT
|
private static int |
KEY
|
(package private) Button |
okButton
|
private Applet |
parentApplet
|
private static ResourceBundle |
resources
|
static String |
RESOURCES
Defined constant which specifies the fully-qualified class name of the Resource Bundle containing labels and message resources for localization. |
private Vector |
selectedFiles
|
private static int |
SIZE
|
private boolean |
useAllFiles
|
Fields inherited from class java.awt.Dialog |
|
Fields inherited from class java.awt.Window |
|
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 | |
SelectFilesDialog(Frame parent,
boolean modal)
Constructor for SelectFilesDialog . |
|
SelectFilesDialog(Frame parent,
String title,
boolean modal)
Constructor for SelectFilesDialog . |
Method Summary | |
void |
addNotify()
|
(package private) void |
cancelButton_Action(ActionEvent event)
|
(package private) void |
cancelButton_KeyPress(KeyEvent event)
|
(package private) void |
Dialog1_WindowClosing(WindowEvent event)
|
private void |
enableActions(boolean enable)
|
private ApplicationData |
findFile(String key)
|
private WTContext |
getContext()
|
private String |
getFileSize(ApplicationData file)
|
private String |
getObjectKey(ApplicationData file)
|
Applet |
getParentApplet()
Method getParentApplet returns the Applet
which is used to provide context to this dialog. |
Vector |
getSelectedFiles()
Method getSelectedFiles returns the files that have been
selected by the user. |
private Image |
getStandardIcon(ApplicationData content)
|
private void |
initContentHolder()
|
private void |
initFileContentList()
|
private void |
initializeIconCache()
initializeIconCache initializes a HashMap of icons associated
with file formats. |
private void |
initMultiList()
|
private void |
initResources()
|
boolean |
isCanceled()
Method isCanceled checks whether or not this dialog has been
cancelled. |
private void |
localize()
|
(package private) void |
okButton_Action(ActionEvent event)
|
(package private) void |
okButton_KeyPress(KeyEvent event)
|
protected void |
processCancel()
|
protected void |
processSelectSingle()
|
void |
refresh()
Method refresh updates the display of this dialog. |
void |
setCancelButtonLabel(String label)
Method setCancelButtonLabel uses the given
String to set the label on the button that causes
any selection to be cancelled and this dialog to be closed. |
void |
setContentHolder(ContentHolder content_holder)
Method setContentHolder sets the ContentHolder
object which is associated with the files displayed in this dialog. |
private void |
setContext(boolean context_on)
|
void |
setDialogLabel(String label)
Method setDialogLabel uses the given String
to set the label displayed on this dialog. |
void |
setFileSet(Vector fileset)
Method setFileSet sets the list of files to be displayed in this
dialog. |
void |
setOkButtonLabel(String label)
Method setOkButtonLabel uses the given
String to set the label on the button that causes the
currently selected files to be selected. |
void |
setParentApplet(Applet parent_applet)
Method setParentApplet sets the applet which is used to
provide context for this dialog. |
void |
show()
|
private void |
showMessageDialog(String message)
|
void |
useAllFiles(boolean use_files)
Method useAllFiles specifies whether or not this dialog
should use all of the files contained in a given ContentHolder . |
Methods inherited from class java.awt.Dialog |
dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
boolean fComponentsAdjusted
Label dialogLabel
WTMultiList fileMultiList
symantec.itools.awt.shape.HorizontalLine horizontalLine1
Panel buttonPanel
Button okButton
Button cancelButton
public static String RESOURCES
private static ResourceBundle resources
protected static final int INIT_FILE_CONTENT
private static final int FILE_NAME
private static final int FORMAT
private static final int SIZE
private static final int KEY
private static IconCache iconCache
private ContentHolder contentHolder
private Applet parentApplet
private Vector selectedFiles
private Vector files
private boolean useAllFiles
private boolean cancel
private ThreadGroup contextGroup
Constructor Detail |
public SelectFilesDialog(Frame parent, boolean modal)
SelectFilesDialog
.
parent
- the owner of this dialogmodal
- if true
, this dialog blocks input to
the parent window when shownDialog
public SelectFilesDialog(Frame parent, String title, boolean modal)
SelectFilesDialog
.
parent
- the owner of this dialogtitle
- the title of this dialogmodal
- if true
, this dialog blocks input to
the parent window when shownDialog
Method Detail |
private void localize()
private void initMultiList()
private void initResources()
public void addNotify()
public void show()
void Dialog1_WindowClosing(WindowEvent event)
private void initContentHolder()
public void useAllFiles(boolean use_files)
useAllFiles
specifies whether or not this dialog
should use all of the files contained in a given ContentHolder
.
use_files
- if true
, this dialog will initialize the
list of files displayed by retrieving all files contained in a
given ContentHolder
. If false
, this
dialog assumes the list of files will be explicitly provided via
setFileSet
setContentHolder(wt.content.ContentHolder)
,
setFileSet(java.util.Vector)
,
ContentHolder
public void setContentHolder(ContentHolder content_holder)
setContentHolder
sets the ContentHolder
object which is associated with the files displayed in this dialog.
Setting the ContentHolder
is necessary if this dialog is
set to display all of the files in the given ContentHolder
.
content_holder
- the ContentHolder
associated with the
displayed filesuseAllFiles
public void setFileSet(Vector fileset)
setFileSet
sets the list of files to be displayed in this
dialog.
fileset
- the Vector
of files (ApplicationData
items) to be displayed in this dialogpublic void setParentApplet(Applet parent_applet)
setParentApplet
sets the applet which is used to
provide context for this dialog. The given applet is used in
retrieving the appropriate WTContext
object.
parent_applet
- the Applet
used to give context
to this dialog.getParentApplet()
,
WTContext
public Applet getParentApplet()
getParentApplet
returns the Applet
which is used to provide context to this dialog.
Applet
which gives context to this
dialogsetParentApplet(java.applet.Applet)
,
WTContext
public void setOkButtonLabel(String label)
setOkButtonLabel
uses the given
String
to set the label on the button that causes the
currently selected files to be selected.
label
- the String
to use as the button
labelsetCancelButtonLabel(java.lang.String)
public void setCancelButtonLabel(String label)
setCancelButtonLabel
uses the given
String
to set the label on the button that causes
any selection to be cancelled and this dialog to be closed.
label
- the String
to use as the button
labelsetOkButtonLabel(java.lang.String)
public void setDialogLabel(String label)
setDialogLabel
uses the given String
to set the label displayed on this dialog. The label is useful for
providing context to the action to be taken on the selected files.
Eg.
SelectFilesDialog select_dialog = new SelectFilesDialog( my_frame, true ); select_dialog.setDialogLabel( "Please Select the Files to be Deleted" ); ...
label
- the String
to be used as the label of
this dialogpublic boolean isCanceled()
isCanceled
checks whether or not this dialog has been
cancelled. This dialog is considered to be cancelled if the user either
closes this dialog via the "Cancel" button, or closes the dialog by
clicking the "x" window control in the corner of this dialog.
true
, this dialog has been cancelled, and no files
have been selectedprivate WTContext getContext()
private void setContext(boolean context_on)
public Vector getSelectedFiles()
getSelectedFiles
returns the files that have been
selected by the user.
Vector
of selected files. If this dialog
has been cancelled, the returned Vector
will
be null
isCanceled()
private void initFileContentList()
private String getObjectKey(ApplicationData file)
void cancelButton_Action(ActionEvent event)
protected void processCancel()
void okButton_Action(ActionEvent event)
protected void processSelectSingle()
private ApplicationData findFile(String key)
private void enableActions(boolean enable)
private void showMessageDialog(String message)
public void refresh()
refresh
updates the display of this dialog.
void okButton_KeyPress(KeyEvent event)
void cancelButton_KeyPress(KeyEvent event)
private String getFileSize(ApplicationData file)
private void initializeIconCache()
initializeIconCache
initializes a HashMap of icons associated
with file formats. The HashMap is used for retrieving the icon associated
with a particular ContentItem
.
HashMap
private Image getStandardIcon(ApplicationData content)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |