|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.jgamegrid.Actor ch.aplu.jgamegrid.ToolBarItem ch.aplu.jgamegrid.ToolBarStack
public class ToolBarStack
Class that represents a stack of items (e.g. card symbols with the same suit (in rank order). The stack is used to select a specific item by clicking through the stack.
Field Summary |
---|
Fields inherited from class ch.aplu.jgamegrid.Actor |
---|
gameGrid, nbCycles |
Constructor Summary | |
---|---|
ToolBarStack(java.lang.String filename,
int nbItems)
Creates a set of with given number of items taken from the given filename template. |
Method Summary | |
---|---|
int |
getItemId()
Returns the id of the item currently shown. |
static int[] |
getSelectedItemIds()
Returns an array with length equals to the number of stacks. |
static ToolBarStack[] |
getSelectedStacks()
Returns an array of all stacks that have the current item selected. |
boolean |
isSelected()
Returns the state of the item currently shown. |
void |
setSelected(boolean b)
Sets/deselects the item currently shown. |
void |
showNext()
Shows the next item in the stack. |
Methods inherited from class ch.aplu.jgamegrid.ToolBarItem |
---|
getFilename, getNumberOfSprites |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToolBarStack(java.lang.String filename, int nbItems)
filename
- the filename template of the sprite imagesnbItems
- the number of ranks in this stackMethod Detail |
---|
public boolean isSelected()
public void setSelected(boolean b)
b
- if true, the item is selected; otherwise deselectedpublic int getItemId()
public void showNext()
public static ToolBarStack[] getSelectedStacks()
public static int[] getSelectedItemIds()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |