📄 jfilechooser.html
字号:
<CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#resetChoosableFileFilters()">resetChoosableFileFilters</A></B>()</CODE><BR> Resets the choosable file filter list to its starting state.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setAcceptAllFileFilterUsed(boolean)">setAcceptAllFileFilterUsed</A></B>(boolean b)</CODE><BR> Determines if the <code>AcceptAll FileFilter</code> is used.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setAccessory(javax.swing.JComponent)">setAccessory</A></B>(<A HREF="../../javax/swing/JComponent.html">JComponent</A> newAccessory)</CODE><BR> Sets the accessory component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setApproveButtonMnemonic(char)">setApproveButtonMnemonic</A></B>(char mnemonic)</CODE><BR> Sets the approve button's mnemonic using a character.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setApproveButtonMnemonic(int)">setApproveButtonMnemonic</A></B>(int mnemonic)</CODE><BR> Sets the approve button's mnemonic using a numeric keycode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setApproveButtonText(java.lang.String)">setApproveButtonText</A></B>(<A HREF="../../java/lang/String.html">String</A> approveButtonText)</CODE><BR> Sets the text used in the <code>ApproveButton</code> in the <code>FileChooserUI</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setApproveButtonToolTipText(java.lang.String)">setApproveButtonToolTipText</A></B>(<A HREF="../../java/lang/String.html">String</A> toolTipText)</CODE><BR> Sets the tooltip text used in the <code>ApproveButton</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setControlButtonsAreShown(boolean)">setControlButtonsAreShown</A></B>(boolean b)</CODE><BR> Sets whether the approve and cancel buttons are shown in the file chooser.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setCurrentDirectory(java.io.File)">setCurrentDirectory</A></B>(<A HREF="../../java/io/File.html">File</A> dir)</CODE><BR> Sets the current directory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setDialogTitle(java.lang.String)">setDialogTitle</A></B>(<A HREF="../../java/lang/String.html">String</A> dialogTitle)</CODE><BR> Sets the string that goes in the <code>JFileChooser</code> window's title bar.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setDialogType(int)">setDialogType</A></B>(int dialogType)</CODE><BR> Sets the type of this dialog.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setFileFilter(javax.swing.filechooser.FileFilter)">setFileFilter</A></B>(<A HREF="../../javax/swing/filechooser/FileFilter.html">FileFilter</A> filter)</CODE><BR> Sets the current file filter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setFileHidingEnabled(boolean)">setFileHidingEnabled</A></B>(boolean b)</CODE><BR> Sets file hiding on or off.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setFileSelectionMode(int)">setFileSelectionMode</A></B>(int mode)</CODE><BR> Sets the <code>JFileChooser</code> to allow the user to just select files, just select directories, or select both files and directories.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setFileSystemView(javax.swing.filechooser.FileSystemView)">setFileSystemView</A></B>(<A HREF="../../javax/swing/filechooser/FileSystemView.html">FileSystemView</A> fsv)</CODE><BR> Sets the file system view that the <code>JFileChooser</code> uses for accessing and creating file system resources, such as finding the floppy drive and getting a list of root drives.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setFileView(javax.swing.filechooser.FileView)">setFileView</A></B>(<A HREF="../../javax/swing/filechooser/FileView.html">FileView</A> fileView)</CODE><BR> Sets the file view to used to retrieve UI information, such as the icon that represents a file or the type description of a file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setMultiSelectionEnabled(boolean)">setMultiSelectionEnabled</A></B>(boolean b)</CODE><BR> Sets the file chooser to allow multiple file selections.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setSelectedFile(java.io.File)">setSelectedFile</A></B>(<A HREF="../../java/io/File.html">File</A> file)</CODE><BR> Sets the selected file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setSelectedFiles(java.io.File[])">setSelectedFiles</A></B>(<A HREF="../../java/io/File.html">File</A>[] selectedFiles)</CODE><BR> Sets the list of selected files if the file chooser is set to allow multiple selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#setup(javax.swing.filechooser.FileSystemView)">setup</A></B>(<A HREF="../../javax/swing/filechooser/FileSystemView.html">FileSystemView</A> view)</CODE><BR> Performs common constructor initialization and setup.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#showDialog(java.awt.Component, java.lang.String)">showDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parent, <A HREF="../../java/lang/String.html">String</A> approveButtonText)</CODE><BR> Pops a custom file chooser dialog with a custom approve button.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#showOpenDialog(java.awt.Component)">showOpenDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parent)</CODE><BR> Pops up an "Open File" file chooser dialog.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#showSaveDialog(java.awt.Component)">showSaveDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parent)</CODE><BR> Pops up a "Save File" file chooser dialog.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#updateUI()">updateUI</A></B>()</CODE><BR> Notification from the <code>UIFactory</code> that the L&F has changed.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.swing.JComponent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.swing.<A HREF="../../javax/swing/JComponent.html">JComponent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/swing/JComponent.html#addAncestorListener(javax.swing.event.AncestorListener)">addAncestorListener</A>, <A HREF="../../javax/swing/JComponent.html#addNotify()">addNotify</A>, <A HREF="../../javax/swing/JComponent.html#addPropertyChangeListener(java.beans.PropertyChangeListener)">addPropertyChangeListener</A>, <A HREF="../../javax/swing/JComponent.html#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)">addPropertyChangeListener</A>, <A HREF="../../javax/swing/JComponent.html#addVetoableChangeListener(java.beans.VetoableChangeListener)">addVetoableChangeListener</A>, <A HREF="../../javax/swing/JComponent.html#computeVisibleRect(java.awt.Rectangle)">computeVisibleRect</A>, <A HREF="../../javax/swing/JComponent.html#contains(int, int)">contains</A>, <A HREF="../../javax/swing/JComponent.html#createToolTip()">createToolTip</A>, <A HREF="../../javax/swing/JComponent.html#disable()">disable</A>, <A HREF="../../javax/swing/JComponent.html#enable()">enable</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, boolean, boolean)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, byte, byte)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, char, char)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, double, double)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, float, float)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, int, int)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, long, long)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#firePropertyChange(java.lang.String, short, short)">firePropertyChange</A>, <A HREF="../../javax/swing/JComponent.html#fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)">fireVetoableChange</A>, <A HREF="../../javax/swing/JComponent.html#getActionForKeyStroke(javax.swing.KeyStroke)">getActionForKeyStroke</A>, <A HREF="../../javax/swing/JComponent.html#getActionMap()">getActionMap</A>, <A HREF="../../javax/swing/JComponent.html#getAlignmentX()">getAlignmentX</A>, <A HREF="../../javax/swing/JComponent.html#getAlignmentY()">getAlignmentY</A>, <A HREF="../../javax/swing/JComponent.html#getAutoscrolls()">getAutoscrolls</A>, <A HREF="../../javax/swing/JComponent.html#getBorder()">getBorder</A>, <A HREF="../../javax/swing/JComponent.html#getBounds(java.awt.Rectangle)">getBounds</A>, <A HREF="../../javax/swing/JComponent.html#getClientProperty(java.lang.Object)">getClientProperty</A>, <A HREF="../../javax/swing/JComponent.html#getComponentGraphics(java.awt.Graphics)">getComponentGraphics</A>, <A HREF="../../javax/swing/JComponent.html#getConditionForKeyStroke(javax.swing.KeyStroke)">getConditionForKeyStroke</A>, <A HREF="../../javax/swing/JComponent.html#getDebugGraphicsOptions()">getDebugGraphicsOptions</A>, <A HREF="../../javax/swing/JComponent.html#getGraphics()">getGraphics</A>, <A HREF="../../javax/swing/JComponent.html#getHeight()">getHeight</A>, <A HREF="../../javax/swing/JComponent.html#getInputMap()">getInputMap</A>, <A HREF="../../javax/swing/JComponent.html#getInputMap(int)">getInputMap</A>, <A HREF="../../javax/swing/JComponent.html#getInputVerifier()">getInputVerifier</A>, <A HREF="../../javax/swing/JComponent.html#getInsets()">getInsets</A>, <A HREF="../../javax/swing/JComponent.html#getInsets(java.awt.Insets)">getInsets</A>, <A HREF="../../javax/swing/JComponent.html#getListeners(java.lang.Class)">getListeners</A>, <A HREF="../../javax/swing/JComponent.html#getLocation(java.awt.Point)">getLocation</A>, <A HREF="../../javax/swing/JComponent.html#getMaximumSize()">getMaximumSize</A>, <A HREF="../../javax/swing/JComponent.html#getMinimumSize()">getMinimumSize</A>, <A HREF="../../javax/swing/JComponent.html#getNextFocusableComponent()">getNextFocusableComponent</A>, <A HREF="../../javax/swing/JComponent.html#getPreferredSize()">getPreferredSize</A>, <A HREF="../../javax/swing/JComponent.html#getRegisteredKeyStrokes()">getRegisteredKeyStrokes</A>, <A HREF="../../javax/swing/JComponent.html#getRootPane()">getRootPane</A>, <A HREF="../../javax/swing/JComponent.html#getSize(java.awt.Dimension)">getSize</A>, <A HREF="../../javax/swing/JComponent.html#getToolTipLocation(java.awt.event.MouseEvent)">getToolTipLocation</A>, <A HREF="../../javax/swing/JComponent.html#getToolTipText()">getToolTipText</A>, <A HREF="../../javax/swing/JComponent.html#getToolTipText(java.awt.event.MouseEvent)">getToolTipText</A>, <A HREF="../../javax/swing/JComponent.html#getTopLevelAncestor()">getTopLevelAncestor</A>, <A HREF="../../javax/swing/JComponent.html#getVerifyInputWhenFocusTarget()">getVerifyInputWhenFocusTarget</A>, <A HREF="../../javax/swing/JComponent.html#getVisibleRect()">getVisibleRect</A>, <A HREF="../../javax/swing/JComponent.html#getWidth()">getWidth</A>, <A HREF="../../javax/swing/JComponent.html#getX()">getX</A>, <A HREF="../../javax/swing/JComponent.html#getY()">getY</A>, <A HREF="../../javax/swing/JComponent.html#grabFocus()">grabFocus</A>, <A HREF="../../javax/swing/JComponent.html#hasFocus()">hasFocus</A>, <A HREF="../../javax/swing/JComponent.html#hide()">hide</A>, <A HREF="../../javax/swing/JComponent.html#isDoubleBuffered()">isDoubleBuffered</A>, <A HREF="../../javax/swing/JComponent.html#isFocusCycleRoot()">isFocusCycleRoot</A>, <A HREF="../../javax/swing/JComponent.html#isFocusTraversable()">isFocusTraversable</A>, <A HREF="../../javax/swing/JComponent.html#isLightweightComponent(java.awt.Component)">isLightweightComponent</A>, <A HREF="../../javax/swing/JComponent.html#isManagingFocus()">isManagingFocus</A>, <A HREF="../../javax/swing/JComponent.html#isMaximumSizeSet()">isMaximumSizeSet</A>, <A HREF="../../javax/swing/JComponent.html#isMinimumSizeSet()">isMinimumSizeSet</A>, <A HREF="../../javax/swing/JComponent.html#isOpaque()">isOpaque</A>, <A HREF="../../javax/swing/JComponent.html#isOptimizedDrawingEnabled()">isOptimizedDrawingEnabled</A>, <A HREF="../../javax/swing/JComponent.html#isPaintingTile()">isPaintingTile</A>, <A HREF="../../javax/swing/JComponent.html#isPreferredSizeSet()">isPreferredSizeSet</A>, <A HREF="../../javax/swing/JComponent.html#isRequestFocusEnabled()">isRequestFocusEnabled</A>, <A HREF="../../javax/swing/JComponent.html#isValidateRoot()">isValidateRoot</A>, <A HREF="../../javax/swing/JComponent.html#paint(java.awt.Graphics)">paint</A>, <A HREF="../../javax/swing/JComponent.html#paintBorder(java.awt.Graphics)">paintBorder</A>, <A HREF="../../javax/swing/JComponent.html#paintChildren(java.awt.Graphics)">paintChildren</A>, <A HREF="../../javax/swing/JComponent.html#paintComponent(java.awt.Graphics)">paintComponent</A>, <A HREF="../../javax/swing/JComponent.html#paintImmediately(int, int, int, int)">paintImmediately</A>, <A HREF="../../javax/swing/JComponent.html#paintImmediately(java.awt.Rectangle)">paintImmediately</A>, <A HREF="../../javax/swing/JComponent.html#print(java.awt.Graphics)">print</A>, <A HREF="../../javax/swing/JComponent.html#printAll(java.awt.Graphics)">printAll</A>, <A HREF="../../javax/swing/JComponent.html#printBorder(java.awt.Graphics)">printBorder</A>, <A HREF="../../javax/swing/JComponent.html#printChildren(java.awt.Graphics)">printChildren</A>, <A HREF="../../javax/swing/JComponent.html#printComponent(java.awt.Graphics)">printComponent</A>, <A HREF="../../javax/swing/JComponent.html#processComponentKeyEvent(java.awt.event.KeyEvent)">processComponentKeyEvent</A>, <A HREF="../../javax/swing/JComponent.html#processFocusEvent(java.awt.event.FocusEvent)">processFocusEvent</A>, <A HREF="../../javax/swing/JComponent.html#processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean)">processKeyBinding</A>, <A HREF="../../javax/swing/JComponent.html#processKeyEvent(java.awt.event.KeyEvent)">processKeyEvent</A>, <A HREF="../../javax/swing/JComponent.html#processMouseMotionEvent(java.awt.event.MouseEvent)">processMouseMotionEvent</A>, <A HREF="../../javax/swing/JComponent.html#putClientProperty(java.lang.Object, java.lang.Object)">putClientProperty</A>, <A HREF="../../javax/swing/JComponent.html#registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int)">registerKeyboardAction</A>, <A HREF="../../javax/swing/JComponent.html#registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)">registerKeyboardAction</A>, <A HREF="../../javax/swing/JComponent.html#removeAncestorListener(javax.swing.event.AncestorListener)">removeAncestorListener</A>, <A HREF="../../javax/swing/JComponent.html#removeNotify()">removeNotify</A>, <A HREF="../../javax/swing/JComponent.html#removePropertyChangeListener(java.beans.PropertyChangeL
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -