📄 canvas.html
字号:
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#getKeyName(int)">getKeyName</A></B>(int keyCode)</CODE>
<BR>
Gets an informative key string for a key.</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="../../../javax/microedition/lcdui/Canvas.html#hasPointerEvents()">hasPointerEvents</A></B>()</CODE>
<BR>
Checks if the platform supports pointer press and release events.</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="../../../javax/microedition/lcdui/Canvas.html#hasPointerMotionEvents()">hasPointerMotionEvents</A></B>()</CODE>
<BR>
Checks if the platform supports pointer motion events (pointer dragged).</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="../../../javax/microedition/lcdui/Canvas.html#hasRepeatEvents()">hasRepeatEvents</A></B>()</CODE>
<BR>
Checks if the platform can generate repeat events when key is kept down.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#hideNotify()">hideNotify</A></B>()</CODE>
<BR>
The implementation calls <code>hideNotify()</code> shortly after the <code>Canvas</code> has been removed from the display.</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="../../../javax/microedition/lcdui/Canvas.html#isDoubleBuffered()">isDoubleBuffered</A></B>()</CODE>
<BR>
Checks if the <code>Canvas</code> is double buffered by the implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#keyPressed(int)">keyPressed</A></B>(int keyCode)</CODE>
<BR>
Called when a key is pressed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#keyReleased(int)">keyReleased</A></B>(int keyCode)</CODE>
<BR>
Called when a key is released.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#keyRepeated(int)">keyRepeated</A></B>(int keyCode)</CODE>
<BR>
Called when a key is repeated (held down).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#paint(javax.microedition.lcdui.Graphics)">paint</A></B>(<A HREF="../../../javax/microedition/lcdui/Graphics.html">Graphics</A> g)</CODE>
<BR>
Renders the <code>Canvas</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#pointerDragged(int, int)">pointerDragged</A></B>(int x, int y)</CODE>
<BR>
Called when the pointer is dragged.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#pointerPressed(int, int)">pointerPressed</A></B>(int x, int y)</CODE>
<BR>
Called when the pointer is pressed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#pointerReleased(int, int)">pointerReleased</A></B>(int x, int y)</CODE>
<BR>
Called when the pointer is released.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#repaint()">repaint</A></B>()</CODE>
<BR>
Requests a repaint for the entire <code>Canvas</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#repaint(int, int, int, int)">repaint</A></B>(int x, int y, int width, int height)</CODE>
<BR>
Requests a repaint for the specified region of the <code>Canvas</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#serviceRepaints()">serviceRepaints</A></B>()</CODE>
<BR>
Forces any pending repaint requests to be serviced immediately.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#setFullScreenMode(boolean)">setFullScreenMode</A></B>(boolean mode)</CODE>
<BR>
Controls whether the <code>Canvas</code> is in full-screen mode or in normal mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#showNotify()">showNotify</A></B>()</CODE>
<BR>
The implementation calls <code>showNotify()</code> immediately prior to this <code>Canvas</code> being made visible on the display.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/lcdui/Canvas.html#sizeChanged(int, int)">sizeChanged</A></B>(int w, int h)</CODE>
<BR>
Called when the drawable area of the <code>Canvas</code> has been changed.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.microedition.lcdui.Displayable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.microedition.lcdui.<A HREF="../../../javax/microedition/lcdui/Displayable.html">Displayable</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/lcdui/Displayable.html#addCommand(javax.microedition.lcdui.Command)">addCommand</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getHeight()">getHeight</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getTicker()">getTicker</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getTitle()">getTitle</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#getWidth()">getWidth</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#isShown()">isShown</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#removeCommand(javax.microedition.lcdui.Command)">removeCommand</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#setCommandListener(javax.microedition.lcdui.CommandListener)">setCommandListener</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#setTicker(javax.microedition.lcdui.Ticker)">setTicker</A>, <A HREF="../../../javax/microedition/lcdui/Displayable.html#setTitle(java.lang.String)">setTitle</A></CODE></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" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="UP"><!-- --></A><H3>
UP</H3>
<PRE>
public static final int <B>UP</B></PRE>
<DL>
<DD>Constant for the <code>UP</code> game action. <P>Constant value <code>1</code> is set to <code>UP</code>.</P></DL>
<HR>
<A NAME="DOWN"><!-- --></A><H3>
DOWN</H3>
<PRE>
public static final int <B>DOWN</B></PRE>
<DL>
<DD>Constant for the <code>DOWN</code> game action. <P>Constant value <code>6</code> is set to <code>DOWN</code>.</P></DL>
<HR>
<A NAME="LEFT"><!-- --></A><H3>
LEFT</H3>
<PRE>
public static final int <B>LEFT</B></PRE>
<DL>
<DD>Constant for the <code>LEFT</code> game action. <P>Constant value <code>2</code> is set to <code>LEFT</code>.</P></DL>
<HR>
<A NAME="RIGHT"><!-- --></A><H3>
RIGHT</H3>
<PRE>
public static final int <B>RIGHT</B></PRE>
<DL>
<DD>Constant for the <code>RIGHT</code> game action. <P>Constant value <code>5</code> is set to <code>RIGHT</code>.</P></DL>
<HR>
<A NAME="FIRE"><!-- --></A><H3>
FIRE</H3>
<PRE>
public static final int <B>FIRE</B></PRE>
<DL>
<DD>Constant for the <code>FIRE</code> game action. <P>Constant value <code>8</code> is set to <code>FIRE</code>.</P></DL>
<HR>
<A NAME="GAME_A"><!-- --></A><H3>
GAME_A</H3>
<PRE>
public static final int <B>GAME_A</B></PRE>
<DL>
<DD>Constant for the general purpose "<code>A</code>" game action. <P>Constant value <code>9</code> is set to <code>GAME_A</code>.</P></DL>
<HR>
<A NAME="GAME_B"><!-- --></A><H3>
GAME_B</H3>
<PRE>
public static final int <B>GAME_B</B></PRE>
<DL>
<DD>Constant for the general purpose "<code>B</code>" game action. <P>Constant value <code>10</code> is set to <code>GAME_B</code>.</P></DL>
<HR>
<A NAME="GAME_C"><!-- --></A><H3>
GAME_C</H3>
<PRE>
public static final int <B>GAME_C</B></PRE>
<DL>
<DD>Constant for the general purpose "<code>C</code>" game action. <P>Constant value <code>11</code> is set to <code>GAME_C</code>.</P></DL>
<HR>
<A NAME="GAME_D"><!-- --></A><H3>
GAME_D</H3>
<PRE>
public static final int <B>GAME_D</B></PRE>
<DL>
<DD>Constant for the general purpose "<code>D</code>" game action. <P>Constant value <code>12</code> is set to <code>GAME_D</code>.</P></DL>
<HR>
<A NAME="KEY_NUM0"><!-- --></A><H3>
KEY_NUM0</H3>
<PRE>
public static final int <B>KEY_NUM0</B></PRE>
<DL>
<DD>keyCode for ITU-T key <code>0</code>. <P>Constant value <code>48</code> is set to <code>KEY_NUM0</code>.</P></DL>
<HR>
<A NAME="KEY_NUM1"><!-- --></A><H3>
KEY_NUM1</H3>
<PRE>
public static final int <B>KEY_NUM1</B></PRE>
<DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -