📄 resourcedictionary.html
字号:
</TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#remove(java.lang.String, java.lang.String)">remove</A></B>(java.lang.String key, java.lang.String meaning)</CODE><BR> Removes the meaning of the key from this dictionary.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#removeResource(java.lang.String)">removeResource</A></B>(java.lang.String resourceFile)</CODE><BR> Removes the resource file and add its data to the dictionary.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#select(java.lang.String, int)">select</A></B>(java.lang.String key, int index)</CODE><BR> Returns the meaning with the index to all meanings to which the key is mapped.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#setCaseSensitive(boolean)">setCaseSensitive</A></B>(boolean caseSense)</CODE><BR> Sets case sensitive lookup or not.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#setIgnoreCountry(boolean)">setIgnoreCountry</A></B>(boolean ignoreCountry)</CODE><BR> Whether the country part of the target locale is ignored.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#setIgnoreVariant(boolean)">setIgnoreVariant</A></B>(boolean ignoreVariant)</CODE><BR> Whether the variant part of the target locale is ignored.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#setLocalesFromFile(java.lang.String)">setLocalesFromFile</A></B>(java.lang.String filename)</CODE><BR> Sets the dictionary's source and target language locale via its filename.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#setSource(java.util.Locale)">setSource</A></B>(java.util.Locale srcLocale)</CODE><BR> Sets the source locale.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#setTarget(java.util.Locale)">setTarget</A></B>(java.util.Locale targetLocale)</CODE><BR> Sets the target locale.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#size()">size</A></B>()</CODE><BR> Number of keys in this dictionary.</TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/tdc/util/dictionary/ResourceDictionary.html#toString()">toString</A></B>()</CODE><BR> Overriden should normally returns the dictionary's name.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" ID="TableRowColor"><TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="messages"><!-- --></A><H3>messages</H3><PRE>static java.util.ResourceBundle <B>messages</B></PRE><DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ResourceDictionary()"><!-- --></A><H3>ResourceDictionary</H3><PRE>public <B>ResourceDictionary</B>()</PRE><DL><DD>Constructor. Uses default locale to load a resource bundle.</DL><HR><A NAME="ResourceDictionary(java.util.Locale)"><!-- --></A><H3>ResourceDictionary</H3><PRE>public <B>ResourceDictionary</B>(java.util.Locale targetLocale)</PRE><DL><DD>Constructor. Uses full locale information to load a resource bundle.<DD><DL><DT><B>Parameters:</B><DD><CODE>targetLocale</CODE> - the target language locale.</DL></DD></DL><HR><A NAME="ResourceDictionary(java.lang.String, java.util.Locale)"><!-- --></A><H3>ResourceDictionary</H3><PRE>public <B>ResourceDictionary</B>(java.lang.String resourceFiles, java.util.Locale targetLocale)</PRE><DL><DD>Constructor. Uses full locale information to load a resource bundle.<DD><DL><DT><B>Parameters:</B><DD><CODE>resourceFiles</CODE> - separated by ';'.<DD><CODE>targetLocale</CODE> - the target language locale.</DL></DD></DL><HR><A NAME="ResourceDictionary(java.lang.String, java.util.Locale, boolean, boolean)"><!-- --></A><H3>ResourceDictionary</H3><PRE>public <B>ResourceDictionary</B>(java.lang.String resourceFiles, java.util.Locale targetLocale, boolean ignoreCountry, boolean ignoreVariant)</PRE><DL><DD>Constructor.<DD><DL><DT><B>Parameters:</B><DD><CODE>resourceFiles</CODE> - separated by ';'.<DD><CODE>targetLocale</CODE> - the target language locale.<DD><CODE>ignoreCountry</CODE> - true will ignore the country AND variant parts of the target locale, when loading a resource bundle.<DD><CODE>ignoreVariant</CODE> - true will ignore the variant part of the target locale, when loading a resource bundle.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" ID="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="isIgnoreCountry()"><!-- --></A><H3>isIgnoreCountry</H3><PRE>public boolean <B>isIgnoreCountry</B>()</PRE><DL><DD>Whether the country part of the target locale is ignored.<DD><DL><DT><B>Returns:</B><DD>true if country (also variant) part is ignored; false, then the isIgnoreVariant() is effective.</DL></DD></DL><HR><A NAME="isIgnoreVariant()"><!-- --></A><H3>isIgnoreVariant</H3><PRE>public boolean <B>isIgnoreVariant</B>()</PRE><DL><DD>Whether the variant part of the target locale is ignored.<DD><DL><DT><B>Returns:</B><DD>true if country (also variant) part is ignored; false, then the isIgnoreVariant() is effective.</DL></DD></DL><HR><A NAME="setIgnoreCountry(boolean)"><!-- --></A><H3>setIgnoreCountry</H3><PRE>public void <B>setIgnoreCountry</B>(boolean ignoreCountry)</PRE><DL><DD>Whether the country part of the target locale is ignored.<DD><DL><DT><B>Parameters:</B><DD><CODE>ignoreCountry</CODE> - true if country (also variant) part is ignored; false, then the isIgnoreVariant() is in effect.</DL></DD></DL><HR><A NAME="setIgnoreVariant(boolean)"><!-- --></A><H3>setIgnoreVariant</H3><PRE>public void <B>setIgnoreVariant</B>(boolean ignoreVariant)</PRE><DL><DD>Whether the variant part of the target locale is ignored.<DD><DL><DT><B>Parameters:</B><DD><CODE>ignoreVariant</CODE> - effective only when isIgnoreCountry() returns false;</DL></DD></DL><HR><A NAME="setLocalesFromFile(java.lang.String)"><!-- --></A><H3>setLocalesFromFile</H3><PRE>protected void <B>setLocalesFromFile</B>(java.lang.String filename) throws java.lang.IllegalArgumentException</PRE><DL><DD>Sets the dictionary's source and target language locale via its filename.<DD><DL></DL></DD></DL><HR><A NAME="add(java.lang.String)"><!-- --></A><H3>add</H3><PRE>public int <B>add</B>(java.lang.String resourceFile) throws com.sun.tdc.toolkit.resource.ResourceException, java.io.IOException, java.lang.IllegalArgumentException</PRE><DL><DD>Adds the resource file and add its data to the dictionary.<DD><DL><DT><B>Returns:</B><DD>the number of meanings added to the dictionary.</DL></DD></DL><HR><A NAME="removeResource(java.lang.String)"><!-- --></A><H3>removeResource</H3><PRE>public int <B>removeResource</B>(java.lang.String resourceFile) throws com.sun.tdc.toolkit.resource.ResourceException, java.io.IOException</PRE><DL><DD>Removes the resource file and add its data to the dictionary.<DD><DL><DT><B>Parameters:</B><DD><CODE>resourceFile</CODE> - the resource file whose key-values will be remove from the dictionary.<DT><B>Returns:</B><DD>the number of meanings removed from the dictionary.</DL></DD></DL><HR><A NAME="reloadDictionary(java.lang.String)"><!-- --></A><H3>reloadDictionary</H3><PRE>public void <B>reloadDictionary</B>(java.lang.String locale)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="setSource(java.util.Locale)"><!-- --></A><H3>setSource</H3><PRE>public void <B>setSource</B>(java.util.Locale srcLocale)</PRE><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -