|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.mlw.gfw.ext.card.DefaultHandModel
| Field Summary | |
protected net.mlw.gfw.ext.card.Card[] |
cards
|
protected net.mlw.gfw.event.EventHandlerList |
eventHandlers
|
protected int |
size
|
| Constructor Summary | |
DefaultHandModel(int size)
|
|
| Method Summary | |
void |
addCard(net.mlw.gfw.ext.card.Card card)
Add a Card to the hand. |
net.mlw.gfw.event.EventHandler |
addEventHandler(net.mlw.gfw.event.EventHandler eventHandler)
Adds a EventHandler to the internal List of EventHandlers. |
void |
fireChange()
(non-Javadoc) |
net.mlw.gfw.ext.card.Card |
getCard(int index)
Peek at a card in the hand. |
net.mlw.gfw.ext.card.Card[] |
getCards()
Get all the cards. |
net.mlw.gfw.ext.card.CardSelectionBehavior |
getCardSelectionBehavior()
Gets the CardSelectionBehavior currently set. |
int |
getMaxNumberOfCards()
The max amount of cards this hand can hold. |
boolean |
isSelected(net.mlw.gfw.ext.card.Card card)
|
boolean |
isValid(int index)
|
void |
onEvent(net.mlw.gfw.event.Event event)
This method processes an event. |
void |
removeCard(net.mlw.gfw.ext.card.Card card)
Pop a card out of the hand. |
net.mlw.gfw.event.EventHandler |
removeEventHandler(net.mlw.gfw.event.EventHandler eventHandler)
Removes the EventHandler from the List. |
void |
setCardSelectionBehavior(net.mlw.gfw.ext.card.CardSelectionBehavior cardSelectionBehavior)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int size
protected net.mlw.gfw.ext.card.Card[] cards
protected net.mlw.gfw.event.EventHandlerList eventHandlers
| Constructor Detail |
public DefaultHandModel(int size)
| Method Detail |
public void addCard(net.mlw.gfw.ext.card.Card card)
HandModel
addCard in interface HandModelcard - The card to add.HandModel.addCard(net.mlw.gfw.ext.card.Card)public void removeCard(net.mlw.gfw.ext.card.Card card)
HandModel
removeCard in interface HandModelcard - The card to remove.HandModel.removeCard(net.mlw.gfw.ext.card.Card)public net.mlw.gfw.ext.card.Card[] getCards()
HandModel
getCards in interface HandModelHandModel.getCards()public net.mlw.gfw.ext.card.Card getCard(int index)
HandModel
getCard in interface HandModelindex - The location of the card.
HandModel.getCard(int)public int getMaxNumberOfCards()
HandModel
getMaxNumberOfCards in interface HandModelHandModel.getMaxNumberOfCards()public boolean isValid(int index)
net.mlw.gfw.ext.card.HandModel#isValid(int)public void onEvent(net.mlw.gfw.event.Event event)
EventHandler
onEvent in interface EventHandlerevent - The Event to be processed.EventHandler.onEvent(net.mlw.gfw.event.Event)public net.mlw.gfw.event.EventHandler addEventHandler(net.mlw.gfw.event.EventHandler eventHandler)
EventHandlerContainer
addEventHandler in interface EventHandlerContainereventHandler - The EventHandler to add.EventHandlerContainer.addEventHandler(net.mlw.gfw.event.EventHandler)public net.mlw.gfw.event.EventHandler removeEventHandler(net.mlw.gfw.event.EventHandler eventHandler)
EventHandlerContainer
removeEventHandler in interface EventHandlerContainereventHandler - The EventHandler to remove.EventHandlerContainer.removeEventHandler(net.mlw.gfw.event.EventHandler)public net.mlw.gfw.ext.card.CardSelectionBehavior getCardSelectionBehavior()
HandModel
getCardSelectionBehavior in interface HandModelpublic void setCardSelectionBehavior(net.mlw.gfw.ext.card.CardSelectionBehavior cardSelectionBehavior)
setCardSelectionBehavior in interface HandModelcardSelectionBehavior - The cardSelectionBehavior to set.public boolean isSelected(net.mlw.gfw.ext.card.Card card)
isSelected in interface HandModelHandModel.isSelected(Card)public void fireChange()
fireChange in interface HandModelHandModel.fireChange()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||