|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JFileChooser | +--com.sun.xfilechooser.XFileChooser
XFileChooser is an extension of the JFileChooser. It provides a simple mechanism for the user to choose a file locally and remotely via NFS URLs. Instead of returning a File Object which is done in JFileChooser it returns and XFile Object. The XFile object allows access to local and remote files.
#javax.swing.JFileChooser
, Serialized FormInner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static java.lang.String |
SELECTED_XFILE_CHANGED_PROPERTY
Identifes change in user's single-file selection. |
static java.lang.String |
SELECTED_XFILES_CHANGED_PROPERTY
Identifes change in user's multiple-file selection. |
static java.lang.String |
XDIRECTORY_CHANGED_PROPERTY
Identifies user's directory change. |
Fields inherited from class javax.swing.JFileChooser |
ACCESSORY_CHANGED_PROPERTY,
APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY,
APPROVE_BUTTON_TEXT_CHANGED_PROPERTY,
APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY,
APPROVE_OPTION,
APPROVE_SELECTION,
CANCEL_OPTION,
CANCEL_SELECTION,
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY,
CUSTOM_DIALOG,
DIALOG_TITLE_CHANGED_PROPERTY,
DIALOG_TYPE_CHANGED_PROPERTY,
DIRECTORIES_ONLY,
DIRECTORY_CHANGED_PROPERTY,
ERROR_OPTION,
FILE_FILTER_CHANGED_PROPERTY,
FILE_HIDING_CHANGED_PROPERTY,
FILE_SELECTION_MODE_CHANGED_PROPERTY,
FILE_SYSTEM_VIEW_CHANGED_PROPERTY,
FILE_VIEW_CHANGED_PROPERTY,
FILES_AND_DIRECTORIES,
FILES_ONLY,
MULTI_SELECTION_ENABLED_CHANGED_PROPERTY,
OPEN_DIALOG,
SAVE_DIALOG,
SELECTED_FILE_CHANGED_PROPERTY,
SELECTED_FILES_CHANGED_PROPERTY |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
XFileChooser()
Creates a XFileChooser pointing to the user's home directory. |
|
XFileChooser(java.lang.String currentDirectoryPath)
Creates a XFileChooser using the given path. |
|
XFileChooser(XFile currentDirectory)
Creates a XFileChooser using the given XFile as the path. |
Method Summary | |
void |
ensureFileIsVisible(XFile f)
Make sure that the specified file is viewable, and not hidden. |
XFile |
getCurrentXDirectory()
Returns XFile Object of the current directory. |
XFile |
getSelectedXFile()
Returns the XFile object of the selected file. |
XFileInputStream |
getSelectedXFileInputStream()
Returns the XFileInputStream object of the selected file |
XFileOutputStream |
getSelectedXFileOutputStream()
Returns the XFileOutputStream object of the selected file |
XFile[] |
getSelectedXFiles()
Returns a list of selected files if the filechooser is set to allow multi-selection. |
static void |
main(java.lang.String[] args)
Used only for testing of bean |
void |
propertyChange(java.beans.PropertyChangeEvent e)
This method gets called when certain bound properties has changed on the associated JFileChooser. |
void |
setCurrentXDirectory(XFile currentDirectory)
Sets the current directory. |
void |
setSelectedXFile(XFile selectedFile)
Sets the XFile object of the selected file. |
void |
setSelectedXFiles(XFile[] selectedFiles)
Sets the list of selected files if the filechooser is set to allow multi-selection. |
Methods inherited from class javax.swing.JFileChooser |
accept,
addActionListener,
addChoosableFileFilter,
approveSelection,
cancelSelection,
changeToParentDirectory,
ensureFileIsVisible,
getAcceptAllFileFilter,
getAccessibleContext,
getAccessory,
getApproveButtonMnemonic,
getApproveButtonText,
getApproveButtonToolTipText,
getChoosableFileFilters,
getCurrentDirectory,
getDescription,
getDialogTitle,
getDialogType,
getFileFilter,
getFileSelectionMode,
getFileSystemView,
getFileView,
getIcon,
getName,
getSelectedFile,
getSelectedFiles,
getTypeDescription,
getUI,
getUIClassID,
isDirectorySelectionEnabled,
isFileHidingEnabled,
isFileSelectionEnabled,
isMultiSelectionEnabled,
isTraversable,
removeActionListener,
removeChoosableFileFilter,
rescanCurrentDirectory,
resetChoosableFileFilters,
setAccessory,
setApproveButtonMnemonic,
setApproveButtonMnemonic,
setApproveButtonText,
setApproveButtonToolTipText,
setCurrentDirectory,
setDialogTitle,
setDialogType,
setFileFilter,
setFileHidingEnabled,
setFileSelectionMode,
setFileSystemView,
setFileView,
setMultiSelectionEnabled,
setSelectedFile,
setSelectedFiles,
showDialog,
showOpenDialog,
showSaveDialog,
updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getPreferredSize,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintImmediately,
paintImmediately,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setVisible,
unregisterKeyboardAction,
update |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
createImage,
createImage,
disable,
dispatchEvent,
enable,
enable,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String XDIRECTORY_CHANGED_PROPERTY
public static final java.lang.String SELECTED_XFILE_CHANGED_PROPERTY
public static final java.lang.String SELECTED_XFILES_CHANGED_PROPERTY
Constructor Detail |
public XFileChooser()
public XFileChooser(java.lang.String currentDirectoryPath)
currentDirectoryPath
- a String giving the path to a file or directorypublic XFileChooser(XFile currentDirectory)
currentDirectory
- a XFile object specifying the path to a file
or directoryMethod Detail |
public void propertyChange(java.beans.PropertyChangeEvent e)
public XFile getCurrentXDirectory()
setCurrentXDirectory(com.sun.xfile.XFile)
public void setCurrentXDirectory(XFile currentDirectory)
currentDirectory
- the XFile object of the
current directory to point to.getCurrentXDirectory()
public XFile getSelectedXFile()
setSelectedXFile(com.sun.xfile.XFile)
public void setSelectedXFile(XFile selectedFile)
selectedFile
- the XFile object of the selected filegetSelectedXFile()
public XFile[] getSelectedXFiles()
setSelectedXFiles(com.sun.xfile.XFile[])
public void setSelectedXFiles(XFile[] selectedFiles)
public XFileInputStream getSelectedXFileInputStream()
setSelectedXFile(com.sun.xfile.XFile)
public XFileOutputStream getSelectedXFileOutputStream()
setSelectedXFile(com.sun.xfile.XFile)
public void ensureFileIsVisible(XFile f)
f
- an XFile objectpublic static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |