/** * Identify to the menu bar that a <code>Board</code> is available to the * parent. * * @param available - <code>true</code> when a <code>Board</code> is * available. Set this value to <code>false</code> after the * <code>Board</code> is cleared. */ public synchronized void setBoard(boolean available) { hasBoard = available; manageMenu(); }
/** * Identify to the menu bar that a unit list is available to the parent. * * @param available - <code>true</code> when a unit list is available. Set * this value to <code>false</code> after the unit list is * cleared. */ public synchronized void setUnitList(boolean available) { hasUnitList = available; manageMenu(); }
/** * Identify to the menu bar that a <code>IGame</code> is available to the * parent. * * @param selected - The <code>IGame</code> that is currently selected. * When there is no selection, set this to <code>null</code>. */ public synchronized void setGame(IGame selected) { game = selected; manageMenu(); }
/** * Identify to the menu bar that a <code>Entity</code> is available to the * parent. * * @param selected - The <code>Entity</code> that is currently selected. * When there is no selection, set this to <code>null</code>. */ public synchronized void setEntity(Entity selected) { entity = selected; manageMenu(); }
/** * Identify to the menu bar which phase is currently in progress * * @param current - the <code>int</code> value of the current phase (the * valid values for this argument are defined as constants in the * <code>Game</code> class). */ public synchronized void setPhase(IGame.Phase current) { entity = null; phase = current; // There are certain phases where we shouldn't allow the board to be // saved, however the vast majority of phases should allow it switch (current) { case PHASE_STARTING_SCENARIO: case PHASE_UNKNOWN: case PHASE_LOUNGE: case PHASE_SELECTION: case PHASE_EXCHANGE: setBoard(false); break; default: setBoard(true); break; } manageMenu(); }