⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 layermanager.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 2 页
字号:


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="LayerManager()"><!-- --></A><H3>
LayerManager</H3>
<PRE>
public <B>LayerManager</B>()</PRE>
<DL>
<DD>Creates a new LayerManager.</DL>

<!-- ============ 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="append(javax.microedition.lcdui.game.Layer)"><!-- --></A><H3>
append</H3>
<PRE>
public void <B>append</B>(<A HREF="../../../../javax/microedition/lcdui/game/Layer.html">Layer</A>&nbsp;l)</PRE>
<DL>
<DD>Appends a Layer to this LayerManager.  The Layer is appended to the  list of existing Layers such that it has the highest index (i.e. it is furthest away from the user).  The Layer is first removed  from this LayerManager if it has already been added.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the <code>Layer</code> to be added<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the <code>Layer</code> is  <code>null</code><DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#insert(javax.microedition.lcdui.game.Layer, int)"><CODE>insert(Layer, int)</CODE></A>, 
<A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#remove(javax.microedition.lcdui.game.Layer)"><CODE>remove(Layer)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="insert(javax.microedition.lcdui.game.Layer, int)"><!-- --></A><H3>
insert</H3>
<PRE>
public void <B>insert</B>(<A HREF="../../../../javax/microedition/lcdui/game/Layer.html">Layer</A>&nbsp;l,                   int&nbsp;index)</PRE>
<DL>
<DD>Inserts a new Layer in this LayerManager at the specified index. The Layer is first removed from this LayerManager if it has already been added.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the <code>Layer</code> to be inserted<DD><CODE>index</CODE> - the index at which the new <code>Layer</code> is to be inserted<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the <code>Layer</code> is  <code>null</code><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the index is less than <code>0</code> or greater than the number of Layers already added to the this  <code>LayerManager</code><DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#append(javax.microedition.lcdui.game.Layer)"><CODE>append(Layer)</CODE></A>, 
<A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#remove(javax.microedition.lcdui.game.Layer)"><CODE>remove(Layer)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLayerAt(int)"><!-- --></A><H3>
getLayerAt</H3>
<PRE>
public <A HREF="../../../../javax/microedition/lcdui/game/Layer.html">Layer</A> <B>getLayerAt</B>(int&nbsp;index)</PRE>
<DL>
<DD>Gets the Layer with the specified index.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired Layer<DT><B>Returns:</B><DD>the Layer that has the specified index<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified <code>index</code> is less than zero, or if it is equal to or greater than the number of Layers added to the this <code>LayerManager</code></DL>
</DD>
</DL>
<HR>

<A NAME="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
public int <B>getSize</B>()</PRE>
<DL>
<DD>Gets the number of Layers in this LayerManager. <p><DD><DL>
<DT><B>Returns:</B><DD>the number of Layers</DL>
</DD>
</DL>
<HR>

<A NAME="remove(javax.microedition.lcdui.game.Layer)"><!-- --></A><H3>
remove</H3>
<PRE>
public void <B>remove</B>(<A HREF="../../../../javax/microedition/lcdui/game/Layer.html">Layer</A>&nbsp;l)</PRE>
<DL>
<DD>Removes the specified Layer from this LayerManager.  This method does nothing if the specified Layer is not added to the this LayerManager.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the <code>Layer</code> to be removed<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified <code>Layer</code> is <code>null</code><DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#append(javax.microedition.lcdui.game.Layer)"><CODE>append(Layer)</CODE></A>, 
<A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#insert(javax.microedition.lcdui.game.Layer, int)"><CODE>insert(Layer, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="paint(javax.microedition.lcdui.Graphics, int, int)"><!-- --></A><H3>
paint</H3>
<PRE>
public void <B>paint</B>(<A HREF="../../../../javax/microedition/lcdui/Graphics.html">Graphics</A>&nbsp;g,                  int&nbsp;x,                  int&nbsp;y)</PRE>
<DL>
<DD>Renders the LayerManager's current view window at the specified location.   <p> The LayerManager renders each of its layers in order of descending index, thereby implementing the correct z-order.  Layers that are  completely outside of the view window are not rendered. <p> The coordinates passed to this method determine where the  LayerManager's view window will be rendered relative to the origin of the Graphics object.  For example, a game may use the top of the screen to display the current score, so to render the game's layers below that area, the view window might be rendered at (0, 20).  The location is relative to the Graphics object's origin, so translating the Graphics object will change where the view window is rendered on the screen. <p> The clip region of the Graphics object is intersected with a region  having the same dimensions as the view window and located at (x,y).  The LayerManager then translates the graphics object such that the point (x,y) corresponds to the location of the viewWindow in the  coordinate system of the LayerManager.  The Layers are then rendered  in the appropriate order.  The translation and clip region of the  Graphics object are restored to their prior values before this method  returns. <p> Rendering is subject to the clip region and translation of the Graphics object.  Thus, only part of the specified view window may be rendered  if the clip region is not large enough. <p> For performance reasons, this method may ignore Layers that are invisible or that would be rendered entirely outside of the Graphics object's clip region.  The attributes of the Graphics object are not restored to a known state between calls to the Layers' paint methods.   The clip region may extend beyond the bounds of a Layer; it is the  responsibility of the Layer to ensure that rendering operations are performed within its bounds. <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics instance with which to draw the LayerManager<DD><CODE>x</CODE> - the horizontal location at which to render the view window,  relative to the Graphics' translated origin<DD><CODE>y</CODE> - the vertical location at which to render the view window,  relative to the Graphics' translated origin<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>g</code> is <code>null</code><DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#setViewWindow(int, int, int, int)"><CODE>setViewWindow(int, int, int, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setViewWindow(int, int, int, int)"><!-- --></A><H3>
setViewWindow</H3>
<PRE>
public void <B>setViewWindow</B>(int&nbsp;x,                          int&nbsp;y,                          int&nbsp;width,                          int&nbsp;height)</PRE>
<DL>
<DD>Sets the view window on the LayerManager.   <p> The view window specifies the region that the LayerManager draws when its <A HREF="../../../../javax/microedition/lcdui/game/LayerManager.html#paint(javax.microedition.lcdui.Graphics, int, int)"><CODE>paint(javax.microedition.lcdui.Graphics, int, int)</CODE></A> method is called.  It allows the developer to  control the size of the visible region, as well as the location of the view window relative to the LayerManager's coordinate system. <p> The view window stays in effect until it is modified by another call  to this method.  By default, the view window is located at (0,0) in  the LayerManager's coordinate system and its width and height are both set to Integer.MAX_VALUE.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the horizontal location of the view window relative to the  LayerManager's origin<DD><CODE>y</CODE> - the vertical location of the view window relative to the  LayerManager's origin<DD><CODE>width</CODE> - the width of the view window<DD><CODE>height</CODE> - the height of the view window<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the <code>width</code> or <code>height</code> is less than <code>0</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/LayerManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">
&nbsp;<A HREF="../../../../javax/microedition/lcdui/game/Layer.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../javax/microedition/lcdui/game/Sprite.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>  &nbsp;
&nbsp;<A HREF="LayerManager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -