Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.awt
Class FileDialog  view FileDialog download FileDialog.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjava.awt.FileDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, MenuContainer, java.io.Serializable

public class FileDialog
extends Dialog
implements java.io.Serializable

This class implements a file selection dialog box widget.


Nested Class Summary
 
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, Container.GfxPaintAllVisitor, Container.GfxPaintVisitor, Container.GfxPrintAllVisitor, Container.GfxPrintVisitor, Container.GfxVisitor
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy, Component.HeavyweightInLightweightListener
 
Field Summary
private  java.lang.String dir
           
private  java.lang.String file
           
private  java.io.FilenameFilter filter
           
static int LOAD
          Indicates that the purpose of the dialog is for opening a file.
private  int mode
           
static int SAVE
          Indicates that the purpose of the dialog is for saving a file.
private static long serialVersionUID
           
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
windowFocusOwner
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, focusCycleRoot, focusTraversalKeys, layoutMgr, maxSize, ncomponents
 
Fields inherited from class java.awt.Component
accessibleContext, background, BOTTOM_ALIGNMENT, bufferStrategy, CENTER_ALIGNMENT, changeSupport, componentListener, componentSerializedDataVersion, cursor, dropTarget, enabled, eventMask, focusable, focusListener, focusTraversalKeysEnabled, font, foreground, graphicsConfig, height, hierarchyBoundsListener, hierarchyListener, ignoreRepaint, inputMethodListener, isFocusTraversableOverridden, isPacked, keyListener, LEFT_ALIGNMENT, locale, minSize, mouseListener, mouseMotionListener, mouseWheelListener, name, nameExplicitlySet, newEventsOnly, orientation, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, TOP_ALIGNMENT, treeLock, valid, visible, width, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FileDialog(Frame parent)
          Initializes a new instance of FileDialog with the specified parent.
FileDialog(Frame parent, java.lang.String title)
          Initialized a new instance of FileDialog with the specified parent and title.
FileDialog(Frame parent, java.lang.String title, int mode)
          Initialized a new instance of FileDialog with the specified parent, title, and mode.
 
Method Summary
 void addNotify()
          Creates the native peer for this file dialog box.
 java.lang.String getDirectory()
          Returns the directory for this file dialog.
 java.lang.String getFile()
          Returns the file that is selected in this dialog.
 java.io.FilenameFilter getFilenameFilter()
          Returns the filename filter being used by this dialog.
 int getMode()
          Returns the mode of this dialog, either LOAD or SAVE.
protected  java.lang.String paramString()
          Returns a debugging string for this object.
 void setDirectory(java.lang.String dir)
          Sets the directory for this file dialog.
 void setFile(java.lang.String file)
          Sets the selected file for this dialog.
 void setFilenameFilter(java.io.FilenameFilter filter)
          Sets the filename filter used by this dialog.
 void setMode(int mode)
          Sets the mode of this dialog to either LOAD or SAVE.
 
Methods inherited from class java.awt.Dialog
dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispatchEventImpl, generateName, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getGraphicsConfigurationImpl, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setFocusOwner, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, eventTypeEnabled, findComponentAt, findComponentAt, findNextFocusComponent, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, invalidateTree, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, 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, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, 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, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setPeer, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, translateEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOAD

public static final int LOAD
Indicates that the purpose of the dialog is for opening a file.

See Also:
Constant Field Values

SAVE

public static final int SAVE
Indicates that the purpose of the dialog is for saving a file.

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

dir

private java.lang.String dir

file

private java.lang.String file

filter

private java.io.FilenameFilter filter

mode

private int mode
Constructor Detail

FileDialog

public FileDialog(Frame parent)
Initializes a new instance of FileDialog with the specified parent. This dialog will have no title and will be for loading a file.


FileDialog

public FileDialog(Frame parent,
                  java.lang.String title)
Initialized a new instance of FileDialog with the specified parent and title. This dialog will be for opening a file.


FileDialog

public FileDialog(Frame parent,
                  java.lang.String title,
                  int mode)
Initialized a new instance of FileDialog with the specified parent, title, and mode.

Method Detail

getMode

public int getMode()
Returns the mode of this dialog, either LOAD or SAVE.


setMode

public void setMode(int mode)
Sets the mode of this dialog to either LOAD or SAVE. This method is only effective before the native peer is created.


getDirectory

public java.lang.String getDirectory()
Returns the directory for this file dialog.


setDirectory

public void setDirectory(java.lang.String dir)
Sets the directory for this file dialog.


getFile

public java.lang.String getFile()
Returns the file that is selected in this dialog.


setFile

public void setFile(java.lang.String file)
Sets the selected file for this dialog.


getFilenameFilter

public java.io.FilenameFilter getFilenameFilter()
Returns the filename filter being used by this dialog.


setFilenameFilter

public void setFilenameFilter(java.io.FilenameFilter filter)
Sets the filename filter used by this dialog.


addNotify

public void addNotify()
Creates the native peer for this file dialog box.

Overrides:
addNotify in class Dialog

paramString

protected java.lang.String paramString()
Returns a debugging string for this object.

Overrides:
paramString in class Dialog