|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--game.military.gui.AbstractMilitaryCell
|
+--game.military.gui.AbstractArmyCell
Extends AbstractMilitaryCell for items with subunits.
| Field Summary | |
(package private) java.util.Collection |
subUnits
Collection of the contained units indexed by the contained armies. |
| Constructor Summary | |
AbstractArmyCell(Command command,
int relativeX,
int relativeY)
Constructor. |
|
| Method Summary | |
protected void |
add(MilitaryCell subUnitView)
Add a new sub-unit. |
java.awt.Image |
getImage()
Return the image for this cell. |
java.util.Iterator |
iterator()
Iterator over the unit views. |
boolean |
selectTaskForce(int xMouse,
int yMouse)
Select a task force if the mouse is on it. |
boolean |
selectUnit(int xMouse,
int yMouse)
Select a task force if the mouse is on it. |
| Methods inherited from class game.military.gui.AbstractMilitaryCell |
contains, getBufferedImage, getCommand, getHeight, getPowerLength, getPowerLength, getRelativeX, getRelativeY, getWidth, setHeight, setRelativeX, setRelativeY, setWidth |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.Collection subUnits
| Constructor Detail |
public AbstractArmyCell(Command command,
int relativeX,
int relativeY)
command - the command to display.relativeX - the relative x coordinate of the left hand edge.relativeY - the relative y coordinate of the top edge.| Method Detail |
public java.awt.Image getImage()
getImage in interface MilitaryCellgetImage in class AbstractMilitaryCell
public boolean selectTaskForce(int xMouse,
int yMouse)
selectTaskForce in interface MilitaryCellselectTaskForce in class AbstractMilitaryCellxMouse - the x coordinate of the mouse.yMouse - the y coordinate of the mouse.
public boolean selectUnit(int xMouse,
int yMouse)
selectUnit in interface MilitaryCellselectUnit in class AbstractMilitaryCellxMouse - the x coordinate of the mouse.yMouse - the y coordinate of the mouse.
protected void add(MilitaryCell subUnitView)
subUnitView - sub-unit to add.public java.util.Iterator iterator()
iterator in interface MilitaryCelliterator in class AbstractMilitaryCell
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||