APIdia Launch Partner
Top Fields Constructors Methods
sun.awt.X11

pack-priv final Class XFileDialogPeer

Additional top-level classes in compilation unit: Separator, FileDialogFilter.

extends XDialogPeer
implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener
Class Inheritance
All Implemented Interfaces
sun.awt.X11.XChoicePeerListener, java.awt.KeyEventDispatcher, java.awt.event.ItemListener, java.util.EventListener, java.awt.event.ActionListener, java.awt.peer.FileDialogPeer, java.awt.peer.DialogPeer, java.awt.peer.WindowPeer, java.awt.peer.ContainerPeer, java.awt.peer.ComponentPeer
Imports
java.awt.*, javax.swing.*, java.awt.event.*, java.awt.peer.*, java.io.*, java.util.Locale, .Arrays, sun.awt.AWTAccessor.ComponentAccessor, .AWTAccessor, sun.util.logging.PlatformLogger

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv Panel
pack-priv Button
pack-priv String
pack-priv String
pack-priv List
pack-priv String
pack-priv String
pack-priv Dialog
pack-priv List
pack-priv String
pack-priv FilenameFilter
pack-priv Button
pack-priv TextField
pack-priv String
pack-priv String
pack-priv GridBagConstraints
pack-priv GridBagLayout
pack-priv GridBagLayout
private static final PlatformLogger
pack-priv int
pack-priv Button
pack-priv String
private static final int
pack-priv Choice
pack-priv TextField
pack-priv String
pack-priv Panel
pack-priv String
pack-priv String
pack-priv String
pack-priv TextField
pack-priv FileDialog
pack-priv String
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent actionEvent)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

pack-priv void
addComponent(Component comp, GridBagLayout gb, GridBagConstraints c, int gridx, int gridy, int gridwidth, int anchor, Container cont, int weightx, int weighty, int fill, Insets in)

add Component comp to the container cont.

public void
public boolean
dispatchKeyEvent(KeyEvent keyEvent)

Implements java.awt.KeyEventDispatcher.dispatchKeyEvent.

This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher dispatch the specified event on its behalf.

public void
dispose()

Overrides sun.awt.X11.XDecoratedPeer.dispose.

Implements java.awt.peer.ComponentPeer.dispose.

Disposes all resources held by the component peer.

pack-priv String[]
pack-priv String
getFileName(String str)

get fileName

pack-priv String
pack-priv void
handleCancel()

handle the cancel event

pack-priv void
handleFilter(String f)

handleFilter

pack-priv void
handleQuitButton()

handle the quit event

pack-priv void
handleSelection(String file)

handle the selection event

private void
init(FileDialog target)

pack-priv void
public void
itemStateChanged(ItemEvent itemEvent)

Implements java.awt.event.ItemListener.itemStateChanged.

Invoked when an item has been selected or deselected by the user.

public void
setDirectory(String dir)

Implements java.awt.peer.FileDialogPeer.setDirectory.

set the directory FIXME: we should update 'savedDir' after programmatically 'setDirectory' Otherwise, SavedDir will be not null before second showing So the current directory of the file dialog will be incorrect after second showing since 'setDirectory' will be ignored We can't update savedDir here now since it used very often

public void
setFile(String file)

Implements java.awt.peer.FileDialogPeer.setFile.

set the file

public void
pack-priv void
setFilterEntry(String d, String f)

set the entry of the new dir with f

pack-priv void
setFilterField(String str)

set the text in the filterField

pack-priv void
setSelectionField(String str)

set the text in the selectionField

public void
setVisible(boolean b)

Overrides sun.awt.X11.XDialogPeer.setVisible.

Implements java.awt.peer.ComponentPeer.setVisible.

Makes a component visible or invisible.

public void
public void
pack-priv boolean
public void
public void
Inherited from sun.awt.X11.XDialogPeer:
blockWindowsgetDecorationsgetFunctionsisFocusedWindowModalBlockerisTargetUndecoratedpreInit

Field Detail

