font.html.svn-base
来自「j2me设计的界面包」· SVN-BASE 代码 · 共 908 行 · 第 1/3 页
SVN-BASE
908 行
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <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/Font.html#createBitmapFont(java.lang.String, com.sun.lwuit.Image, int[], int[], java.lang.String)">createBitmapFont</A></B>(java.lang.String name,
<A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> bitmap,
int[] cutOffsets,
int[] charWidth,
java.lang.String charsets)</CODE>
<BR>
Creates a bitmap font with the given arguments and places said font in the cache</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <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/Font.html#createSystemFont(int, int, int)">createSystemFont</A></B>(int face,
int style,
int size)</CODE>
<BR>
Creates a system native font in a similar way to common MIDP fonts</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <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/Font.html#getBitmapFont(java.lang.String)">getBitmapFont</A></B>(java.lang.String fontName)</CODE>
<BR>
Returns a previously loaded bitmap font from cache</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/Font.html#getCharset()">getCharset</A></B>()</CODE>
<BR>
Returns a string containing all the characters supported by this font.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <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/Font.html#getDefaultFont()">getDefaultFont</A></B>()</CODE>
<BR>
Return the global default font instance</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="../../../com/sun/lwuit/Font.html#getFace()">getFace</A></B>()</CODE>
<BR>
Return Optional operation returning the font face for system fonts</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Font.html#getHeight()">getHeight</A></B>()</CODE>
<BR>
Return the total height of the font</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="../../../com/sun/lwuit/Font.html#getSize()">getSize</A></B>()</CODE>
<BR>
Return Optional operation returning the font size for system fonts</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="../../../com/sun/lwuit/Font.html#getStyle()">getStyle</A></B>()</CODE>
<BR>
Return Optional operation returning the font style for system fonts</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Font.html#setDefaultFont(com.sun.lwuit.Font)">setDefaultFont</A></B>(<A HREF="../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A> f)</CODE>
<BR>
Sets the global default font instance</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="../../../com/sun/lwuit/Font.html#stringWidth(java.lang.String)">stringWidth</A></B>(java.lang.String str)</CODE>
<BR>
Return the width of the given string in this font instance</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="../../../com/sun/lwuit/Font.html#substringWidth(java.lang.String, int, int)">substringWidth</A></B>(java.lang.String str,
int offset,
int len)</CODE>
<BR>
Return the width of the given string subset in this font instance</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>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="FACE_MONOSPACE"><!-- --></A><H3>
FACE_MONOSPACE</H3>
<PRE>
public static final int <B>FACE_MONOSPACE</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.FACE_MONOSPACE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="FACE_PROPORTIONAL"><!-- --></A><H3>
FACE_PROPORTIONAL</H3>
<PRE>
public static final int <B>FACE_PROPORTIONAL</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.FACE_PROPORTIONAL">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="FACE_SYSTEM"><!-- --></A><H3>
FACE_SYSTEM</H3>
<PRE>
public static final int <B>FACE_SYSTEM</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.FACE_SYSTEM">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="SIZE_LARGE"><!-- --></A><H3>
SIZE_LARGE</H3>
<PRE>
public static final int <B>SIZE_LARGE</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.SIZE_LARGE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="SIZE_MEDIUM"><!-- --></A><H3>
SIZE_MEDIUM</H3>
<PRE>
public static final int <B>SIZE_MEDIUM</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.SIZE_MEDIUM">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="SIZE_SMALL"><!-- --></A><H3>
SIZE_SMALL</H3>
<PRE>
public static final int <B>SIZE_SMALL</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.SIZE_SMALL">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STYLE_BOLD"><!-- --></A><H3>
STYLE_BOLD</H3>
<PRE>
public static final int <B>STYLE_BOLD</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.STYLE_BOLD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STYLE_ITALIC"><!-- --></A><H3>
STYLE_ITALIC</H3>
<PRE>
public static final int <B>STYLE_ITALIC</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.STYLE_ITALIC">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STYLE_UNDERLINED"><!-- --></A><H3>
STYLE_UNDERLINED</H3>
<PRE>
public static final int <B>STYLE_UNDERLINED</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.STYLE_UNDERLINED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="STYLE_PLAIN"><!-- --></A><H3>
STYLE_PLAIN</H3>
<PRE>
public static final int <B>STYLE_PLAIN</B></PRE>
<DL>
<DD>Constant allowing us to author portable system fonts
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Font.STYLE_PLAIN">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Font()"><!-- --></A><H3>
Font</H3>
<PRE>
protected <B>Font</B>()</PRE>
<DL>
<DD>Creates a new Font
<P>
</DL>
<!-- ============ 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="getBitmapFont(java.lang.String)"><!-- --></A><H3>
getBitmapFont</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A> <B>getBitmapFont</B>(java.lang.String fontName)
throws java.io.IOException</PRE>
<DL>
<DD>Returns a previously loaded bitmap font from cache
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fontName</CODE> - the font name is the logical name of the font
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Font.html#clearBitmapCache()"><CODE>clearBitmapCache()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="clearBitmapCache()"><!-- --></A><H3>
clearBitmapCache</H3>
<PRE>
public static void <B>clearBitmapCache</B>()</PRE>
<DL>
<DD>Bitmap fonts are cached this method allows us to flush the cache thus allows us to reload a font
<P>
<DD><DL>
</DL>
</DD>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?