📄 resources.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_01) on Thu Jun 05 13:35:07 IDT 2008 -->
<TITLE>
Resources
</TITLE>
<META NAME="date" CONTENT="2008-06-05">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Resources";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/Resources.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/sun/lwuit/util/Log.html" title="class in com.sun.lwuit.util"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/sun/lwuit/util/Resources.html" target="_top"><B>FRAMES</B></A>
<A HREF="Resources.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.lwuit.util</FONT>
<BR>
Class Resources</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.lwuit.util.Resources</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Resources</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Loads resources from the binary resource file generated during the build process. A resource is loaded entirely into memory since random file access is not supported in Java ME, any other approach would be inefficient. This means that memory must be made available to accomodate the resource file.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/sun/lwuit/StaticAnimation.html" title="class in com.sun.lwuit">StaticAnimation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#getAnimation(java.lang.String)">getAnimation</A></B>(java.lang.String id)</CODE>
<BR>
Returns the animation resource from the file</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getAnimationResourceNames()">getAnimationResourceNames</A></B>()</CODE>
<BR>
Returns the names of the animations within this bundle</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.io.InputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#getData(java.lang.String)">getData</A></B>(java.lang.String id)</CODE>
<BR>
Returns the data resource from the file</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getDataResourceNames()">getDataResourceNames</A></B>()</CODE>
<BR>
Returns the names of the data resources within this bundle</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#getFont(java.lang.String)">getFont</A></B>(java.lang.String id)</CODE>
<BR>
Returns the font resource from the file</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getFontResourceNames()">getFontResourceNames</A></B>()</CODE>
<BR>
Returns the names of the fonts within this bundle</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#getImage(java.lang.String)">getImage</A></B>(java.lang.String id)</CODE>
<BR>
Returns the image resource from the file</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getImageResourceNames()">getImageResourceNames</A></B>()</CODE>
<BR>
Returns the names of the images within this bundle</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#getL10N(java.lang.String, java.lang.String)">getL10N</A></B>(java.lang.String id,
java.lang.String locale)</CODE>
<BR>
Returns a hashmap containing localized String key/value pairs for the given locale name</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getL10NResourceNames()">getL10NResourceNames</A></B>()</CODE>
<BR>
Returns the names of the localization bundles within this bundle</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getResourceNames()">getResourceNames</A></B>()</CODE>
<BR>
Returns the names of the resources within this bundle</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#getTheme(java.lang.String)">getTheme</A></B>(java.lang.String id)</CODE>
<BR>
Returns the theme resource from the file</TD>
</TR>
<TR BGCOLOR="white" CLASS="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/lwuit/util/Resources.html#getThemeResourceNames()">getThemeResourceNames</A></B>()</CODE>
<BR>
Returns the names of the images within this bundle</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="../../../../com/sun/lwuit/util/Resources.html#isAnimation(java.lang.String)">isAnimation</A></B>(java.lang.String name)</CODE>
<BR>
Returns true if this is an animation resource</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="../../../../com/sun/lwuit/util/Resources.html#isData(java.lang.String)">isData</A></B>(java.lang.String name)</CODE>
<BR>
Returns true if this is a data resource</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="../../../../com/sun/lwuit/util/Resources.html#isFont(java.lang.String)">isFont</A></B>(java.lang.String name)</CODE>
<BR>
Returns true if this is a font resource</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="../../../../com/sun/lwuit/util/Resources.html#isImage(java.lang.String)">isImage</A></B>(java.lang.String name)</CODE>
<BR>
Returns true if this is an image resource</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="../../../../com/sun/lwuit/util/Resources.html#isL10N(java.lang.String)">isL10N</A></B>(java.lang.String name)</CODE>
<BR>
Returns true if this is a generic data resource</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="../../../../com/sun/lwuit/util/Resources.html#isTheme(java.lang.String)">isTheme</A></B>(java.lang.String name)</CODE>
<BR>
Returns true if this is a theme resource</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../com/sun/lwuit/util/Resources.html" title="class in com.sun.lwuit.util">Resources</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#open(java.io.InputStream)">open</A></B>(java.io.InputStream resource)</CODE>
<BR>
Creates a resource object from the given input stream</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../com/sun/lwuit/util/Resources.html" title="class in com.sun.lwuit.util">Resources</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/util/Resources.html#open(java.lang.String)">open</A></B>(java.lang.String resource)</CODE>
<BR>
Creates a resource object from the local JAR resource identifier</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getResourceNames()"><!-- --></A><H3>
getResourceNames</H3>
<PRE>
public java.lang.String[] <B>getResourceNames</B>()</PRE>
<DL>
<DD>Returns the names of the resources within this bundle
<P>
<DD><DL>
<DT><B>Returns:</B><DD>array of names of all the resources in this bundle</DL>
</DD>
</DL>
<HR>
<A NAME="getDataResourceNames()"><!-- --></A><H3>
getDataResourceNames</H3>
<PRE>
public java.lang.String[] <B>getDataResourceNames</B>()</PRE>
<DL>
<DD>Returns the names of the data resources within this bundle
<P>
<DD><DL>
<DT><B>Returns:</B><DD>array of names of the data resources in this bundle</DL>
</DD>
</DL>
<HR>
<A NAME="getL10NResourceNames()"><!-- --></A><H3>
getL10NResourceNames</H3>
<PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -