org.gnu.gtk

Class FileChooserButton

Implemented Interfaces:
FileChooser

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

void
addFilter(FileFilter filter)
void
addListener(FileChooserListener listener)
void
addShortcutFolder(String folder)
void
addShortcutURI(String uri)
FileChooserAction
getAction()
String
getCurrentFolder()
String
getCurrentFolderURI()
Widget
getExtraWidget()
static FileChooserButton
getFileChooserButton(Handle handle)
Internal static factory method to be used by Java-Gnome only.
String
getFilename()
String[]
getFilenames()
FileFilter
getFilter()
boolean
getLocalOnly()
String
getPreviewFilename()
String
getPreviewURI()
Widget
getPreviewWidget()
boolean
getPreviewWidgetActive()
boolean
getSelectMultiple()
boolean
getShowHidden()
Sets whether hidden files and folders are displayed in the file selector.
String
getTitle()
Returns the title of the browse dialog.
String
getURI()
String[]
getURIs()
boolean
getUsePreviewLabel()
int
getWidthChars()
Retrieves the width in characters of the button widget's entry and/or label.
FileFilter[]
listFilters()
String[]
listShortcutFolders()
String[]
listShortcutURIs()
void
removeFilter(FileFilter filter)
void
removeListener(FileChooserListener listener)
void
removeShortcutFolder(String folder)
void
removeShortcutURI(String uri)
void
selectAll()
boolean
selectFilename(String filename)
boolean
selectURI(String uri)
void
setAction(FileChooserAction action)
boolean
setCurrentFolder(String folder)
boolean
setCurrentFolderURI(String folder)
void
setCurrentName(String name)
void
setExtraWidget(Widget extraWidget)
boolean
setFilename(String filename)
void
setFilter(FileFilter filter)
void
setLocalOnly(boolean localOnly)
void
setPreviewWidget(Widget previewWidget)
void
setPreviewWidgetActive(boolean active)
void
setSelectMultiple(boolean selectMultiple)
void
setShowHidden(boolean hidden)
Sets whether hidden files and folders are displayed in the file selector.
void
setTitle(String title)
Modifies the title of the browse dialog.
boolean
setURI(String uri)
void
setUsePreviewLabel(boolean useLabel)
void
setWidthChars(int numChars)
Sets the width in characters that the button's label will use.
void
unselectAll()
void
unselectFilename(String filename)
void
unselectURI(String uri)

Methods inherited from class org.gnu.gtk.HBox

getHBox, getType

Methods inherited from class org.gnu.gtk.Box

getHomogeneous, getSpacing, getType, packEnd, packEnd, packStart, packStart, reorderChild, setHomogeneous, setSpacing

Methods inherited from class org.gnu.gtk.Container

add, addListener, getBorderWidth, getChildren, getEventListenerClass, getEventType, getResizeMode, getType, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode

Methods inherited from class org.gnu.gtk.Widget

activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getEventListenerClass, getEventType, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getScreen, getSensitive, getStyle, getToplevel, getType, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight

Methods inherited from class org.gnu.gtk.GtkObject

destroy, getType, sink

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

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 Details

addFilter

public void addFilter(FileFilter filter)
Specified by:
addFilter in interface FileChooser

addListener

public void addListener(FileChooserListener listener)
Specified by:
addListener in interface FileChooser

addShortcutFolder

public void addShortcutFolder(String folder)
            throws FileChooserException
Specified by:
addShortcutFolder in interface FileChooser

addShortcutURI

public void addShortcutURI(String uri)
            throws FileChooserException
Specified by:
addShortcutURI in interface FileChooser

getAction

public FileChooserAction getAction()
Specified by:
getAction in interface FileChooser

getCurrentFolder

public String getCurrentFolder()
Specified by:
getCurrentFolder in interface FileChooser

getCurrentFolderURI

public String getCurrentFolderURI()
Specified by:
getCurrentFolderURI in interface FileChooser

getExtraWidget

public Widget getExtraWidget()
Specified by:
getExtraWidget in interface FileChooser

getFileChooserButton

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

getFilename

public String getFilename()
Specified by:
getFilename in interface FileChooser

getFilenames

public String[] getFilenames()
Specified by:
getFilenames in interface FileChooser

getFilter

public FileFilter getFilter()
Specified by:
getFilter in interface FileChooser

getLocalOnly

public boolean getLocalOnly()
Specified by:
getLocalOnly in interface FileChooser

getPreviewFilename

public String getPreviewFilename()
Specified by:
getPreviewFilename in interface FileChooser

getPreviewURI

public String getPreviewURI()
Specified by:
getPreviewURI in interface FileChooser

getPreviewWidget

public Widget getPreviewWidget()
Specified by:
getPreviewWidget in interface FileChooser

getPreviewWidgetActive

public boolean getPreviewWidgetActive()
Specified by:
getPreviewWidgetActive in interface FileChooser

getSelectMultiple

public boolean getSelectMultiple()
Specified by:
getSelectMultiple in interface FileChooser

getShowHidden

public boolean getShowHidden()
Sets whether hidden files and folders are displayed in the file selector.
Specified by:
getShowHidden in interface FileChooser
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()
Specified by:
getURI in interface FileChooser

getURIs

public String[] getURIs()
Specified by:
getURIs in interface FileChooser

getUsePreviewLabel

public boolean getUsePreviewLabel()
Specified by:
getUsePreviewLabel in interface FileChooser

getWidthChars

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

listFilters

public FileFilter[] listFilters()
Specified by:
listFilters in interface FileChooser

listShortcutFolders

public String[] listShortcutFolders()
Specified by:
listShortcutFolders in interface FileChooser

listShortcutURIs

public String[] listShortcutURIs()
Specified by:
listShortcutURIs in interface FileChooser

removeFilter

public void removeFilter(FileFilter filter)
Specified by:
removeFilter in interface FileChooser

removeListener

public void removeListener(FileChooserListener listener)
Specified by:
removeListener in interface FileChooser

removeShortcutFolder

public void removeShortcutFolder(String folder)
            throws FileChooserException
Specified by:
removeShortcutFolder in interface FileChooser

removeShortcutURI

public void removeShortcutURI(String uri)
            throws FileChooserException
Specified by:
removeShortcutURI in interface FileChooser

selectAll

public void selectAll()
Specified by:
selectAll in interface FileChooser

selectFilename

public boolean selectFilename(String filename)
Specified by:
selectFilename in interface FileChooser

selectURI

public boolean selectURI(String uri)
Specified by:
selectURI in interface FileChooser

setAction

public void setAction(FileChooserAction action)
Specified by:
setAction in interface FileChooser

setCurrentFolder

public boolean setCurrentFolder(String folder)
Specified by:
setCurrentFolder in interface FileChooser

setCurrentFolderURI

public boolean setCurrentFolderURI(String folder)
Specified by:
setCurrentFolderURI in interface FileChooser

setCurrentName

public void setCurrentName(String name)
Specified by:
setCurrentName in interface FileChooser

setExtraWidget

public void setExtraWidget(Widget extraWidget)
Specified by:
setExtraWidget in interface FileChooser

setFilename

public boolean setFilename(String filename)
Specified by:
setFilename in interface FileChooser

setFilter

public void setFilter(FileFilter filter)
Specified by:
setFilter in interface FileChooser

setLocalOnly

public void setLocalOnly(boolean localOnly)
Specified by:
setLocalOnly in interface FileChooser

setPreviewWidget

public void setPreviewWidget(Widget previewWidget)
Specified by:
setPreviewWidget in interface FileChooser

setPreviewWidgetActive

public void setPreviewWidgetActive(boolean active)
Specified by:
setPreviewWidgetActive in interface FileChooser

setSelectMultiple

public void setSelectMultiple(boolean selectMultiple)
Specified by:
setSelectMultiple in interface FileChooser

setShowHidden

public void setShowHidden(boolean hidden)
Sets whether hidden files and folders are displayed in the file selector.
Specified by:
setShowHidden in interface FileChooser
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)
Specified by:
setURI in interface FileChooser

setUsePreviewLabel

public void setUsePreviewLabel(boolean useLabel)
Specified by:
setUsePreviewLabel in interface FileChooser

setWidthChars

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

unselectAll

public void unselectAll()
Specified by:
unselectAll in interface FileChooser

unselectFilename

public void unselectFilename(String filename)
Specified by:
unselectFilename in interface FileChooser

unselectURI

public void unselectURI(String uri)
Specified by:
unselectURI in interface FileChooser