📄 jfilechooser.html
字号:
</TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.<A HREF="../../java/awt/Component.html">Component</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/Component.html#BOTTOM_ALIGNMENT">BOTTOM_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#CENTER_ALIGNMENT">CENTER_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#LEFT_ALIGNMENT">LEFT_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#RIGHT_ALIGNMENT">RIGHT_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#TOP_ALIGNMENT">TOP_ALIGNMENT</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.image.ImageObserver"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface java.awt.image.<A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/image/ImageObserver.html#ABORT">ABORT</A>, <A HREF="../../java/awt/image/ImageObserver.html#ALLBITS">ALLBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#ERROR">ERROR</A>, <A HREF="../../java/awt/image/ImageObserver.html#FRAMEBITS">FRAMEBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#HEIGHT">HEIGHT</A>, <A HREF="../../java/awt/image/ImageObserver.html#PROPERTIES">PROPERTIES</A>, <A HREF="../../java/awt/image/ImageObserver.html#SOMEBITS">SOMEBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#WIDTH">WIDTH</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#JFileChooser()">JFileChooser</A></B>()</CODE><BR> Constructs a <code>JFileChooser</code> pointing to the user's home directory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#JFileChooser(java.io.File)">JFileChooser</A></B>(<A HREF="../../java/io/File.html">File</A> currentDirectory)</CODE><BR> Constructs a <code>JFileChooser</code> using the given <code>File</code> as the path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#JFileChooser(java.io.File, javax.swing.filechooser.FileSystemView)">JFileChooser</A></B>(<A HREF="../../java/io/File.html">File</A> currentDirectory, <A HREF="../../javax/swing/filechooser/FileSystemView.html">FileSystemView</A> fsv)</CODE><BR> Constructs a <code>JFileChooser</code> using the given current directory and <code>FileSystemView</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#JFileChooser(javax.swing.filechooser.FileSystemView)">JFileChooser</A></B>(<A HREF="../../javax/swing/filechooser/FileSystemView.html">FileSystemView</A> fsv)</CODE><BR> Constructs a <code>JFileChooser</code> using the given <code>FileSystemView</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#JFileChooser(java.lang.String)">JFileChooser</A></B>(<A HREF="../../java/lang/String.html">String</A> currentDirectoryPath)</CODE><BR> Constructs a <code>JFileChooser</code> using the given path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#JFileChooser(java.lang.String, javax.swing.filechooser.FileSystemView)">JFileChooser</A></B>(<A HREF="../../java/lang/String.html">String</A> currentDirectoryPath, <A HREF="../../javax/swing/filechooser/FileSystemView.html">FileSystemView</A> fsv)</CODE><BR> Constructs a <code>JFileChooser</code> using the given current directory path and <code>FileSystemView</code>.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#accept(java.io.File)">accept</A></B>(<A HREF="../../java/io/File.html">File</A> f)</CODE><BR> Returns true if the file should be displayed.</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#addActionListener(java.awt.event.ActionListener)">addActionListener</A></B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A> l)</CODE><BR> Adds an <code>ActionListener</code> to the button.</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#addChoosableFileFilter(javax.swing.filechooser.FileFilter)">addChoosableFileFilter</A></B>(<A HREF="../../javax/swing/filechooser/FileFilter.html">FileFilter</A> filter)</CODE><BR> Adds a filter to the list of user choosable file filters.</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#approveSelection()">approveSelection</A></B>()</CODE><BR> Called by the UI when the user hits the Approve button (labeled "Open" or "Save", by default).</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#cancelSelection()">cancelSelection</A></B>()</CODE><BR> Called by the UI when the user chooses the Cancel button.</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#changeToParentDirectory()">changeToParentDirectory</A></B>()</CODE><BR> Changes the directory to be set to the parent of 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#ensureFileIsVisible(java.io.File)">ensureFileIsVisible</A></B>(<A HREF="../../java/io/File.html">File</A> f)</CODE><BR> Makes sure that the specified file is viewable, and not hidden.</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#fireActionPerformed(java.lang.String)">fireActionPerformed</A></B>(<A HREF="../../java/lang/String.html">String</A> command)</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/filechooser/FileFilter.html">FileFilter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getAcceptAllFileFilter()">getAcceptAllFileFilter</A></B>()</CODE><BR> Returns the <code>AcceptAll</code> file filter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE><BR> Gets the AccessibleContext associated with this JFileChooser.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/swing/JComponent.html">JComponent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getAccessory()">getAccessory</A></B>()</CODE><BR> Returns the accessory component.</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#getApproveButtonMnemonic()">getApproveButtonMnemonic</A></B>()</CODE><BR> Returns the approve button's mnemonic.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getApproveButtonText()">getApproveButtonText</A></B>()</CODE><BR> Returns 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> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getApproveButtonToolTipText()">getApproveButtonToolTipText</A></B>()</CODE><BR> Returns 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> <A HREF="../../javax/swing/filechooser/FileFilter.html">FileFilter</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getChoosableFileFilters()">getChoosableFileFilters</A></B>()</CODE><BR> Gets the list of user choosable file filters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JFileChooser.html#getControlButtonsAreShown()">getControlButtonsAreShown</A></B>()</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -