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

📄 tiledlayer.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 Returns the tile index currently associated with the animated tile.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>animatedTileIndex</CODE> - the index of the animated tile<DT><B>Returns:</B><DD>the index of the tile reference by the animated tile<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the animated tile index is invalid<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#setAnimatedTile(int, int)"><CODE>setAnimatedTile(int, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCell(int, int, int)"><!-- --></A><H3>
setCell</H3>
<PRE>
public void <B>setCell</B>(int&nbsp;col,                    int&nbsp;row,                    int&nbsp;tileIndex)</PRE>
<DL>
<DD>Sets the contents of a cell.  <P> The contents may be set to a static tile index, an animated tile index, or it may be left empty (index 0)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>col</CODE> - the column of cell to set<DD><CODE>row</CODE> - the row of cell to set<DD><CODE>tileIndex</CODE> - the index of tile to place in cell<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if there is no tile with index         <code>tileIndex</code><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if <code>row</code> or         <code>col</code> is outside the bounds of the          <code>TiledLayer</code> grid<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#getCell(int, int)"><CODE>getCell(int, int)</CODE></A>, 
<A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#fillCells(int, int, int, int, int)"><CODE>fillCells(int, int, int, int, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCell(int, int)"><!-- --></A><H3>
getCell</H3>
<PRE>
public int <B>getCell</B>(int&nbsp;col,                   int&nbsp;row)</PRE>
<DL>
<DD>Gets the contents of a cell.  <p> Gets the index of the static or animated tile currently displayed in a cell.  The returned index will be 0 if the cell is empty.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>col</CODE> - the column of cell to check<DD><CODE>row</CODE> - the row of cell to check<DT><B>Returns:</B><DD>the index of tile in cell<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if <code>row</code> or         <code>col</code> is outside the bounds of the          <code>TiledLayer</code> grid<DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#setCell(int, int, int)"><CODE>setCell(int, int, int)</CODE></A>, 
<A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#fillCells(int, int, int, int, int)"><CODE>fillCells(int, int, int, int, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="fillCells(int, int, int, int, int)"><!-- --></A><H3>
fillCells</H3>
<PRE>
public void <B>fillCells</B>(int&nbsp;col,                      int&nbsp;row,                      int&nbsp;numCols,                      int&nbsp;numRows,                      int&nbsp;tileIndex)</PRE>
<DL>
<DD>Fills a region cells with the specific tile.  The cells may be filled with a static tile index, an animated tile index, or they may be left  empty (index <code>0</code>).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>col</CODE> - the column of top-left cell in the region<DD><CODE>row</CODE> - the row of top-left cell in the region<DD><CODE>numCols</CODE> - the number of columns in the region<DD><CODE>numRows</CODE> - the number of rows in the region<DD><CODE>tileIndex</CODE> - the Index of the tile to place in all cells in the  specified region<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the rectangular region         defined by the parameters extends beyond the bounds of the         <code>TiledLayer</code> grid<DD><CODE><A HREF="../../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>numCols</code> is less than zero<DD><CODE><A HREF="../../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>numRows</code> is less than zero<DD><CODE><A HREF="../../../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if there is no tile with         index <code>tileIndex</code><DT><B>See Also: </B><DD><A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#setCell(int, int, int)"><CODE>setCell(int, int, int)</CODE></A>, 
<A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#getCell(int, int)"><CODE>getCell(int, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getCellWidth()"><!-- --></A><H3>
getCellWidth</H3>
<PRE>
public final int <B>getCellWidth</B>()</PRE>
<DL>
<DD>Gets the width of a single cell, in pixels.<DD><DL>
<DT><B>Returns:</B><DD>the width in pixels of a single cell in the  <code>TiledLayer</code> grid</DL>
</DD>
</DL>
<HR>

<A NAME="getCellHeight()"><!-- --></A><H3>
getCellHeight</H3>
<PRE>
public final int <B>getCellHeight</B>()</PRE>
<DL>
<DD>Gets the height of a single cell, in pixels.<DD><DL>
<DT><B>Returns:</B><DD>the height in pixels of a single cell in the  <code>TiledLayer</code> grid</DL>
</DD>
</DL>
<HR>

