public void closeDialog() { if (asd != null) { aimingAt = Entity.LOC_NONE; aimingMode = IAimingModes.AIM_MODE_NONE; asd.dispose(); asd = null; this.firingDisplay.updateTarget(); } }
/** * ItemListener, listens to the radiobuttons in the dialog. */ public void itemStateChanged(ItemEvent ev) { IndexedRadioButton icb = (IndexedRadioButton) ev.getSource(); aimingAt = icb.getIndex(); this.firingDisplay.updateTarget(); } }
public void valueChanged(ListSelectionEvent event) { if (event.getValueIsAdjusting()) { return; } if (event.getSource().equals(clientgui.mechD.wPan.weaponList) && (clientgui.getClient().getGame().getPhase() == Phase.PHASE_FIRING)) { // If we aren't in the firing phase, there's no guarantee that cen // is set properly, hence we can't update // update target data in weapon display updateTarget(); } }
/** * Skips to the next weapon */ void nextWeapon() { if (ce() == null) { return; } clientgui.mechD.wPan.selectNextWeapon(); if (ce().getId() != clientgui.mechD.wPan.getSelectedEntityId()) { clientgui.mechD.wPan.displayMech(ce()); } updateTarget(); }
/** * Skips to the previous weapon */ void prevWeapon() { if (ce() == null) { return; } clientgui.mechD.wPan.selectPrevWeapon(); if (ce().getId() != clientgui.mechD.wPan.getSelectedEntityId()) { clientgui.mechD.wPan.displayMech(ce()); } updateTarget(); }
/** * update for change of arms-flipping status * * @param armsFlipped */ void updateFlipArms(boolean armsFlipped) { if (ce() == null) { return; } if (armsFlipped == ce().getArmsFlipped()) { return; } twisting = false; torsoTwist(null); clearAttacks(); ce().setArmsFlipped(armsFlipped); attacks.addElement(new FlipArmsAction(cen, armsFlipped)); updateTarget(); refreshAll(); }
/** * fire searchlight */ protected void doSearchlight() { // validate if ((ce() == null) || (target == null)) { throw new IllegalArgumentException( "current searchlight parameters are invalid"); //$NON-NLS-1$ } if (!SearchlightAttackAction.isPossible( clientgui.getClient().getGame(), cen, target, null)) { return; } // create and queue a searchlight action SearchlightAttackAction saa = new SearchlightAttackAction(cen, target.getTargetType(), target.getTargetId()); attacks.addElement(saa); // and add it into the game, temporarily clientgui.getClient().getGame().addAction(saa); clientgui.bv.addAttack(saa); clientgui.minimap.drawMap(); // refresh weapon panel, as bth will have changed updateTarget(); }
/** * Refreshes all displays. */ protected void refreshAll() { if (ce() == null) { return; } clientgui.bv.redrawEntity(ce()); clientgui.mechD.displayEntity(ce()); clientgui.mechD.showPanel("weapons"); //$NON-NLS-1$ clientgui.mechD.wPan.selectFirstWeapon(); if (ce().isMakingVTOLGroundAttack()) { this.updateVTOLGroundTarget(); } updateTarget(); }
((FiringDisplay) clientgui.getCurrentPanel()).updateTarget(); } else if (clientgui.getCurrentPanel() instanceof TargetingPhaseDisplay) { ((TargetingPhaseDisplay) clientgui.getCurrentPanel()).updateTarget();
prevTarget = null; } else { firingDisplay.updateTarget();
/** * Called Shots - changes the current called shots selection */ protected void changeCalled() { int wn = clientgui.mechD.wPan.getSelectedWeaponNum(); // Do nothing we have no unit selected. if (ce() == null) { return; } Mounted m = ce().getEquipment(wn); if ((m == null)) { return; } // send change to the server m.getCalledShot().switchCalledShot(); clientgui.getClient().sendCalledShotChange(cen, wn); updateTarget(); clientgui.mechD.wPan.displayMech(ce()); clientgui.mechD.wPan.selectWeapon(wn); }
this.firingDisplay.updateTarget();
updateTarget(); clientgui.mechD.wPan.displayMech(ce()); clientgui.mechD.wPan.selectWeapon(wn);
updateTarget(); ash.showDialog();