/** * Clears out old deployment data and disables relevant buttons. */ private void endMyTurn() { // end my turn, then. disableButtons(); clientgui.getBoardView().select(null); clientgui.getBoardView().highlight(null); clientgui.getBoardView().cursor(null); }
/** * Clears out old data and disables relevant buttons. */ private void endMyTurn() { // end my turn, then. disableButtons(); clientgui.getBoardView().select(null); clientgui.getBoardView().highlight(null); clientgui.getBoardView().cursor(null); }
@Override public void clear() { clearAttacks(); clientgui.getBoardView().select(null); clientgui.getBoardView().cursor(null); refreshAll(); }
@Override public void clear() { if ((target instanceof Entity) && Compute.isGroundToAir(ce(), target)) { ((Entity)target).setPlayerPickedPassThrough(cen, null); } clearAttacks(); clientgui.getBoardView().select(null); clientgui.getBoardView().cursor(null); refreshAll(); }
/** * Stop just ignoring events and actually stop listening to them. */ public void removeAllListeners() { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); }
/** * Stop just ignoring events and actually stop listening to them. */ public void removeAllListeners() { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); }
/** * Stop just ignoring events and actually stop listening to them. */ public void removeAllListeners() { if (clientgui != null) { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); } }
/** * Stop just ignoring events and actually stop listening to them. */ @Override public void removeAllListeners() { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); }
/** * Stop just ignoring events and actually stop listening to them. */ public void removeAllListeners() { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); }
/** * Stop just ignoring events and actually stop listening to them. */ public void removeAllListeners() { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); clientgui.mechD.wPan.weaponList.removeListSelectionListener(this); }
/** * Stop just ignoring events and actually stop listening to them. */ public void removeAllListeners() { clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); clientgui.mechD.wPan.weaponList.removeListSelectionListener(this); }
/** * Have the panel register itself as a listener wherever it's needed. * <p/> * According to * http://www-106.ibm.com/developerworks/java/library/j-jtp0618.html it is a * major bad no-no to perform these registrations before the constructor * finishes, so this function has to be called after the panel is created. * Please note, this restriction only applies to listeners for objects that * aren't on the panel itself. */ public void initializeListeners() { clientgui.getClient().getGame().addGameListener(this); clientgui.getBoardView().addBoardViewListener(this); clientgui.bv.addKeyListener(this); // mech display. clientgui.mechD.wPan.weaponList.addListSelectionListener(this); clientgui.mechD.wPan.weaponList.addKeyListener(this); }
/** * Jump to our next target. If there isn't one, well, don't do anything. */ private void jumpToPrevTarget() { Entity targ = getPrevTarget(); if (targ == null) { return; } clientgui.bv.centerOnHex(targ.getPosition()); clientgui.getBoardView().select(targ.getPosition()); target(targ); }
/** * Jump to our next target. If there isn't one, well, don't do anything. */ private void jumpToNextTarget() { Entity targ = getNextTarget(); if (null == targ) { return; } clientgui.bv.centerOnHex(targ.getPosition()); clientgui.getBoardView().select(targ.getPosition()); target(targ); }
@Override public void hexMoused(BoardViewEvent b) { // Are we ignoring events? if (isIgnoringEvents()) { return; } // control pressed means a line of sight check. if ((b.getModifiers() & InputEvent.CTRL_MASK) != 0) { return; } if (clientgui.getClient().isMyTurn() && ((b.getModifiers() & InputEvent.BUTTON1_MASK) != 0)) { if (b.getType() == BoardViewEvent.BOARD_HEX_DRAGGED) { if (!b.getCoords().equals( clientgui.getBoardView().getLastCursor())) { clientgui.getBoardView().cursor(b.getCoords()); } } else if (b.getType() == BoardViewEvent.BOARD_HEX_CLICKED) { clientgui.getBoardView().select(b.getCoords()); } } }
/** * Jump to our next target. If there isn't one, well, don't do anything. */ private void jumpToTarget(boolean nextTarg, boolean onlyValid, boolean ignoreAllies) { Entity targ = getNextTarget(nextTarg, onlyValid, ignoreAllies); if (targ == null) { return; } // HACK : don't show the choice dialog. showTargetChoice = false; clientgui.bv.centerOnHex(targ.getPosition()); clientgui.getBoardView().select(targ.getPosition()); // HACK : show the choice dialog again. showTargetChoice = true; target(targ); }
public void die() { if (clientgui.getClient().isMyTurn()) { endMyTurn(); } clientgui.bv.markDeploymentHexesFor(null); clientgui.getClient().getGame().removeGameListener(this); clientgui.getBoardView().removeBoardViewListener(this); removeAll(); }
@Override public void clear() { if (clientgui.getClient().isMyTurn()) { setStatusBarText(Messages .getString("FiringDisplay.its_your_turn")); //$NON-NLS-1$ } if ((target instanceof Entity) && Compute.isGroundToAir(ce(), target)) { ((Entity)target).setPlayerPickedPassThrough(cen, null); } if ((ce() != null) && !ce().isMakingVTOLGroundAttack()) { target(null); } clearAttacks(); clientgui.getBoardView().select(null); clientgui.getBoardView().cursor(null); refreshAll(); }
@Override public void hexMoused(BoardViewEvent b) { // Are we ignoring events? if (isIgnoringEvents()) { return; } if (b.getType() != BoardViewEvent.BOARD_HEX_DRAGGED) { return; } // ignore buttons other than 1 if (!clientgui.getClient().isMyTurn() || ((b.getModifiers() & InputEvent.BUTTON1_MASK) == 0)) { return; } // check for a deployment clientgui.getBoardView().select(b.getCoords()); addArtyAutoHitHex(b.getCoords()); }
@Override public void hexMoused(BoardViewEvent b) { // Are we ignoring events? if (isIgnoringEvents()) { return; } if (b.getType() != BoardViewEvent.BOARD_HEX_DRAGGED) { return; } // ignore buttons other than 1 if (!clientgui.getClient().isMyTurn() || ((b.getModifiers() & InputEvent.BUTTON1_MASK) == 0)) { return; } // check for a deployment clientgui.getBoardView().select(b.getCoords()); deployMinefield(b.getCoords()); }