📄 layer.html
字号:
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setPosition(int, int)"><!-- --></A><H3>
setPosition</H3>
<PRE>
public void <B>setPosition</B>(int x, int y)</PRE>
<DL>
<DD>Sets this Layer's position such that its upper-left corner is located at (x,y) in the painter's coordinate system. A Layer is located at (0,0) by default. <br><DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the horizontal position<DD><CODE>y</CODE> - the vertical position<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#move(int, int)"><CODE>move(int, int)</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getX()"><CODE>getX()</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getY()"><CODE>getY()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="move(int, int)"><!-- --></A><H3>
move</H3>
<PRE>
public void <B>move</B>(int dx, int dy)</PRE>
<DL>
<DD>Moves this Layer by the specified horizontal and vertical distances. <br> The Layer's coordinates are subject to wrapping if the passed parameters will cause them to exceed beyond Integer.MAX_VALUE or Integer.MIN_VALUE.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dx</CODE> - the distance to move along horizontal axis (positive to the right, negative to the left)<DD><CODE>dy</CODE> - the distance to move along vertical axis (positive down, negative up)<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#setPosition(int, int)"><CODE>setPosition(int, int)</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getX()"><CODE>getX()</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getY()"><CODE>getY()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getX()"><!-- --></A><H3>
getX</H3>
<PRE>
public final int <B>getX</B>()</PRE>
<DL>
<DD>Gets the horizontal position of this Layer's upper-left corner in the painter's coordinate system. <p><DD><DL>
<DT><B>Returns:</B><DD>the Layer's horizontal position.<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getY()"><CODE>getY()</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#setPosition(int, int)"><CODE>setPosition(int, int)</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#move(int, int)"><CODE>move(int, int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getY()"><!-- --></A><H3>
getY</H3>
<PRE>
public final int <B>getY</B>()</PRE>
<DL>
<DD>Gets the vertical position of this Layer's upper-left corner in the painter's coordinate system. <p><DD><DL>
<DT><B>Returns:</B><DD>the Layer's vertical position.<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getX()"><CODE>getX()</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#setPosition(int, int)"><CODE>setPosition(int, int)</CODE></A>,
<A HREF="../../../../javax/microedition/lcdui/game/Layer.html#move(int, int)"><CODE>move(int, int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getWidth()"><!-- --></A><H3>
getWidth</H3>
<PRE>
public final int <B>getWidth</B>()</PRE>
<DL>
<DD>Gets the current width of this layer, in pixels.<DD><DL>
<DT><B>Returns:</B><DD>the width in pixels<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getHeight()"><CODE>getHeight()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getHeight()"><!-- --></A><H3>
getHeight</H3>
<PRE>
public final int <B>getHeight</B>()</PRE>
<DL>
<DD>Gets the current height of this layer, in pixels.<DD><DL>
<DT><B>Returns:</B><DD>the height in pixels<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getWidth()"><CODE>getWidth()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setVisible(boolean)"><!-- --></A><H3>
setVisible</H3>
<PRE>
public void <B>setVisible</B>(boolean visible)</PRE>
<DL>
<DD>Sets the visibility of this Layer. A visible Layer is rendered when its <A HREF="../../../../javax/microedition/lcdui/game/Layer.html#paint(javax.microedition.lcdui.Graphics)"><CODE>paint(Graphics)</CODE></A> method is called; an invisible Layer is not rendered.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>visible</CODE> - <code>true</code> to make the <code>Layer</code> visible, <code>false</code> to make it invisible<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#isVisible()"><CODE>isVisible()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isVisible()"><!-- --></A><H3>
isVisible</H3>
<PRE>
public final boolean <B>isVisible</B>()</PRE>
<DL>
<DD>Gets the visibility of this Layer.<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the <code>Layer</code> is visible, <code>false</code> if it is invisible.<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#setVisible(boolean)"><CODE>setVisible(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="paint(javax.microedition.lcdui.Graphics)"><!-- --></A><H3>
paint</H3>
<PRE>
public abstract void <B>paint</B>(<A HREF="../../../../javax/microedition/lcdui/Graphics.html">Graphics</A> g)</PRE>
<DL>
<DD>Paints this Layer if it is visible. The upper-left corner of the Layer is rendered at it's current (x,y) position relative to the origin of the provided Graphics object. Applications may make use of Graphics clipping and translation to control where the Layer is rendered and to limit the region that is rendered. <P> Implementations of this method are responsible for checking if this Layer is visible; this method does nothing if the Layer is not visible. <p> The attributes of the Graphics object (clip region, translation, drawing color, etc.) are not modified as a result of calling this method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics object for rendering the <code>Layer</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>g</code> is <code>null</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_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> </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/Layer.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-all.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>
<strong>MID Profile</strong></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../javax/microedition/lcdui/game/GameCanvas.html"><B>PREV CLASS</B></A>
<A HREF="../../../../javax/microedition/lcdui/game/LayerManager.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>
<A HREF="Layer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | 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>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<font size="-1"><a href="mailto:midp-feedback@risc.sps.mot.com">Submit a comment or suggestion</a> Version 2.0 of MID Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -