|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--game.interfaces.Coordinator
A static class to facilitate communication between frames. This is a stopgap - this class holds all the stuff I moved out of specific GUI classes so that each gui needed to know about a single coordinating class, rather than talking to each other in a promiscuous fashion. Most of the material here will wind up in the controller package. Gary Thomas, 28/6/01.
| Constructor Summary | |
Coordinator()
|
|
| Method Summary | |
static void |
addCivilization(Civilization value)
Add a new civilization. |
static void |
addToDesktop(javax.swing.JInternalFrame frame)
Add frame to window. |
static void |
assignColors()
Assign colours, after the player has picked one. |
static void |
carryOutMovementOrders()
Carry out orders. |
void |
carryOutOrders()
Issue orders. |
static void |
centerView(Square value)
Set the selected square. |
static void |
checkEndOfGame()
Check whether game has ended, announce it and finish game. |
static java.util.Iterator |
civilizationIterator()
Iterator over all the civilizations. |
static void |
closeEvents()
Close all frames with Events in their title. |
static Unit |
createUnit(java.lang.String archetypeName,
Civilization civilization,
Square square)
Build a unit with its own task force. |
static Unit |
createUnit(java.lang.String archetypeName,
TaskForce taskForce)
Build a unit and add it to the specified task force. |
static void |
drawRoads(java.awt.Graphics2D g2,
MovementList roads)
Refresh the map to show the proposed road. |
static void |
drawWalls(java.awt.Graphics2D g2,
javax.swing.JComponent parent)
Refresh the map to show the walls to be built. |
static boolean |
findFrame(java.lang.String title)
If the specified frame is present, bring it to the front. |
static void |
fortification()
Fortification button. |
static Civilization |
getCivilization(java.lang.String value)
Get a civilization given its name. |
static ClashWindow |
getClashWindow()
Return the main Clash window. |
static javax.swing.JDesktopPane |
getDesktop()
Return the main clash window desktop. |
static javax.swing.AbstractAction |
getExitListener()
Return the exit listener. |
static java.awt.event.WindowListener |
getExitWindowListener()
Return the exit window listener. |
static java.lang.String |
getFortification()
|
static int |
getMapHeight()
Get map height. |
static int |
getMapWidth()
Get map width. |
static Square |
getSelectedSquare()
Return the selected square. |
static Square |
getSquare(int x,
int y)
Return a main map square from its coordinates. |
static Square |
getSquare(java.lang.String name)
Return a main map square from its name. |
static Square |
getSquareAt(java.awt.event.MouseEvent event)
Get the square at the spot determined by the mouse position. |
static TaskForce |
getTaskForce()
Get the selected task force. |
static int |
getTileHeight()
Return the tile width. |
static int |
getTileWidth()
Return the tile width. |
static int |
getTurn()
Return the current turn. |
static Unit |
getUnit()
Get the selected unit. |
static void |
hideRuler()
Switch off ruler frame. |
static void |
issueMovementOrders()
Issue orders for all civilizations. |
void |
issueOrders()
Issue orders. |
static java.util.Iterator |
listAvailableWalls(Civilization civ)
|
static void |
listBulletins()
Construct a list of the bulletins. |
static void |
listBySquares(TaskForceList commandList)
Crete UnitsBySquare lists. |
static void |
listEconOptions()
Constructs the econ frame popup menu. |
static void |
listEventOptions()
Constructs the event frame popup menu. |
static void |
listFrames()
Construct a list of the open frames in the clash window. |
static void |
listTechnologies()
|
static java.util.Iterator |
mapIterator()
Return an iterator over the main map squares. |
static void |
move()
Move button. |
static void |
newGame()
Empty the static list for a new game. |
static void |
nextTF()
Select the next task force. |
static void |
normal()
Move button. |
static void |
oneTurn()
The end of the turn. |
static void |
refreshDetailFrame(Square square)
Refresh the details box. |
static void |
refreshMap()
Refresh the map to show the moves. |
static void |
refreshMap(MovementList roads)
Set the roads list into the map panel. |
static void |
refreshMap(Order moves)
Refresh the map to show the moves. |
static void |
refreshMapOnly()
Refresh the map to show the moves. |
static void |
refreshTaskForceFrame(Square square)
Refresh the task force box. |
static void |
removeSquare(int x,
int y)
Remove a main map square from its coordinates. |
static void |
resetLayout()
Reset all the windows to the base setting. |
static void |
road()
Road button. |
static java.lang.Object |
selectCivilization()
Select a civilization. |
static void |
setFortification(java.lang.String fort)
|
static void |
setFortificationButton(FortificationButton value)
Set the move button (so it can have its label switched). |
static void |
setFortificationCursor()
Set the map panel cursor to the special cursor for fortification. |
static void |
setMapPartialRepaint(boolean repaint)
Sets partial repaint mode: If partial repaint is set, then only modified squares will be repainted. |
static void |
setMoveButton(javax.swing.JButton value)
Set the move button (so it can have its label switched). |
static void |
setMoveCursor()
Set the map panel cursor to the special cursor for movement. |
static void |
setNormalCursor()
Set the map panel cursor to the normal. |
static void |
setPowerCircle(float value)
Set the size of the power circle. |
static void |
setRoadButton(javax.swing.JButton value)
Set the move button (so it can have its label switched). |
static void |
setRoadCursor()
Set the map panel cursor to the special cursor for movement. |
static void |
setSelectedSquare(Square value)
Set the selected square. |
static void |
showEconCivilizationFrame()
Show the economics data for the player's civilization. |
static void |
showEconCivilizationFrame(Civilization civ)
Show the economics data for a given civilization. |
static void |
showEconProvinceFrame()
Show the economics data for a province. |
static void |
showEconSquareFrame()
Show the economics data for a map square. |
static void |
showRuler()
Show ruler details. |
static void |
startUpEconInfoFrame(Economy econ)
Start up the economy info frame for the given economy. |
static java.util.Iterator |
technologyNames()
Return an iterator over technlogy names. |
static void |
viewEvents()
Construct a list of the open frames in the clash window. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Coordinator()
| Method Detail |
public static ClashWindow getClashWindow()
public static javax.swing.JDesktopPane getDesktop()
public static Square getSquare(int x,
int y)
x - the x-coordinate.y - the y-coordinate.
public static Square getSquare(java.lang.String name)
name - the name of the square.
public static void removeSquare(int x,
int y)
x - the x-coordinate.y - the y-coordinate.public static java.util.Iterator mapIterator()
public static int getMapWidth()
public static int getMapHeight()
public static void resetLayout()
public static void setSelectedSquare(Square value)
value - the selected square.public static void centerView(Square value)
value - the selected square.public static Square getSelectedSquare()
public static void setMapPartialRepaint(boolean repaint)
public static Square getSquareAt(java.awt.event.MouseEvent event)
event - the mouse event which tells where the mouse is.
public static void refreshTaskForceFrame(Square square)
public static void refreshDetailFrame(Square square)
public static int getTileWidth()
public static int getTileHeight()
public static void setPowerCircle(float value)
public static java.awt.event.WindowListener getExitWindowListener()
public static javax.swing.AbstractAction getExitListener()
public static int getTurn()
public static void showEconSquareFrame()
public static void showEconProvinceFrame()
public static void showEconCivilizationFrame()
public static void showEconCivilizationFrame(Civilization civ)
public static void startUpEconInfoFrame(Economy econ)
econ - economy to use.public static void listEconOptions()
public static void listEventOptions()
public static TaskForce getTaskForce()
public static Unit getUnit()
public static void showRuler()
public static void hideRuler()
public static void oneTurn()
public static void nextTF()
public static void listFrames()
public static void addToDesktop(javax.swing.JInternalFrame frame)
public static void listBulletins()
public static void viewEvents()
public static boolean findFrame(java.lang.String title)
title - the title of the required frame.
public static void closeEvents()
public static void setMoveButton(javax.swing.JButton value)
value - the move button from Start.public static void setMoveCursor()
public static void setNormalCursor()
public static void move()
public static void refreshMap()
public static void refreshMapOnly()
public static void refreshMap(Order moves)
moves - an order to show on the map.
public static Unit createUnit(java.lang.String archetypeName,
Civilization civilization,
Square square)
civilization - the civilization for the unit.square - the square to placve the unit in.
public static Unit createUnit(java.lang.String archetypeName,
TaskForce taskForce)
taskForce - the task force to add the unit to.
public void issueOrders()
public void carryOutOrders()
public static void setRoadButton(javax.swing.JButton value)
value - the road button from Start.public static void setRoadCursor()
public static void road()
public static void drawRoads(java.awt.Graphics2D g2,
MovementList roads)
public static void drawWalls(java.awt.Graphics2D g2,
javax.swing.JComponent parent)
parent - The component in which walls must be drawnpublic static void refreshMap(MovementList roads)
public static void setFortificationButton(FortificationButton value)
value - the road button from Start.public static void setFortificationCursor()
public static void fortification()
public static void setFortification(java.lang.String fort)
public static java.lang.String getFortification()
public static java.util.Iterator listAvailableWalls(Civilization civ)
public static void normal()
public static java.util.Iterator technologyNames()
public static void listTechnologies()
public static java.util.Iterator civilizationIterator()
public static Civilization getCivilization(java.lang.String value)
value - the name of a civilization.
public static void issueMovementOrders()
public static void carryOutMovementOrders()
public static void checkEndOfGame()
public static void listBySquares(TaskForceList commandList)
commandList - the list to add all the task forces to.public static java.lang.Object selectCivilization()
public static void addCivilization(Civilization value)
public static void newGame()
public static void assignColors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||