actionButtonTextback to summary
pack-priv String actionButtonText
buttonsback to summary
pack-priv Panel buttons
cancelButtonback to summary
pack-priv Button cancelButton
cancelButtonTextback to summary
pack-priv String cancelButtonText
dirback to summary
pack-priv String dir
directoryListback to summary
pack-priv List directoryList
enterFileNameLabelTextback to summary
pack-priv String enterFileNameLabelText
fileback to summary
pack-priv String file
fileDialogback to summary
pack-priv Dialog fileDialog
fileListback to summary
pack-priv List fileList
filesLabelTextback to summary
pack-priv String filesLabelText
filterback to summary
pack-priv FilenameFilter filter
filterButtonback to summary
pack-priv Button filterButton
filterFieldback to summary
pack-priv TextField filterField
filterLabelTextback to summary
pack-priv String filterLabelText
foldersLabelTextback to summary
pack-priv String foldersLabelText
gbcback to summary
pack-priv GridBagConstraints gbc
gblback to summary
pack-priv GridBagLayout gbl
gblButtonsback to summary
pack-priv GridBagLayout gblButtons
logback to summary
private static final PlatformLogger log

Hides sun.awt.X11.XDecoratedPeer.log.

modeback to summary
pack-priv int mode
openButtonback to summary
pack-priv Button openButton
openButtonTextback to summary
pack-priv String openButtonText
PATH_CHOICE_WIDTHback to summary
private static final int PATH_CHOICE_WIDTH
pathChoiceback to summary
pack-priv Choice pathChoice
pathFieldback to summary
pack-priv TextField pathField
pathLabelTextback to summary
pack-priv String pathLabelText
pathPanelback to summary
pack-priv Panel pathPanel
saveButtonTextback to summary
pack-priv String saveButtonText
savedDirback to summary
pack-priv String savedDir
savedFileback to summary
pack-priv String savedFile
selectionFieldback to summary
pack-priv TextField selectionField
targetback to summary
pack-priv FileDialog target

Hides sun.awt.X11.XWindow.target.

titleback to summary
pack-priv String title
userDirback to summary
pack-priv String userDir

Constructor Detail

XFileDialogPeerback to summary
pack-priv XFileDialogPeer(FileDialog target)

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent actionEvent)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

Annotations
@Override
addComponentback to summary
pack-priv void addComponent(Component comp, GridBagLayout gb, GridBagConstraints c, int gridx, int gridy, int gridwidth, int anchor, Container cont, int weightx, int weighty, int fill, Insets in)

add Component comp to the container cont. add the component to the correct GridBagLayout

addItemsToPathChoiceback to summary
public void addItemsToPathChoice(String text)
dispatchKeyEventback to summary
public boolean dispatchKeyEvent(KeyEvent keyEvent)

Implements java.awt.KeyEventDispatcher.dispatchKeyEvent.

Doc from java.awt.KeyEventDispatcher.dispatchKeyEvent.

This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher dispatch the specified event on its behalf. This KeyEventDispatcher is free to retarget the event, consume it, dispatch it itself, or make other changes. This capability is typically used to deliver KeyEvents to Components other than the focus owner. This can be useful when navigating children of non-focusable Windows in an accessible environment, for example. Note that if a KeyEventDispatcher dispatches the KeyEvent itself, it must use redispatchEvent to prevent the current KeyboardFocusManager from recursively requesting that this KeyEventDispatcher dispatch the event again.

If an implementation of this method returns false, then the KeyEvent is passed to the next KeyEventDispatcher in the chain, ending with the current KeyboardFocusManager. If an implementation returns true, the KeyEvent is assumed to have been dispatched (although this need not be the case), and the current KeyboardFocusManager will take no further action with regard to the KeyEvent. In such a case, KeyboardFocusManager.dispatchEvent should return true as well. If an implementation consumes the KeyEvent, but returns false, the consumed event will still be passed to the next KeyEventDispatcher in the chain. It is important for developers to check whether the KeyEvent has been consumed before dispatching it to a target. By default, the current KeyboardFocusManager will not dispatch a consumed KeyEvent.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides sun.awt.X11.XDecoratedPeer.dispose.

