com.ibm.as400.vaccess
Class IFSFileDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by com.ibm.as400.vaccess.IFSFileDialog
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

Deprecated. Use com.ibm.as400.access.IFSSystemView instead.

public class IFSFileDialog
extends Dialog

The IFSFileDialog class represents a file dialog for the IFS file classes. This dialog allows the user to traverse the file system and select a file. The text on the Cancel button and the OK button can be set by the calling application. A filter list can be provided by the caller. This dialog is designed to emulate the Windows file dialog. Usage:

      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
      }
 

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
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.
 
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
IFSFileDialog(Frame parent, String title, AS400 system)
          Deprecated. Constructs an IFSFileDialog object.
 
Method Summary
protected  void add(Component component, GridBagLayout layout, 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.
 String getAbsolutePath()
          Deprecated. Returns the absolute path for the file that was selected.
 String getCancelButtonText()
          Deprecated. Returns the text for the Cancel button.
 String getDirectory()
          Deprecated. Returns the path for the file selected.
 FileFilter getFileFilter()
          Deprecated. Returns the filter that was selected.
 String getFileName()
          Deprecated. Returns the selected file name.
 String getOkButtonText()
          Deprecated. Returns the text for the Ok button.
 AS400 getSystem()
          Deprecated. Returns the system for this dialog.
 void setCancelButtonText(String buttonText)
          Deprecated. Sets the text for the Cancel button.
 void setDirectory(String path)
          Deprecated. Sets the path to be used.
 void setFileFilter(FileFilter[] filterList, int defaultFilter)
          Deprecated. Sets the filter list.
 void setFileName(String filename)
          Deprecated. Sets the file name field.
 void setOkButtonText(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.
 
Methods inherited from class java.awt.Dialog
addNotify, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
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, 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, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTIVE

public static final int ACTIVE
Deprecated. 
Dialog still active.

See Also:
Constant Field Values

OK

public static final int OK
Deprecated. 
Dialog was dismissed with the Ok button.

See Also:
Constant Field Values

CANCEL

public static final int CANCEL
Deprecated. 
Dialog was dismissed with the Cancel button.

See Also:
Constant Field Values
Constructor Detail

IFSFileDialog

public IFSFileDialog(Frame parent,
                     String title,
                     AS400 system)
Deprecated. 
Constructs an IFSFileDialog object.

Parameters:
parent - The parent.
title - The title of the dialog.
system - The system.
Method Detail

add

protected void add(Component component,
                   GridBagLayout layout,
                   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.

Parameters:
component - the user interface component to add
layout - the GridBagLayout manager
constraints - the constraints for the component
x - the x coordinate of the leftmost cell of the component
y - the y coordinate of the topmost cell of the component
width - the horizontal measurement of the component in cells
height - the vertical measurement of the component in cells

getAbsolutePath

public String getAbsolutePath()
Deprecated. 
Returns the absolute path for the file that was selected.

Returns:
The fully qualified path, including the file name.

getCancelButtonText

public String getCancelButtonText()
Deprecated. 
Returns the text for the Cancel button.

Returns:
The text for the Cancel button.

getFileName

public String getFileName()
Deprecated. 
Returns the selected file name.

Returns:
The file name.

getFileFilter

public FileFilter getFileFilter()
Deprecated. 
Returns the filter that was selected.

Returns:
The file filter that was selected.

getOkButtonText

public String getOkButtonText()
Deprecated. 
Returns the text for the Ok button.

Returns:
The text for the Ok button.

getDirectory

public String getDirectory()
Deprecated. 
Returns the path for the file selected. The file name is not part of the path.

Returns:
The path for the selected file.

getSystem

public AS400 getSystem()
Deprecated. 
Returns the system for this dialog.

Returns:
The object that represents the system.

setCancelButtonText

public void setCancelButtonText(String buttonText)
Deprecated. 
Sets the text for the Cancel button.

Parameters:
buttonText - The text to use for the Cancel button.

setFileName

public void setFileName(String filename)
Deprecated. 
Sets the file name field.

Parameters:
filename - The name of the file.

setFileFilter

public void setFileFilter(FileFilter[] filterList,
                          int defaultFilter)
Deprecated. 
Sets the filter list.

Parameters:
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).

setOkButtonText

public void setOkButtonText(String buttonText)
Deprecated. 
Sets the button text for the Ok button.

Parameters:
buttonText - The text to use for the Ok button.

setDirectory

public void setDirectory(String path)
Deprecated. 
Sets the path to be used.

Parameters:
path - The path to use.

setVisible

public void setVisible()
Deprecated. 
Shows the dialog.


showDialog

public int showDialog()
Deprecated. 
Shows the dialog and returns the current state.

Returns:
The current state of the dialog.