• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question related to MIDP Game API

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
insert(Layer, int)
Declaration:
public void insert(javax.microedition.lcdui.game.Layer 356 l, int index)
Description:
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.

Regarding to the above method of MIDP Game API, I just would like to know whether the adding Layer will replace the existing Layer at index or the LayerManager will take care of the placement and shift every Layers down to the higher indices... Does anyone has any idea on that? Thanks....
 
Aryan Khan
Ranch Hand
Posts: 290
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Koko

The LayerManager will take care of newly inserted layers or deleted layers to have contigious indices...
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So do u mean that the incoming Layer won't replace the layer that is in the index that the incoming Layer is coming to?

Thanks for your comments...
 
Aryan Khan
Ranch Hand
Posts: 290
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No It won't ,the layer manager will move all the layers one index higher...n fit in the insert one..
HTH

ASK
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AhmadS Khan, Thanks a lot... Your explanation saves me a lot of time in understanding the nature of LayerManager...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic