⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listresourcebundle.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:36:57 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  ListResourceBundle</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ListResourceBundle.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/util/LinkedList.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/util/Locale.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>  &nbsp;&nbsp;<A HREF="ListResourceBundle.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.util.ResourceBundle">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.util</FONT><BR>Class  ListResourceBundle</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A>  |  +--<A HREF="../../java/util/ResourceBundle.html">java.util.ResourceBundle</A>        |        +--<B>java.util.ListResourceBundle</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../javax/accessibility/AccessibleResourceBundle.html">AccessibleResourceBundle</A></DD></DL><HR><DL><DT>public abstract class <B>ListResourceBundle</B><DT>extends <A HREF="../../java/util/ResourceBundle.html">ResourceBundle</A></DL><P><code>ListResourceBundle</code> is a abstract subclass of <code>ResourceBundle</code> that manages resources for a locale in a convenient and easy to use list. See <code>ResourceBundle</code> for more information about resource bundles in general. <P> Subclasses must override <code>getContents</code> and provide an array, where each item in the array is a pair of objects. The first element of each pair is a <code>String</code> key, and the second is the value associated with that key.  [Right now, there's no error-checking code to enforce this, so you could specify key-value pairs that have something other than a String as a key.  But since the interfaces are defined in terms of String, any value with a key that isn't a String will be inaccessible.] <p> In the following example, the keys are of the form "s1"... The actual keys are entirely up to your choice, so long as they are the same as the keys you use in your program to retrieve the objects from the bundle. Keys are case-sensitive. <code>MyResource</code> is the default version of the bundle family, and <code>MyResource_fr</code> is the french version: <blockquote> <pre> //==================== class MyResource extends ListResourceBundle {  public Object[][] getContents() {      return contents;  }  static final Object[][] contents = {  // LOCALIZE THIS      {"s1", "3"},        // starting value in choice field      {"s2", "MyDisk"},    // starting value in string field      {"s3", "3 Mar 96"}, // starting value in date field      {"s4", "The disk '{1}' contained {0} on {2}."}, // initial pattern      {"s5", "0"},        // first choice number      {"s6", "no files"}, // first choice value      {"s7", "1"},        // second choice number      {"s8", "one file"}, // second choice value      {"s9", "2"},        // third choice number      {"s10", "{0}|3 files"}, // third choice value      {"s11", "format threw an exception: {0}"},  // generic exception message      {"s12", "ERROR"},   // what to show in field in case of error      {"s14", "Result"},  // label for formatted stuff      {"s13", "Dialog"},  // standard font      {"s15", "Pattern"}, // label for standard pattern      {"s16", new Dimension(1,5)} // real object, not just string  // END OF MATERIAL TO LOCALIZE  }; } //==================== class MyResource_fr  extends ListResourceBundle {  public Object[][] getContents() {      return contents;}  static final Object[][] contents = {  // LOCALIZE THIS      {"s1", "3"},        // starting value in choice field      {"s2", "MonDisk"},  // starting value in string field      {"s3", "3 Mar 96"}, // starting value in date field      {"s4", "Le disk '{1}' a {0} a {2}."},   // initial pattern      {"s5", "0"},        // first choice number      {"s6", "pas de files"}, // first choice value      {"s7", "1"},        // second choice number      {"s8", "une file"}, // second choice value      {"s9", "2"},        // third choice number      {"s10", "{0}|3 files"}, // third choice value      {"s11", "Le format a jete une exception: {0}"}, // generic exception message      {"s12", "ERROR"},   // what to show in field in case of error      {"s14", "Resulte"}, // label for formatted stuff      {"s13", "Dialogue"},    // standard font      {"s15", "Pattern"}, // label for standard pattern      {"s16", new Dimension(1,3)} // real object, not just string  // END OF MATERIAL TO LOCALIZE  }; } </pre> </blockquote><P><DL><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/util/ResourceBundle.html"><CODE>ResourceBundle</CODE></A>, <A HREF="../../java/util/PropertyResourceBundle.html"><CODE>PropertyResourceBundle</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_java.util.ResourceBundle"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.util.<A HREF="../../java/util/ResourceBundle.html">ResourceBundle</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/util/ResourceBundle.html#parent">parent</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -