![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Inheritance diagram for ui.Board:
Collaboration diagram for ui.Board:Public Member Functions | |
| Board (IMakShooterRTI myRti) throws HeadlessException | |
| Instantiates a new board. | |
| void | addKeyboardListenerToBoard (KeyListener ka) |
| This is adds a keyListener to the board, and ensures that it will be focusable and requests focus for the board. | |
| void | addShip (Ship ship) |
| Adds the ship. | |
| void | dispose () |
| IShipController | getControllerThread () |
| Ship | getLeftShip () |
| Gets the left ship. | |
| int | getLoses () |
| IMakShooterRTI | getMyRti () |
| Ship | getRightShip () |
| Gets the right ship. | |
| ShotIncrementingThread | getShotIncrementingThread () |
| Runnable | getWaitingForPlayersThread () |
| int | getWins () |
| boolean | isReadyToStartGame () |
| Checks if is ready to start game. | |
| void | myKeyboardHackForLinux () |
| This hack is necessary because there is an issue with linux, window focus, and keyboard listeners. | |
| void | endGameEarlyDueToPlayerLeaving () throws Exception |
| void | reInitializeGame () |
| void | setControllerThread (IShipController controllerThread) |
| void | setMyRti (IMakShooterRTI myRti) |
| void | setShotIncrementingThread (ShotIncrementingThread shotIncrementingThread) |
| void | setWaitingForPlayersThread (Runnable waitingForPlayersThread) |
| void | setLeftWins (int wins) |
| void | setLeftLoses (int loses) |
| void | setRightLoses (int loses) |
| void | setRightWins (int wins) |
| void | updateBoardFromDetonation (E_Alignment alignment) |
| void | modifyTitle (String titleAddition) |
Private Member Functions | |
| void | addDisconnectFromGameButton (JMenuBar jMenuBar) |
| void | addStartNewGameButton (JMenuBar jMenuBar) |
| void | createScorePanel () |
| Creates the score panel. | |
| void | initialize () |
| Initialize. | |
| JMenuBar | makeMenu () |
| Make menu. | |
| void | performShutdownStuff () throws Exception |
| void | performStartupStuff (String federationName, String federateName, Color color, boolean observer) throws Exception |
| void | abandonGame () throws Exception |
Private Attributes | |
| JPanel | contentPane |
| The content pane. | |
| IShipController | controllerThread |
| JButton | disconnectFromGameButton |
| GraphicsPanel | graphicsPanel |
| The graphics panel. | |
| JLabel | lblLeftWins |
| JLabel | lblRightWins |
| int | leftLoses = 0 |
| The loses. | |
| int | leftWins = 0 |
| The wins. | |
| JMenuBar | menu |
| IMakShooterRTI | myRti |
| int | rightLoses |
| int | rightWins |
| JPanel | scorePanel |
| ShotIncrementingThread | shotIncrementingThread |
| JButton | startNewGameMenuButton |
| Runnable | waitingForPlayersThread |
Static Private Attributes | |
| static final String | LABEL_WINS = "Score: " |
| static final long | serialVersionUID = -8387568866044849612L |
| The Constant serialVersionUID. | |
The Class Board.
| ui.Board.Board | ( | IMakShooterRTI | myRti | ) | throws HeadlessException [inline] |
Instantiates a new board.
| HeadlessException | the headless exception |
References ui.Board.initialize(), ui.Board.myRti, and ui.Board.setMyRti().
| void ui.Board.abandonGame | ( | ) | throws Exception [inline, private] |
References ui.Board.contentPane, ui.Board.myRti, and ui.RTIActionHelper.stopGame().
Referenced by ui.Board.addStartNewGameButton().
| void ui.Board.addDisconnectFromGameButton | ( | JMenuBar | jMenuBar | ) | [inline, private] |
References ui.Board.contentPane, ui.Board.disconnectFromGameButton, federate.IMakShooterRTI.isConnected(), ui.Board.myRti, and ui.Board.performShutdownStuff().
Referenced by ui.Board.makeMenu().
| void ui.Board.addKeyboardListenerToBoard | ( | KeyListener | ka | ) | [inline] |
This is adds a keyListener to the board, and ensures that it will be focusable and requests focus for the board.
| ka |
References ui.Board.myKeyboardHackForLinux().
Referenced by controllers.KeyboardShipController.KeyboardShipController().
| void ui.Board.addShip | ( | Ship | ship | ) | [inline] |
Adds the ship.
| ship | the ship |
References ui.GraphicsPanel.addShip(), and ui.Board.graphicsPanel.
Referenced by ui.TestMain.main(), and federate.RTI1516e.Test.main().
| void ui.Board.addStartNewGameButton | ( | JMenuBar | jMenuBar | ) | [inline, private] |
References ui.Board.abandonGame(), federate.IMakShooterRTI.connect(), ui.Board.contentPane, federate.IMakShooterRTI.disconnect(), ui.StartJoinGameDialog.getColor(), ui.StartJoinGameDialog.getFederateName(), ui.StartJoinGameDialog.getFederationName(), ui.StartJoinGameDialog.isCanceled, federate.IMakShooterRTI.isConnected(), ui.StartJoinGameDialog.isObserver, ui.Board.myRti, ui.Board.performStartupStuff(), federate.IMakShooterRTI.registerDialogForListFederation(), and ui.Board.startNewGameMenuButton.
Referenced by ui.Board.makeMenu().
| void ui.Board.createScorePanel | ( | ) | [inline, private] |
Creates the score panel.
References ui.Board.contentPane, ui.Board.LABEL_WINS, ui.Board.lblLeftWins, ui.Board.lblRightWins, ui.Board.leftWins, ui.Board.rightWins, and ui.Board.scorePanel.
Referenced by ui.Board.initialize().
| void ui.Board.dispose | ( | ) | [inline] |
References ui.Board.myRti, and ui.RTIActionHelper.stopGame().
| void ui.Board.endGameEarlyDueToPlayerLeaving | ( | ) | throws Exception [inline] |
References ui.Board.contentPane, and ui.Board.performShutdownStuff().
Referenced by federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.removeInstanceObjectShip().
| IShipController ui.Board.getControllerThread | ( | ) | [inline] |
References ui.Board.controllerThread.
Referenced by ui.RTIActionHelper.stopKeyboardThread().
| Ship ui.Board.getLeftShip | ( | ) | [inline] |
Gets the left ship.
References ui.GraphicsPanel.getLeftShip(), and ui.Board.graphicsPanel.
Referenced by controllers.ShotManager.performIntenseDetonationCheck().
| int ui.Board.getLoses | ( | ) | [inline] |
References ui.Board.leftLoses.
| IMakShooterRTI ui.Board.getMyRti | ( | ) | [inline] |
References ui.Board.myRti.
| Ship ui.Board.getRightShip | ( | ) | [inline] |
Gets the right ship.
References ui.GraphicsPanel.getRightShip(), and ui.Board.graphicsPanel.
Referenced by controllers.ShotManager.performIntenseDetonationCheck().
| ShotIncrementingThread ui.Board.getShotIncrementingThread | ( | ) | [inline] |
References ui.Board.shotIncrementingThread.
Referenced by ui.RTIActionHelper.stopShotIncrementingThread().
| Runnable ui.Board.getWaitingForPlayersThread | ( | ) | [inline] |
References ui.Board.waitingForPlayersThread.
| int ui.Board.getWins | ( | ) | [inline] |
References ui.Board.leftWins.
| void ui.Board.initialize | ( | ) | [inline, private] |
Initialize.
References ui.Board.contentPane, ui.Board.createScorePanel(), ui.MakShooterUIConstants.DEFAULT_BOARD_HEIGHT, ui.MakShooterUIConstants.DEFAULT_BOARD_WIDTH, ui.MakShooterUIConstants.DEFAULT_BOARD_X, ui.MakShooterUIConstants.DEFAULT_BOARD_Y, ui.Board.graphicsPanel, ui.MakShooterUIConstants.MAK_SHOOTER_TITLE, ui.Board.makeMenu(), and ui.Board.menu.
Referenced by ui.Board.Board().
| boolean ui.Board.isReadyToStartGame | ( | ) | [inline] |
Checks if is ready to start game.
References ui.Board.graphicsPanel, and ui.GraphicsPanel.isReadyToStart().
Referenced by ui.TestMain.main().
| JMenuBar ui.Board.makeMenu | ( | ) | [inline, private] |
Make menu.
References ui.Board.addDisconnectFromGameButton(), and ui.Board.addStartNewGameButton().
Referenced by ui.Board.initialize().
| void ui.Board.modifyTitle | ( | String | titleAddition | ) | [inline] |
References ui.MakShooterUIConstants.MAK_SHOOTER_TITLE.
| void ui.Board.myKeyboardHackForLinux | ( | ) | [inline] |
This hack is necessary because there is an issue with linux, window focus, and keyboard listeners.
Referenced by ui.Board.addKeyboardListenerToBoard(), and controllers.KeyboardShipController.run().
| void ui.Board.performShutdownStuff | ( | ) | throws Exception [inline, private] |
References ui.Board.myRti, and ui.RTIActionHelper.stopGame().
Referenced by ui.Board.addDisconnectFromGameButton(), and ui.Board.endGameEarlyDueToPlayerLeaving().
| void ui.Board.performStartupStuff | ( | String | federationName, |
| String | federateName, | ||
| Color | color, | ||
| boolean | observer | ||
| ) | throws Exception [inline, private] |
| void ui.Board.reInitializeGame | ( | ) | [inline] |
References ui.Board.setLeftLoses(), ui.Board.setLeftWins(), ui.Board.setRightLoses(), and ui.Board.setRightWins().
Referenced by ui.RTIActionHelper.resetBoard().
| void ui.Board.setControllerThread | ( | IShipController | controllerThread | ) | [inline] |
References ui.Board.controllerThread.
| void ui.Board.setLeftLoses | ( | int | loses | ) | [inline] |
| loses | the loses to set |
Referenced by ui.Board.reInitializeGame(), and ui.Board.updateBoardFromDetonation().
| void ui.Board.setLeftWins | ( | int | wins | ) | [inline] |
| wins | the wins to set |
References ui.Board.LABEL_WINS, ui.Board.lblLeftWins, and ui.Board.leftWins.
Referenced by ui.Board.reInitializeGame(), and ui.Board.updateBoardFromDetonation().
| void ui.Board.setMyRti | ( | IMakShooterRTI | myRti | ) | [inline] |
References ui.Board.myRti.
Referenced by ui.Board.Board().
| void ui.Board.setRightLoses | ( | int | loses | ) | [inline] |
| loses | the loses to set |
Referenced by ui.Board.reInitializeGame(), and ui.Board.updateBoardFromDetonation().
| void ui.Board.setRightWins | ( | int | wins | ) | [inline] |
| wins | the wins to set |
References ui.Board.LABEL_WINS, ui.Board.lblRightWins, and ui.Board.rightWins.
Referenced by ui.Board.reInitializeGame(), and ui.Board.updateBoardFromDetonation().
| void ui.Board.setShotIncrementingThread | ( | ShotIncrementingThread | shotIncrementingThread | ) | [inline] |
References ui.Board.shotIncrementingThread.
| void ui.Board.setWaitingForPlayersThread | ( | Runnable | waitingForPlayersThread | ) | [inline] |
References ui.Board.waitingForPlayersThread.
| void ui.Board.updateBoardFromDetonation | ( | E_Alignment | alignment | ) | [inline] |
References ui.Board.leftLoses, ui.Board.leftWins, ui.Board.rightLoses, ui.Board.rightWins, ui.Board.setLeftLoses(), ui.Board.setLeftWins(), ui.Board.setRightLoses(), and ui.Board.setRightWins().
Referenced by federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.receiveInteractionDetonation(), and federate.RTI1516e.MakShooterRTI1516e.sendDetonationInteraction().
JPanel ui.Board.contentPane [private] |
The content pane.
Referenced by ui.Board.abandonGame(), ui.Board.addDisconnectFromGameButton(), ui.Board.addStartNewGameButton(), ui.Board.createScorePanel(), ui.Board.endGameEarlyDueToPlayerLeaving(), and ui.Board.initialize().
IShipController ui.Board.controllerThread [private] |
Referenced by ui.Board.getControllerThread(), and ui.Board.setControllerThread().
JButton ui.Board.disconnectFromGameButton [private] |
Referenced by ui.Board.addDisconnectFromGameButton().
GraphicsPanel ui.Board.graphicsPanel [private] |
The graphics panel.
Referenced by ui.Board.addShip(), ui.Board.getLeftShip(), ui.Board.getRightShip(), ui.Board.initialize(), and ui.Board.isReadyToStartGame().
final String ui.Board.LABEL_WINS = "Score: " [static, private] |
Referenced by ui.Board.createScorePanel(), ui.Board.setLeftWins(), and ui.Board.setRightWins().
JLabel ui.Board.lblLeftWins [private] |
Referenced by ui.Board.createScorePanel(), and ui.Board.setLeftWins().
JLabel ui.Board.lblRightWins [private] |
Referenced by ui.Board.createScorePanel(), and ui.Board.setRightWins().
int ui.Board.leftLoses = 0 [private] |
The loses.
Referenced by ui.Board.getLoses(), and ui.Board.updateBoardFromDetonation().
int ui.Board.leftWins = 0 [private] |
The wins.
Referenced by ui.Board.createScorePanel(), ui.Board.getWins(), ui.Board.setLeftWins(), and ui.Board.updateBoardFromDetonation().
JMenuBar ui.Board.menu [private] |
Referenced by ui.Board.initialize().
IMakShooterRTI ui.Board.myRti [private] |
int ui.Board.rightLoses [private] |
Referenced by ui.Board.updateBoardFromDetonation().
int ui.Board.rightWins [private] |
Referenced by ui.Board.createScorePanel(), ui.Board.setRightWins(), and ui.Board.updateBoardFromDetonation().
JPanel ui.Board.scorePanel [private] |
Referenced by ui.Board.createScorePanel().
final long ui.Board.serialVersionUID = -8387568866044849612L [static, private] |
The Constant serialVersionUID.
Referenced by ui.Board.getShotIncrementingThread(), and ui.Board.setShotIncrementingThread().
JButton ui.Board.startNewGameMenuButton [private] |
Referenced by ui.Board.addStartNewGameButton().
Runnable ui.Board.waitingForPlayersThread [private] |
Referenced by ui.Board.getWaitingForPlayersThread(), and ui.Board.setWaitingForPlayersThread().