org.gnu.gtk

Class FileChooserButton

public class FileChooserButton extends HBox implements FileChooser

Constructor Summary
FileChooserButton(Handle handle)
Construct a button using a handle to a native resource.
FileChooserButton(String title, FileChooserAction action)
Create a new FileChooserButton
FileChooserButton(String title, FileChooserAction action, String backend)
Create a new FileChooserButton specifying the backend
FileChooserButton(FileChooserDialog dialog)
Create a new FileChooserButton which uses the specified dialog as its' file picking window.
Method Summary
voidaddFilter(FileFilter filter)
voidaddListener(FileChooserListener listener)
voidaddShortcutFolder(String folder)
voidaddShortcutURI(String uri)
FileChooserActiongetAction()
StringgetCurrentFolder()
StringgetCurrentFolderURI()
WidgetgetExtraWidget()
static FileChooserButtongetFileChooserButton(Handle handle)
Internal static factory method to be used by Java-Gnome only.
StringgetFilename()
String[]getFilenames()
FileFiltergetFilter()
booleangetLocalOnly()
StringgetPreviewFilename()
StringgetPreviewURI()
WidgetgetPreviewWidget()
booleangetPreviewWidgetActive()
booleangetSelectMultiple()
booleangetShowHidden()
Sets whether hidden files and folders are displayed in the file selector.
StringgetTitle()
Returns the title of the browse dialog.
StringgetURI()
String[]getURIs()
booleangetUsePreviewLabel()
intgetWidthChars()
Retrieves the width in characters of the button widget's entry and/or label.
FileFilter[]listFilters()
String[]listShortcutFolders()
String[]listShortcutURIs()
voidremoveFilter(FileFilter filter)
voidremoveListener(FileChooserListener listener)
voidremoveShortcutFolder(String folder)
voidremoveShortcutURI(String uri)
voidselectAll()
booleanselectFilename(String filename)
booleanselectURI(String uri)
voidsetAction(FileChooserAction action)
booleansetCurrentFolder(String folder)
booleansetCurrentFolderURI(String folder)
voidsetCurrentName(String name)
voidsetExtraWidget(Widget extraWidget)
booleansetFilename(String filename)
voidsetFilter(FileFilter filter)
voidsetLocalOnly(boolean localOnly)
voidsetPreviewWidget(Widget previewWidget)
voidsetPreviewWidgetActive(boolean active)
voidsetSelectMultiple(boolean selectMultiple)
voidsetShowHidden(boolean hidden)
Sets whether hidden files and folders are displayed in the file selector.
voidsetTitle(String title)
Modifies the title of the browse dialog.
booleansetURI(String uri)
voidsetUsePreviewLabel(boolean useLabel)
voidsetWidthChars(int numChars)
Sets the width in characters that the button's label will use.
voidunselectAll()
voidunselectFilename(String filename)
voidunselectURI(String uri)

Constructor Detail

FileChooserButton

public FileChooserButton(Handle handle)
Construct a button using a handle to a native resource. It should only be used internally by Java-Gnome.

FileChooserButton

public FileChooserButton(String title, FileChooserAction action)
Create a new FileChooserButton

Parameters: title the title of the browse dialog action the open mode for the dialog

FileChooserButton

public FileChooserButton(String title, FileChooserAction action, String backend)
Create a new FileChooserButton specifying the backend

Parameters: title the title of the browse dialog action the open mode for the dialog backend the name of the FileSystem backend to use

FileChooserButton

public FileChooserButton(FileChooserDialog dialog)
Create a new FileChooserButton which uses the specified dialog as its' file picking window.

Parameters: dialog

Method Detail

addFilter

public void addFilter(FileFilter filter)

addListener

public void addListener(FileChooserListener listener)

addShortcutFolder

public void addShortcutFolder(String folder)

addShortcutURI

public void addShortcutURI(String uri)

getAction

public FileChooserAction getAction()

getCurrentFolder

public String getCurrentFolder()

getCurrentFolderURI

public String getCurrentFolderURI()

getExtraWidget

public Widget getExtraWidget()

getFileChooserButton

public static FileChooserButton getFileChooserButton(Handle handle)
Internal static factory method to be used by Java-Gnome only.

getFilename

public String getFilename()

getFilenames

public String[] getFilenames()

getFilter

public FileFilter getFilter()

getLocalOnly

public boolean getLocalOnly()

getPreviewFilename

public String getPreviewFilename()

getPreviewURI

public String getPreviewURI()

getPreviewWidget

public Widget getPreviewWidget()

getPreviewWidgetActive

public boolean getPreviewWidgetActive()

getSelectMultiple

public boolean getSelectMultiple()

getShowHidden

public boolean getShowHidden()
Sets whether hidden files and folders are displayed in the file selector.

Returns: true if hidden files and folders should be displayed.

getTitle

public String getTitle()
Returns the title of the browse dialog.

getURI

public String getURI()

getURIs

public String[] getURIs()

getUsePreviewLabel

public boolean getUsePreviewLabel()

getWidthChars

public int getWidthChars()
Retrieves the width in characters of the button widget's entry and/or label.

listFilters

public FileFilter[] listFilters()

listShortcutFolders

public String[] listShortcutFolders()

listShortcutURIs

public String[] listShortcutURIs()

removeFilter

public void removeFilter(FileFilter filter)

removeListener

public void removeListener(FileChooserListener listener)

removeShortcutFolder

public void removeShortcutFolder(String folder)

removeShortcutURI

public void removeShortcutURI(String uri)

selectAll

public void selectAll()

selectFilename

public boolean selectFilename(String filename)

selectURI

public boolean selectURI(String uri)

setAction

public void setAction(FileChooserAction action)

setCurrentFolder

public boolean setCurrentFolder(String folder)

setCurrentFolderURI

public boolean setCurrentFolderURI(String folder)

setCurrentName

public void setCurrentName(String name)

setExtraWidget

public void setExtraWidget(Widget extraWidget)

setFilename

public boolean setFilename(String filename)

setFilter

public void setFilter(FileFilter filter)

setLocalOnly

public void setLocalOnly(boolean localOnly)

setPreviewWidget

public void setPreviewWidget(Widget previewWidget)

setPreviewWidgetActive

public void setPreviewWidgetActive(boolean active)

setSelectMultiple

public void setSelectMultiple(boolean selectMultiple)

setShowHidden

public void setShowHidden(boolean hidden)
Sets whether hidden files and folders are displayed in the file selector.

Parameters: hidden true if hidden files and folders should be displayed.

setTitle

public void setTitle(String title)
Modifies the title of the browse dialog.

setURI

public boolean setURI(String uri)

setUsePreviewLabel

public void setUsePreviewLabel(boolean useLabel)

setWidthChars

public void setWidthChars(int numChars)
Sets the width in characters that the button's label will use.

unselectAll

public void unselectAll()

unselectFilename

public void unselectFilename(String filename)

unselectURI

public void unselectURI(String uri)