Implements java.awt.peer.ComponentPeer.dispose.

Doc from java.awt.peer.ComponentPeer.dispose.

Disposes all resources held by the component peer. This is called when the component has been disconnected from the component hierarchy and is about to be garbage collected.

Annotations
@Override
getDirListback to summary
pack-priv String[] getDirList(String dir)
getFileNameback to summary
pack-priv String getFileName(String str)

get fileName

getParentDirectoryback to summary
pack-priv String getParentDirectory()
handleCancelback to summary
pack-priv void handleCancel()

handle the cancel event

Annotations
@SuppressWarnings:deprecation
handleFilterback to summary
pack-priv void handleFilter(String f)

handleFilter

handleQuitButtonback to summary
pack-priv void handleQuitButton()

handle the quit event

Annotations
@SuppressWarnings:deprecation
handleSelectionback to summary
pack-priv void handleSelection(String file)

handle the selection event

initback to summary
private void init(FileDialog target)
Annotations
@SuppressWarnings:deprecation
installStringsback to summary
pack-priv void installStrings()
itemStateChangedback to summary
public void itemStateChanged(ItemEvent itemEvent)

Implements java.awt.event.ItemListener.itemStateChanged.

Doc from java.awt.event.ItemListener.itemStateChanged.

Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).

Annotations
@Override
See Also
ItemEvent.ITEM_STATE_CHANGED
setDirectoryback to summary
public void setDirectory(String dir)

Implements java.awt.peer.FileDialogPeer.setDirectory.

set the directory FIXME: we should update 'savedDir' after programmatically 'setDirectory' Otherwise, SavedDir will be not null before second showing So the current directory of the file dialog will be incorrect after second showing since 'setDirectory' will be ignored We can't update savedDir here now since it used very often

Annotations
@Override
setFileback to summary
public void setFile(String file)

Implements java.awt.peer.FileDialogPeer.setFile.

set the file

Annotations
@Override
setFilenameFilterback to summary
public void setFilenameFilter(FilenameFilter filter)

Implements java.awt.peer.FileDialogPeer.setFilenameFilter.

set filenameFilter

Annotations
@Override
setFilterEntryback to summary
pack-priv void setFilterEntry(String d, String f)

set the entry of the new dir with f

Annotations
@SuppressWarnings:deprecation
setFilterFieldback to summary
pack-priv void setFilterField(String str)

set the text in the filterField

setSelectionFieldback to summary
pack-priv void setSelectionField(String str)

set the text in the selectionField

setVisibleback to summary
public void setVisible(boolean b)

Overrides sun.awt.X11.XDialogPeer.setVisible.

Implements java.awt.peer.ComponentPeer.setVisible.

Doc from java.awt.peer.ComponentPeer.setVisible.

Makes a component visible or invisible.

Annotations
@Override
unfurledChoiceClosingback to summary
public void unfurledChoiceClosing()

Implements sun.awt.X11.XChoicePeerListener.unfurledChoiceClosing.

Annotations
@Override
unfurledChoiceOpeningback to summary
public void unfurledChoiceOpening(ListHelper choiceHelper)

Implements sun.awt.X11.XChoicePeerListener.unfurledChoiceOpening.

Annotations
@Override
updateDirectoryByUserActionback to summary
pack-priv boolean updateDirectoryByUserAction(String str)
updateIconImagesback to summary
public void updateIconImages()

Overrides sun.awt.X11.XWindowPeer.updateIconImages.

Implements java.awt.peer.WindowPeer.updateIconImages.

Doc from java.awt.peer.WindowPeer.updateIconImages.

Updates the icons for the window.

Annotations
@Override
updateMinimumSizeback to summary
public void updateMinimumSize()

Overrides sun.awt.X11.XDecoratedPeer.updateMinimumSize.

Implements java.awt.peer.WindowPeer.updateMinimumSize.

Doc from java.awt.peer.WindowPeer.updateMinimumSize.

Updates the minimum size on the peer.

Annotations
@Override