public class IFSFileDialog
extends java.awt.Dialog
AS400 sys = new AS400("system1"); IFSFileDialog fd = new IFSFileDialog(this, "File Open", sys); FileFilter[] filterList = {new FileFilter("All files (*.*)", "*.*"), new FileFilter("Executables (*.exe)", "*.exe"), new FileFilter("HTML files (*.html)", "*.html"), new FileFilter("HTML files (*.htm)", "*.htm"), new FileFilter("Images (*.gif)", "*.gif"), new FileFilter("Text files (*.txt)", "*.txt")}; fd.setFileFilter(filterList, 2); if (fd.show() == IFSFileDialog.OK) { String s = fd.getFileName(); // get file name String p = fd.getPath(); // get path String a = fd.getAbsolutePath(); // get fully qualified file }
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVE
Deprecated.
Dialog still active.
|
static int |
CANCEL
Deprecated.
Dialog was dismissed with the Cancel button.
|
static int |
OK
Deprecated.
Dialog was dismissed with the Ok button.
|
Constructor and Description |
---|
IFSFileDialog(java.awt.Frame parent,
java.lang.String title,
AS400 system)
Deprecated.
Constructs an IFSFileDialog object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(java.awt.Component component,
java.awt.GridBagLayout layout,
java.awt.GridBagConstraints constraints,
int x,
int y,
int width,
int height)
Deprecated.
This methods adds a user interface component to the specified
GridBagLayout manager using the specified constraints.
|
java.lang.String |
getAbsolutePath()
Deprecated.
Returns the absolute path for the file that was selected.
|
java.lang.String |
getCancelButtonText()
Deprecated.
Returns the text for the Cancel button.
|
java.lang.String |
getDirectory()
Deprecated.
Returns the path for the file selected.
|
FileFilter |
getFileFilter()
Deprecated.
Returns the filter that was selected.
|
java.lang.String |
getFileName()
Deprecated.
Returns the selected file name.
|
java.lang.String |
getOkButtonText()
Deprecated.
Returns the text for the Ok button.
|
AS400 |
getSystem()
Deprecated.
Returns the system for this dialog.
|
void |
setCancelButtonText(java.lang.String buttonText)
Deprecated.
Sets the text for the Cancel button.
|
void |
setDirectory(java.lang.String path)
Deprecated.
Sets the path to be used.
|
void |
setFileFilter(FileFilter[] filterList,
int defaultFilter)
Deprecated.
Sets the filter list.
|
void |
setFileName(java.lang.String filename)
Deprecated.
Sets the file name field.
|
void |
setOkButtonText(java.lang.String buttonText)
Deprecated.
Sets the button text for the Ok button.
|
void |
setVisible()
Deprecated.
Shows the dialog.
|
int |
showDialog()
Deprecated.
Shows the dialog and returns the current state.
|
addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
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, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
public static final int ACTIVE
public static final int OK
public static final int CANCEL
public IFSFileDialog(java.awt.Frame parent, java.lang.String title, AS400 system)
parent
- The parent.title
- The title of the dialog.system
- The system.protected void add(java.awt.Component component, java.awt.GridBagLayout layout, java.awt.GridBagConstraints constraints, int x, int y, int width, int height)
component
- the user interface component to addlayout
- the GridBagLayout managerconstraints
- the constraints for the componentx
- the x coordinate of the leftmost cell of the componenty
- the y coordinate of the topmost cell of the componentwidth
- the horizontal measurement of the component in cellsheight
- the vertical measurement of the component in cellspublic java.lang.String getAbsolutePath()
public java.lang.String getCancelButtonText()
public java.lang.String getFileName()
public FileFilter getFileFilter()
public java.lang.String getOkButtonText()
public java.lang.String getDirectory()
public AS400 getSystem()
public void setCancelButtonText(java.lang.String buttonText)
buttonText
- The text to use for the Cancel button.public void setFileName(java.lang.String filename)
filename
- The name of the file.public void setFileFilter(FileFilter[] filterList, int defaultFilter)
filterList
- The list of filters to be listed in the choice control.defaultFilter
- The index into the list that is to be used as the default (zero-based).public void setOkButtonText(java.lang.String buttonText)
buttonText
- The text to use for the Ok button.public void setDirectory(java.lang.String path)
path
- The path to use.public void setVisible()
public int showDialog()