程序包 weka.gui
类 ConverterFileChooser
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JFileChooser
weka.gui.ConverterFileChooser
- 所有已实现的接口:
ImageObserver
,MenuContainer
,Serializable
,Accessible
A specialized JFileChooser that lists all available file Loaders and Savers.
To list only savers that can handle the data that is about to be saved, one
can set a Capabilities filter.
- 版本:
- $Revision: 7464 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 javax.swing.JComponent
JComponent.AccessibleJComponent
从类继承的嵌套类/接口 java.awt.Component
Component.BaselineResizeBehavior
-
字段概要
字段修饰符和类型字段说明static final int
the loader dialogstatic final int
the saver dialogstatic final int
unhandled type of dialog从类继承的字段 javax.swing.JFileChooser
ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY, 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, CONTROL_BUTTONS_ARE_SHOWN_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
从类继承的字段 javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
从类继承的字段 java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
从接口继承的字段 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
构造器概要
构造器构造器说明onstructs a FileChooser pointing to the user's default directory.ConverterFileChooser
(File currentDirectory) Constructs a FileChooser using the given File as the path.ConverterFileChooser
(String currentDirectory) Constructs a FileChooser using the given path. -
方法概要
修饰符和类型方法说明returns the capabilities filter for the savers, can be null if all are listed.boolean
Returns whether only the hardcoded core converters are displayed.boolean
Returns whether the selected file must exist (only open dialog).returns the loader that was chosen by the user, can be null in case the user aborted the dialog or the save dialog was shownboolean
Returns whether a popup appears with a warning that the file already exists (only save dialog).getSaver()
returns the saver that was chosen by the user, can be null in case the user aborted the dialog or the open dialog was shownstatic void
For testing the file chooservoid
sets the capabilities that the savers must have.void
setCoreConvertersOnly
(boolean value) Whether to display only the hardocded core converters.void
setFileMustExist
(boolean value) Whether the selected file must exst (only open dialog).void
setOverwriteWarning
(boolean value) Whether a warning is popped up if the file that is to be saved already exists (only save dialog).int
showDialog
(Component parent, String approveButtonText) Pops a custom file chooser dialog with a custom approve button.int
showOpenDialog
(Component parent) Pops up an "Open File" file chooser dialog.int
showSaveDialog
(Component parent) Pops up an "Save File" file chooser dialog.从类继承的方法 javax.swing.JFileChooser
accept, addActionListener, addChoosableFileFilter, approveSelection, cancelSelection, changeToParentDirectory, ensureFileIsVisible, getAcceptAllFileFilter, getAccessibleContext, getAccessory, getActionListeners, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getChoosableFileFilters, getControlButtonsAreShown, getCurrentDirectory, getDescription, getDialogTitle, getDialogType, getDragEnabled, getFileFilter, getFileSelectionMode, getFileSystemView, getFileView, getIcon, getName, getSelectedFile, getSelectedFiles, getTypeDescription, getUI, getUIClassID, isAcceptAllFileFilterUsed, isDirectorySelectionEnabled, isFileHidingEnabled, isFileSelectionEnabled, isMultiSelectionEnabled, isTraversable, removeActionListener, removeChoosableFileFilter, rescanCurrentDirectory, resetChoosableFileFilters, setAcceptAllFileFilterUsed, setAccessory, setApproveButtonMnemonic, setApproveButtonMnemonic, setApproveButtonText, setApproveButtonToolTipText, setControlButtonsAreShown, setCurrentDirectory, setDialogTitle, setDialogType, setDragEnabled, setFileFilter, setFileHidingEnabled, setFileSelectionMode, setFileSystemView, setFileView, setMultiSelectionEnabled, setSelectedFile, setSelectedFiles, updateUI
从类继承的方法 javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
从类继承的方法 java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
从类继承的方法 java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
字段详细资料
-
构造器详细资料
-
ConverterFileChooser
public ConverterFileChooser()onstructs a FileChooser pointing to the user's default directory. -
ConverterFileChooser
Constructs a FileChooser using the given File as the path.- 参数:
currentDirectory
- the path to start in
-
ConverterFileChooser
Constructs a FileChooser using the given path.- 参数:
currentDirectory
- the path to start in
-
-
方法详细资料
-
setCapabilitiesFilter
sets the capabilities that the savers must have. use null if all should be listed.- 参数:
value
- the minimum Capabilities the savers must have
-
getCapabilitiesFilter
returns the capabilities filter for the savers, can be null if all are listed.- 返回:
- the minimum Capabilities the savers must have
-
setOverwriteWarning
public void setOverwriteWarning(boolean value) Whether a warning is popped up if the file that is to be saved already exists (only save dialog).- 参数:
value
- if true a warning will be popup
-
getOverwriteWarning
public boolean getOverwriteWarning()Returns whether a popup appears with a warning that the file already exists (only save dialog).- 返回:
- true if a warning pops up
-
setFileMustExist
public void setFileMustExist(boolean value) Whether the selected file must exst (only open dialog).- 参数:
value
- if true the file must exist
-
getFileMustExist
public boolean getFileMustExist()Returns whether the selected file must exist (only open dialog).- 返回:
- true if the file must exist
-
setCoreConvertersOnly
public void setCoreConvertersOnly(boolean value) Whether to display only the hardocded core converters. Necessary for RMI/Remote Experiments (dynamic class discovery doesn't work there!).- 参数:
value
- if true only the core converters will be displayed- 另请参阅:
-
m_CoreConvertersOnly
-
getCoreConvertersOnly
public boolean getCoreConvertersOnly()Returns whether only the hardcoded core converters are displayed. Necessary for RMI/REmote Experiments (dynamic class discovery doesn't work there!).- 返回:
- true if the file must exist
- 另请参阅:
-
m_CoreConvertersOnly
-
showDialog
Pops a custom file chooser dialog with a custom approve button. Throws an exception, if the dialog type is UNHANDLED_DIALOG.- 覆盖:
showDialog
在类中JFileChooser
- 参数:
parent
- the parent of this dialogapproveButtonText
- the text for the OK button- 返回:
- the user's action
-
showOpenDialog
Pops up an "Open File" file chooser dialog.- 覆盖:
showOpenDialog
在类中JFileChooser
- 参数:
parent
- the parent of this file chooser- 返回:
- the result of the user's action
-
showSaveDialog
Pops up an "Save File" file chooser dialog.- 覆盖:
showSaveDialog
在类中JFileChooser
- 参数:
parent
- the parent of this file chooser- 返回:
- the result of the user's action
-
getLoader
returns the loader that was chosen by the user, can be null in case the user aborted the dialog or the save dialog was shown- 返回:
- the chosen loader, if any
-
getSaver
returns the saver that was chosen by the user, can be null in case the user aborted the dialog or the open dialog was shown- 返回:
- the chosen saver, if any
-
main
For testing the file chooser- 参数:
args
- the commandline options - ignored- 抛出:
Exception
- if something goes wrong with loading/saving
-