filedialog.html
来自「API資料大全」· HTML 代码 · 共 646 行 · 第 1/4 页
HTML
646 行
<DT><B>Parameters:</B><DD><CODE>mode</CODE> - the mode for this file dialog, either <code>FileDialog.LOAD</code> or <code>FileDialog.SAVE</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if an illegal file dialog mode is used.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/FileDialog.html#LOAD"><CODE>LOAD</CODE></A>, <A HREF="../../java/awt/FileDialog.html#SAVE"><CODE>SAVE</CODE></A>, <A HREF="../../java/awt/FileDialog.html#getMode()"><CODE>getMode()</CODE></A></DL></DD></DL><HR><A NAME="getDirectory()"><!-- --></A><H3>getDirectory</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getDirectory</B>()</PRE><DL><DD>Gets the directory of this file dialog.<DD><DL><DT><B>Returns:</B><DD>the (potentially null or invalid) directory of this FileDialog.<DT><B>See Also: </B><DD><A HREF="../../java/awt/FileDialog.html#setDirectory(java.lang.String)"><CODE>setDirectory(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="setDirectory(java.lang.String)"><!-- --></A><H3>setDirectory</H3><PRE>public void <B>setDirectory</B>(<A HREF="../../java/lang/String.html">String</A> dir)</PRE><DL><DD>Sets the directory of this file dialog window to be the specified directory. Specifying a <code>null</code> or an invalid directory implies an implementation-defined default. This default will not be realized, however, until the user has selected a file. Until this point, <code>getDirectory()</code> will return the value passed into this method.<p> Specifying "" as the directory is exactly equivalent to specifying <code>null</code> as the directory.<DD><DL><DT><B>Parameters:</B><DD><CODE>dir</CODE> - the specific directory.<DT><B>See Also: </B><DD><A HREF="../../java/awt/FileDialog.html#getDirectory()"><CODE>getDirectory()</CODE></A></DL></DD></DL><HR><A NAME="getFile()"><!-- --></A><H3>getFile</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getFile</B>()</PRE><DL><DD>Gets the selected file of this file dialog.<DD><DL><DT><B>Returns:</B><DD>the currently selected file of this file dialog window, or <code>null</code> if none is selected.<DT><B>See Also: </B><DD><A HREF="../../java/awt/FileDialog.html#setFile(java.lang.String)"><CODE>setFile(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="setFile(java.lang.String)"><!-- --></A><H3>setFile</H3><PRE>public void <B>setFile</B>(<A HREF="../../java/lang/String.html">String</A> file)</PRE><DL><DD>Sets the selected file for this file dialog window to be the specified file. This file becomes the default file if it is set before the file dialog window is first shown.<p> Specifying "" as the file is exactly equivalent to specifying <code>null</code> as the file.<DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the file being set.<DT><B>See Also: </B><DD><A HREF="../../java/awt/FileDialog.html#getFile()"><CODE>getFile()</CODE></A></DL></DD></DL><HR><A NAME="getFilenameFilter()"><!-- --></A><H3>getFilenameFilter</H3><PRE>public <A HREF="../../java/io/FilenameFilter.html">FilenameFilter</A> <B>getFilenameFilter</B>()</PRE><DL><DD>Determines this file dialog's filename filter. A filename filter allows the user to specify which files appear in the file dialog window. Filename filters do not function in Sun's reference implementation for Windows 95, 98, or NT 4.0.<DD><DL><DT><B>Returns:</B><DD>this file dialog's filename filter.<DT><B>See Also: </B><DD><A HREF="../../java/io/FilenameFilter.html"><CODE>FilenameFilter</CODE></A>, <A HREF="../../java/awt/FileDialog.html#setFilenameFilter(java.io.FilenameFilter)"><CODE>setFilenameFilter(java.io.FilenameFilter)</CODE></A></DL></DD></DL><HR><A NAME="setFilenameFilter(java.io.FilenameFilter)"><!-- --></A><H3>setFilenameFilter</H3><PRE>public void <B>setFilenameFilter</B>(<A HREF="../../java/io/FilenameFilter.html">FilenameFilter</A> filter)</PRE><DL><DD>Sets the filename filter for this file dialog window to the specified filter. Filename filters do not function in Sun's reference implementation for Windows 95, 98, or NT 4.0.<DD><DL><DT><B>Parameters:</B><DD><CODE>filter</CODE> - the specified filter.<DT><B>See Also: </B><DD><A HREF="../../java/io/FilenameFilter.html"><CODE>FilenameFilter</CODE></A>, <A HREF="../../java/awt/FileDialog.html#getFilenameFilter()"><CODE>getFilenameFilter()</CODE></A></DL></DD></DL><HR><A NAME="paramString()"><!-- --></A><H3>paramString</H3><PRE>protected <A HREF="../../java/lang/String.html">String</A> <B>paramString</B>()</PRE><DL><DD>Returns the parameter string representing the state of this file dialog window. This string is useful for debugging.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Dialog.html#paramString()">paramString</A></CODE> in class <CODE><A HREF="../../java/awt/Dialog.html">Dialog</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the parameter string of this file dialog window.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FileDialog.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/EventQueue.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/FlowLayout.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="FileDialog.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_classes_inherited_from_class_java.awt.Dialog">INNER</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?