|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--amber.server.component.ComponentHandler
|
+--amber.server.component.PanelHandler
|
+--amber.server.panel.BasePanel
|
+--amber.server.panel.BaseFrame
|
+--amber.server.panel.ModalBaseFrame
|
+--amber.server.panel.FileDialog
This class allows a user to browse the file system. It allows the user to specify files for saving and opening. As there are major similarities between the two they are encapsulated in the one object.
BaseFrame, Serialized Form| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static int |
BaseHeight
The starting height of this dialog. |
static int |
BaseWidth
The starting width of this dialog. |
static java.lang.String |
DefaultOpenTitle
This is the default title for the dialog. |
static java.lang.String |
DefaultSaveTitle
This is the default title for the dialog. |
static long |
FileDialogTimeout
This constant defines how long the dialog will wait for the remote user. |
static int |
LOAD
This constant defines the role the dialog will perform. |
static int |
SAVE
This constant defines the role the dialog will perform. |
| Fields inherited from class amber.server.panel.BaseFrame |
title |
| Fields inherited from class amber.server.panel.BasePanel |
autoDoLayoutState, xOffset, yOffset |
| Fields inherited from class amber.server.component.PanelHandler |
AddOperation, autoRedrawState, drawOperations, InsertOperation, PaintPanel, PanelNextAvailableCommand, postInPacketListeners, preInPacketListeners, RemoveAllOperations, RemoveOperation, ReplaceOperation, SetBorder, SetReDraw |
| Fields inherited from class amber.server.component.ComponentHandler |
actionCommand, active, ApplicationId, CancelReturn, dataEncoder, DefaultTimeout, enabledState, encoderBytes, id, InvalidId, MaximumId, NoReturn, OkCancelType, OkReturn, OkType, OkYesReturn, parentPage, responsePackets, timeoutValue, UnchangeableInvalidId, visibleState, YesNoCancelType, YesNoType, YesReturn |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface amber.server.panel.ContainerHandler |
AddComponent, AutoDoLayout, ForceDoLayout, GetInsets, GetInsetsResponse, NextAvailableCommand, RemoveAllComponents, RemoveComponent, SetBounds |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
FileDialog()
Default constructor. |
|
FileDialog(ApplicationInterface appHandler)
The initialising constructor. |
|
FileDialog(ApplicationInterface appHandler,
java.lang.String title)
The initialising constructor. |
|
FileDialog(ApplicationInterface appHandler,
java.lang.String title,
int role)
The initialising constructor. |
|
FileDialog(int id,
ApplicationInterface appHandler,
java.lang.String title,
int role)
The initialising constructor. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
boolean |
canClose()
This function determines if the panel can be closed. |
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
protected void |
defineComponents()
This function is called to define the components which are a part of this template. |
void |
fillControls()
This function should be called at the end of recreatePanel. |
protected void |
fillLists(amber.server.panel.TreeNode parent)
Fills the tree and list with information from the current directory. |
protected amber.server.panel.TreeNode |
findCurrentDirectoryTreeNode()
|
java.io.File |
getBaseDirectory()
This returns the base directory for this filter. |
java.lang.String |
getDirectory()
Gets the directory of this file dialog. |
java.lang.String |
getFile()
Gets the selected file of this file dialog. |
FileFilter |
getFileFilter()
Determines this file dialog's extended filename filter. |
java.io.FilenameFilter |
getFilenameFilter()
Determines this file dialog's filename filter. |
int |
getMode()
Indicates whether this file dialog box is for loading from a file or for saving to a file. |
boolean |
isCancelPressed()
Once the dialog returns from the show function this function indicates whether the Cancel button was pressed. |
boolean |
isOkPressed()
Once the dialog returns from the show function this function indicates whether the OK button was pressed. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
protected void |
reSizeDialog(int width,
int height)
This dialog resizes all the internal components to match the new size. |
void |
saveData()
This function is called to save any required information in the panel. |
protected amber.server.panel.TreeNode |
selectByDirectory()
|
void |
setBaseDirectory(java.io.File directory)
This sets the base directory for this dialog. |
void |
setBaseDirectory(java.lang.String directory)
This sets the base directory for this dialog. |
protected amber.server.panel.TreeNode |
setBaseDirectoryTree()
Recurses from the current directory to the base directory if exists or the top of the file system if not. |
void |
setDirectory(java.io.File dir)
Sets the directory of this file dialog window to be the specified directory. |
void |
setDirectory(java.lang.String dir)
Sets the directory of this file dialog window to be the specified directory. |
void |
setFile(java.lang.String file)
Sets the selected file for this file dialog window to be the specified file. |
void |
setFileFilter(FileFilter filter)
Sets the extended filename filter which contains the concept of multiple filters which can be selected by the user. |
void |
setFilenameFilter(java.io.FilenameFilter filter)
Sets the filename filter for this file dialog window to the specified filter. |
void |
setMode(int mode)
Sets the mode of the file dialog. |
void |
setVisible(boolean state)
This function is required for the internal processing of the dialog. |
void |
windowActivated(ComponentWindowEvent e)
This is called when a window is activated. |
void |
windowClosed(ComponentWindowEvent e)
This is called when a window has been closed. |
void |
windowClosing(ComponentWindowEvent e)
This is called when the window is in the process of being closed. |
void |
windowDeactivated(ComponentWindowEvent e)
This is called when a window is de-activated. |
void |
windowDeiconified(ComponentWindowEvent e)
This is called when a window is de-iconified. |
void |
windowIconified(ComponentWindowEvent e)
This is called when a window is iconified. |
void |
windowOpened(ComponentWindowEvent e)
This function is invoked when a window has been opened. |
| Methods inherited from class amber.server.panel.ModalBaseFrame |
show |
| Methods inherited from class amber.server.panel.BaseFrame |
getPanelType, getTitle, isVisible, setActive, setBounds, setBounds, setInternalBounds, setInternalBounds, setInternalLocation, setInternalLocation, setInternalSize, setInternalSize, setLocation, setLocation, setSize, setSize, setTitle, toBack, toFront |
| Methods inherited from class java.awt.Component |
action, add, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, reshape, resize, resize, setComponentOrientation, setDropTarget, setLocale, setName, show, size, toString, transferFocus, update, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LOAD
public static final int SAVE
public static final long FileDialogTimeout
public static final int BaseWidth
public static final int BaseHeight
public static final java.lang.String DefaultOpenTitle
public static final java.lang.String DefaultSaveTitle
| Constructor Detail |
public FileDialog()
public FileDialog(ApplicationInterface appHandler)
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
public FileDialog(ApplicationInterface appHandler,
java.lang.String title)
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.title - String title of the window.
public FileDialog(ApplicationInterface appHandler,
java.lang.String title,
int role)
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.title - String title of the window.role - int containing the role the dialog will perform.
public FileDialog(int id,
ApplicationInterface appHandler,
java.lang.String title,
int role)
id - The ID of the corresponding remote frame control.appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.title - String title of the window.role - int containing the role the dialog will perform.| Method Detail |
public void fillControls()
fillControls in class ModalBaseFrameamber.server.panel.ContainerHandlerBasePanel.defineComponents()public boolean canClose()
canClose in class ModalBaseFramepublic void saveData()
saveData in class ModalBaseFrameamber.server.panel.ContainerHandlerPanelTemplateGrouppublic void setVisible(boolean state)
setVisible in class BaseFrameModalBaseFrame.show()
protected void reSizeDialog(int width,
int height)
width - int width of the dialog.height - int height of the dialog.protected void defineComponents()
defineComponents in class ModalBaseFramepublic int getMode()
public void setMode(int mode)
mode - the mode for this file dialog.java.lang.IllegalArgumentException - if an illegal file
dialog mode is used.public java.lang.String getDirectory()
public void setDirectory(java.lang.String dir)
dir. - String directory to set.public void setDirectory(java.io.File dir)
dir. - File directory to set.
public java.lang.String getFile()
throws java.io.IOException
java.io.IOException - containing errors in the file system.public void setFile(java.lang.String file)
file - String containing the file to set.public java.io.FilenameFilter getFilenameFilter()
public FileFilter getFileFilter()
public void setFilenameFilter(java.io.FilenameFilter filter)
filter - the specified filter.
public void setFileFilter(FileFilter filter)
throws ComponentHandlerException
filter - The FileFilter to use.ComponentHandlerException - containing messaging errors.public void setBaseDirectory(java.lang.String directory)
directory - String containing the base directory.public void setBaseDirectory(java.io.File directory)
directory - File containing the base directory.public java.io.File getBaseDirectory()
public boolean isOkPressed()
public boolean isCancelPressed()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void windowOpened(ComponentWindowEvent e)
ComponentWindowListenerwindowOpened in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.public void windowClosing(ComponentWindowEvent e)
ComponentWindowListenerwindowClosing in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.public void windowClosed(ComponentWindowEvent e)
ComponentWindowListenerwindowClosed in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.public void windowIconified(ComponentWindowEvent e)
ComponentWindowListenerwindowIconified in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.public void windowDeiconified(ComponentWindowEvent e)
ComponentWindowListenerwindowDeiconified in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.public void windowActivated(ComponentWindowEvent e)
ComponentWindowListenerwindowActivated in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.public void windowDeactivated(ComponentWindowEvent e)
ComponentWindowListenerwindowDeactivated in interface ComponentWindowListeneramber.awt.event.ComponentWindowListenere - ComponentWindowEvent which contains information on
what happened.
protected void fillLists(amber.server.panel.TreeNode parent)
throws java.io.IOException,
ComponentHandlerException
parent - TreeNode parent which will contain the new directories.java.io.IOException - containing file based errors.ComponentHandlerException - containing
amber messaging errors.
protected amber.server.panel.TreeNode setBaseDirectoryTree()
throws java.io.IOException,
ComponentHandlerException
java.io.IOException - containing file based errors.ComponentHandlerException - containing
amber messaging errors.protected amber.server.panel.TreeNode selectByDirectory()
protected amber.server.panel.TreeNode findCurrentDirectoryTreeNode()
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListenerpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||