<A NAME="getColumns()"><!-- --></A><H3>
getColumns</H3>
<PRE>
public final int <B>getColumns</B>()</PRE>
<DL>
<DD>Gets the number of columns in the TiledLayer grid.  The overall width of the TiledLayer, in pixels,  may be obtained by calling <A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getWidth()"><CODE>Layer.getWidth()</CODE></A>.<DD><DL>
<DT><B>Returns:</B><DD>the width in columns of the  <code>TiledLayer</code> grid</DL>
</DD>
</DL>
<HR>

<A NAME="getRows()"><!-- --></A><H3>
getRows</H3>
<PRE>
public final int <B>getRows</B>()</PRE>
<DL>
<DD>Gets the number of rows in the TiledLayer grid.  The overall height of the TiledLayer, in pixels, may be obtained by calling <A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getHeight()"><CODE>Layer.getHeight()</CODE></A>.<DD><DL>
<DT><B>Returns:</B><DD>the height in rows of the  <code>TiledLayer</code> grid</DL>
</DD>
</DL>
<HR>

<A NAME="setStaticTileSet(javax.microedition.lcdui.Image, int, int)"><!-- --></A><H3>
setStaticTileSet</H3>
<PRE>
public void <B>setStaticTileSet</B>(<A HREF="../../../../javax/microedition/lcdui/Image.html">Image</A>&nbsp;image,                             int&nbsp;tileWidth,                             int&nbsp;tileHeight)</PRE>
<DL>
<DD>Change the static tile set.  <p> Replaces the current static tile set with a new static tile set. See the constructor <A HREF="../../../../javax/microedition/lcdui/game/TiledLayer.html#TiledLayer(int, int, javax.microedition.lcdui.Image, int, int)"><CODE>TiledLayer(int, int, Image, int, int)</CODE></A> for information on how the tiles are created from the image.<p> If the new static tile set has as many or more tiles than the previous static tile set, the the animated tiles and cell contents will be preserve.  If not, the contents of the grid will be cleared (all cells will contain index 0) and all animated tiles will be deleted. <P><DD><DL>
<DT><B>Parameters:</B><DD><CODE>image</CODE> - the <code>Image</code> to use for creating the static tile set<DD><CODE>tileWidth</CODE> - the width in pixels of a single tile<DD><CODE>tileHeight</CODE> - the height in pixels of a single tile<DT><B>Throws:</B><DD><CODE><A HREF="../../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if <code>image</code> is <code>null</code><DD><CODE><A HREF="../../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>tileHeight</code>  or <code>tileWidth</code> is less than <code>1</code><DD><CODE><A HREF="../../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the <code>image</code>  width is not an integer  multiple of the <code>tileWidth</code><DD><CODE><A HREF="../../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the <code>image</code>  height is not an integer  multiple of the <code>tileHeight</code></DL>
</DD>
</DL>
<HR>

<A NAME="paint(javax.microedition.lcdui.Graphics)"><!-- --></A><H3>
paint</H3>
<PRE>
public final void <B>paint</B>(<A HREF="../../../../javax/microedition/lcdui/Graphics.html">Graphics</A>&nbsp;g)</PRE>
<DL>
<DD>Draws the TiledLayer.   The entire TiledLayer is rendered subject to the clip region of the Graphics object. The TiledLayer's upper left corner is rendered at the TiledLayer's current position relative to the origin of the Graphics object.   The current position of the TiledLayer's upper-left corner can be retrieved by  calling <A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getX()"><CODE>Layer.getX()</CODE></A> and <A HREF="../../../../javax/microedition/lcdui/game/Layer.html#getY()"><CODE>Layer.getY()</CODE></A>. The appropriate use of a clip region and/or translation allows an arbitrary region of the TiledLayer to be rendered. <p> If the TiledLayer's Image is mutable, the TiledLayer is rendered  using the current contents of the Image.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/microedition/lcdui/game/Layer.html#paint(javax.microedition.lcdui.Graphics)">paint</A></CODE> in class <CODE><A HREF="../../../../javax/microedition/lcdui/game/Layer.html">Layer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics object to draw the <code>TiledLayer</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>&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/TiledLayer.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/Sprite.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TiledLayer.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 + -