if (en instanceof GunEmplacement) { weightL.setVisible(false); weightR.setVisible(false); mpL0.setVisible(false); mpR0.setVisible(false); mpL1.setVisible(false); mpR1.setVisible(false); mpL2.setVisible(false); mpR2.setVisible(false); mpL3.setVisible(false); mpR3.setVisible(false); curMoveL.setVisible(false); curMoveR.setVisible(false); buildingTypeL.setVisible(true); buildingTypeR.setVisible(true); buildingHeightL.setVisible(true); GunEmplacement ge = (GunEmplacement) en; switch (ge.getConstructionType()) { case Building.LIGHT: buildingTypeR.setString (Messages.getString ("GeneralInfoMapSet.buildingTypeRLight")); break; case Building.MEDIUM: buildingTypeR.setString (Messages.getString ("GeneralInfoMapSet.buildingTypeRMedium")); break; case Building.HEAVY: buildingTypeR.setString (Messages.getString ("GeneralInfoMapSet.buildingTypeRHeavy")); break; case Building.HARDENED: buildingTypeR.setString (Messages.getString ("GeneralInfoMapSet.buildingTypeRHardened")); break; default: buildingTypeR.setString (Messages.getString ("GeneralInfoMapSet.buildingTypeRUnknown")); } buildingHeightR.setString(Integer.toString(ge.getHeight())); } else { weightL.setVisible(true); weightR.setVisible(true); mpL0.setVisible(true); mpR0.setVisible(true); mpL1.setVisible(true); mpR1.setVisible(true); mpL2.setVisible(true); mpR2.setVisible(true); mpL3.setVisible(true); mpR3.setVisible(true); curMoveL.setVisible(true); curMoveR.setVisible(true); buildingTypeL.setVisible(false); buildingTypeR.setVisible(false); buildingHeightL.setVisible(false); buildingHeightR.setVisible(false); }
    public void setEntity(Entity en) {                String s = en.getShortName();        mechTypeL1.setVisible(false);                if(s.length() > GUIPreferences.getInstance().getInt("AdvancedMechDisplayWrapLength")){            mechTypeL1.setColor(Color.yellow);            int i = s.lastIndexOf(" ", GUIPreferences.getInstance().getInt("AdvancedMechDisplayWrapLength")); //$NON-NLS-1$            mechTypeL0.setString(s.substring(0,i));            mechTypeL1.setString(s.substring(i).trim());            mechTypeL1.setVisible(true);        } else {            mechTypeL0.setString(s);            mechTypeL1.setString(""); //$NON-NLS-1$        }        if (!en.isDesignValid()) {            //If this is the case, we will just overwrite the name-overflow            // area, since this info is more important.            mechTypeL1.setColor(Color.red);            mechTypeL1.setString(Messages.getString("GeneralInfoMapSet.invalidDesign"));            mechTypeL1.setVisible(true);        }        statusR.setString(en.isProne() ? Messages.getString("GeneralInfoMapSet.prone") : Messages.getString("GeneralInfoMapSet.normal")); //$NON-NLS-1$ //$NON-NLS-2$        playerR.setString(en.getOwner().getName());        if (en.getOwner().getTeam() == 0) {            teamL.setVisible(false);            teamR.setVisible(false);        } else {            teamL.setVisible(true);            teamR.setString(Messages.getString("GeneralInfoMapSet.Team") + en.getOwner().getTeam()); //$NON-NLS-1$            teamR.setVisible(true);        }        weightR.setString(Integer.toString((int)en.getWeight()));                pilotR.setString(en.crew.getDesc() + " (" + en.crew.getGunnery() + "/" + en.crew.getPiloting() + ")" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$        ejectR.setString( Messages.getString("GeneralInfoMapSet.NA") ); //$NON-NLS-1$        if (en instanceof Mech) {            if (((Mech)en).isAutoEject()) {                ejectR.setString( Messages.getString("GeneralInfoMapSet.Operational") ); //$NON-NLS-1$            } else {                ejectR.setString( Messages.getString("GeneralInfoMapSet.Disabled") ); //$NON-NLS-1$            }        }        elevationR.setString( Messages.getString("GeneralInfoMapSet.NA") ); //$NON-NLS-1$        //if (en.getMovementMode() == IEntityMovementMode.VTOL) {            elevationR.setString(Integer.toString(en.getElevation()));        //}        for (int i=0; i < advantagesR.length; i++ ) {            advantagesR[i].setString(""); //$NON-NLS-1$        }        if (en.crew.countAdvantages() > 0) {            int i=0;            for (Enumeration advantages = en.crew.getAdvantages(); advantages.hasMoreElements();) {                IOption option = (IOption)advantages.nextElement();                if (option.booleanValue()) {                    advantagesR[i++].setString(option.getDisplayableName());                }            }        }                if (en.mpUsed > 0) {            mpR0.setString("("+ en.mpUsed + " used)"); //$NON-NLS-1$ //$NON-NLS-2$        } else {            mpR0.setString(""); //$NON-NLS-1$        }        mpR1.setString(Integer.toString(en.getWalkMP()));        mpR2.setString(en.getRunMPasString());        mpR3.setString(Integer.toString(en.getJumpMPWithTerrain()));        curMoveR.setString(en.getMovementString(en.moved) + (en.moved == IEntityMovementType.MOVE_NONE ? "" : " " + en.delta_distance)); //$NON-NLS-1$ //$NON-NLS-2$                int heatCap = en.getHeatCapacity();        int heatCapWater = en.getHeatCapacityWithWater();        String heatCapacityStr = Integer.toString(heatCap);                if ( heatCap < heatCapWater ) {          heatCapacityStr = heatCap + " [" + heatCapWater + "]"; //$NON-NLS-1$ //$NON-NLS-2$        }                heatR.setString(Integer.toString(en.heat) + " (" + heatCapacityStr + " "+Messages.getString("GeneralInfoMapSet.capacity")+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$                if (en instanceof Mech){            heatL.setVisible(true);            heatR.setVisible(true);        } else {            heatL.setVisible(false);            heatR.setVisible(false);        }        if (en instanceof Tank) {            movementTypeL.setVisible(true);            movementTypeR.setString(en.getMovementModeAsString());            movementTypeR.setVisible(true);        } else {            movementTypeL.setVisible(false);            movementTypeR.setVisible(false);        }        bvR.setString(new Integer(en.calculateBattleValue()).toString());    }