updateElevationButtons();
    public synchronized void hexMoused(BoardViewEvent b) {        final Entity ce = ce();                        // Are we ignoring events?        if ( this.isIgnoringEvents() ) {            return;        }        // ignore buttons other than 1        if (!client.isMyTurn() || (b.getModifiers() & MouseEvent.BUTTON1_MASK) == 0) {            return;        }        // control pressed means a line of sight check.        // added ALT_MASK by kenn        if ((b.getModifiers() & InputEvent.CTRL_MASK) != 0 || (b.getModifiers() & InputEvent.ALT_MASK) != 0) {            return;        }        // check for shifty goodness        if (shiftheld != ((b.getModifiers() & MouseEvent.SHIFT_MASK) != 0)) {            shiftheld = (b.getModifiers() & MouseEvent.SHIFT_MASK) != 0;        }        if (b.getType() == BoardViewEvent.BOARD_HEX_DRAGGED) {            if (!b.getCoords().equals(clientgui.getBoardView().getLastCursor()) || shiftheld || gear == MovementDisplay.GEAR_TURN) {                clientgui.getBoardView().cursor(b.getCoords());                // either turn or move                if ( ce != null) {                    currentMove(b.getCoords());                    clientgui.bv.drawMovementData(ce, cmd);                }            }        } else if (b.getType() == BoardViewEvent.BOARD_HEX_CLICKED) {            Coords moveto = b.getCoords();            clientgui.bv.drawMovementData(ce, cmd);            clientgui.getBoardView().select(b.getCoords());            if (shiftheld || gear == MovementDisplay.GEAR_TURN) {                butDone.setLabel(Messages.getString("MovementDisplay.Move")); //$NON-NLS-1$                // Set the button's label to "Done"                // if the entire move is impossible.                MovePath possible = (MovePath) cmd.clone();                possible.clipToPossible();                if (possible.length() == 0) {                    butDone.setLabel( Messages.getString("MovementDisplay.Done") ); //$NON-NLS-1$                }                return;            }            if (gear == MovementDisplay.GEAR_CHARGE) {                // check if target is valid                final Targetable target = this.chooseTarget( b.getCoords() );                if (target == null || target.equals(ce)) {                    clientgui.doAlertDialog(Messages.getString("MovementDisplay.CantCharge"), Messages.getString("MovementDisplay.NoTarget")); //$NON-NLS-1$ //$NON-NLS-2$                    clearAllMoves();                    return;                }                // check if it's a valid charge                ToHitData toHit = new ChargeAttackAction(cen, target.getTargetType(), target.getTargetId(), target.getPosition()).toHit(client.game, cmd);                if (toHit.getValue() != ToHitData.IMPOSSIBLE) {                    // Determine how much damage the charger will take.                    int toAttacker = 0;                    if ( target.getTargetType() == Targetable.TYPE_ENTITY ) {                        Entity te = (Entity) target;                        toAttacker = ChargeAttackAction.getDamageTakenBy(ce,te, client.game.getOptions().booleanOption("maxtech_charge_damage"), cmd.getHexesMoved()); //$NON-NLS-1$                    }                    else if ( target.getTargetType() ==                              Targetable.TYPE_BUILDING ) {                        Building bldg = client.game.getBoard().getBuildingAt                            ( moveto );                        toAttacker = ChargeAttackAction.getDamageTakenBy(ce,bldg);                    }                    // Ask the player if they want to charge.                    if ( clientgui.doYesNoDialog                         ( Messages.getString("MovementDisplay.ChargeDialog.title", new Object[]{target.getDisplayName()}), //$NON-NLS-1$                           Messages.getString("MovementDisplay.ChargeDialog.message", new Object[]{ //$NON-NLS-1$                                 toHit.getValueAsString(), new Double(Compute.oddsAbove(toHit.getValue())),toHit.getDesc(),                           new Integer(ChargeAttackAction.getDamageFor(ce,cmd.getHexesMoved())),toHit.getTableDesc(),                           new Integer(toAttacker)}))) {                        // if they answer yes, charge the target.                        cmd.getLastStep().setTarget(target);                        moveTo(cmd);                    } else {                        // else clear movement                        clearAllMoves();                    };                    return;                } else {                    // if not valid, tell why                    clientgui.doAlertDialog( Messages.getString("MovementDisplay.CantCharge"), //$NON-NLS-1$                                          toHit.getDesc() );                    clearAllMoves();                    return;                }            } else if (gear == MovementDisplay.GEAR_DFA) {                // check if target is valid                final Targetable target = this.chooseTarget( b.getCoords() );                if (target == null || target.equals(ce)) {                    clientgui.doAlertDialog(Messages.getString("MovementDisplay.CantDFA"), Messages.getString("MovementDisplay.NoTarget")); //$NON-NLS-1$ //$NON-NLS-2$                    clearAllMoves();                    return;                }                // check if it's a valid DFA                ToHitData toHit = DfaAttackAction.toHit( client.game,                                                    cen,                                                    target,                                                    cmd);                if (toHit.getValue() != ToHitData.IMPOSSIBLE) {                    // if yes, ask them if they want to DFA                    if ( clientgui.doYesNoDialog                         ( Messages.getString("MovementDisplay.DFADialog.title", new Object[]{target.getDisplayName()}), //$NON-NLS-1$                           Messages.getString("MovementDisplay.DFADialog.message", new Object[]{ //$NON-NLS-1$                                   toHit.getValueAsString(),new Double(Compute.oddsAbove(toHit.getValue())),                                   toHit.getDesc(), new Integer(DfaAttackAction.getDamageFor(ce)), toHit.getTableDesc(),                                   new Integer(DfaAttackAction.getDamageTakenBy(ce))}))) {                        // if they answer yes, DFA the target                        cmd.getLastStep().setTarget(target);                        moveTo(cmd);                    } else {                        // else clear movement                        clearAllMoves();                    };                    return;                } else {                    // if not valid, tell why                    clientgui.doAlertDialog( Messages.getString("MovementDisplay.CantDFA"), //$NON-NLS-1$                                          toHit.getDesc() );                    clearAllMoves();                    return;                }            }            butDone.setLabel(Messages.getString("MovementDisplay.Move")); //$NON-NLS-1$            updateProneButtons();            updateRACButton();            updateLoadButtons();        }    }