Package megamek.client.ui.AWT.widget

Examples of megamek.client.ui.AWT.widget.TransparentLabel


            ((GridBagLayout) getLayout()).setConstraints(weaponList, c);
            add(weaponList);

            // adding Ammo choice + label

            wAmmo = new TransparentLabel(
                    Messages.getString("MechDisplay.Ammo"), fm, clr, TransparentLabel.LEFT); //$NON-NLS-1$
            m_chAmmo = new Choice();
            m_chAmmo.addItemListener(this);
            m_chAmmo.addKeyListener(client.menuBar);

            wBayWeapon = new TransparentLabel(
                    Messages.getString("MechDisplay.Weapon"), fm, clr, TransparentLabel.LEFT); //$NON-NLS-1$
            m_chBayWeapon = new Choice();
            m_chBayWeapon.addItemListener(this);
            m_chBayWeapon.addKeyListener(client.menuBar);

            c.insets = new Insets(1, 9, 1, 1);
            c.gridwidth = 1;
            c.weighty = 0.0;
            c.fill = GridBagConstraints.NONE;
            c.gridx = 0;
            c.gridy = 1;
            ((GridBagLayout) getLayout()).setConstraints(wBayWeapon, c);
            add(wBayWeapon);

            c.insets = new Insets(1, 1, 1, 9);
            c.gridwidth = GridBagConstraints.REMAINDER;
            c.gridx = 1;
            c.gridy = 1;
            c.fill = GridBagConstraints.HORIZONTAL;
            ((GridBagLayout) getLayout()).setConstraints(m_chBayWeapon, c);
            add(m_chBayWeapon);

            c.gridwidth = 1;
            c.weighty = 0.0;
            c.fill = GridBagConstraints.NONE;
            c.gridx = 0;
            c.gridy = 2;
            ((GridBagLayout) getLayout()).setConstraints(wAmmo, c);
            add(wAmmo);

            c.insets = new Insets(1, 1, 1, 9);
            c.gridwidth = GridBagConstraints.REMAINDER;
            c.gridx = 1;
            c.gridy = 2;
            c.fill = GridBagConstraints.HORIZONTAL;
            ((GridBagLayout) getLayout()).setConstraints(m_chAmmo, c);
            add(m_chAmmo);

            // Adding Heat Buildup

            currentHeatBuildupL = new TransparentLabel(
                    Messages.getString("MechDisplay.HeatBuildup"), fm, clr, TransparentLabel.RIGHT); //$NON-NLS-1$
            currentHeatBuildupR = new TransparentLabel(
                    "--", fm, clr, TransparentLabel.LEFT); //$NON-NLS-1$

            c.insets = new Insets(2, 9, 2, 1);
            c.gridwidth = 2;
            c.gridx = 0;
            c.gridy = 3;
            c.fill = GridBagConstraints.NONE;
            c.anchor = GridBagConstraints.EAST;
            ((GridBagLayout) getLayout())
                    .setConstraints(currentHeatBuildupL, c);
            add(currentHeatBuildupL);

            c.insets = new Insets(2, 1, 2, 9);
            c.gridwidth = GridBagConstraints.REMAINDER;
            c.gridx = 2;
            c.anchor = GridBagConstraints.WEST;
            // c.fill = GridBagConstraints.HORIZONTAL;
            ((GridBagLayout) getLayout())
                    .setConstraints(currentHeatBuildupR, c);
            add(currentHeatBuildupR);

            // Adding weapon display labels
            wNameL = new TransparentLabel(
                    Messages.getString("MechDisplay.Name"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wHeatL = new TransparentLabel(
                    Messages.getString("MechDisplay.Heat"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wArcHeatL = new TransparentLabel(
                    Messages.getString("MechDisplay.ArcHeat"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wDamL = new TransparentLabel(
                    Messages.getString("MechDisplay.Damage"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wNameR = new TransparentLabel("", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wHeatR = new TransparentLabel(
                    "--", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wArcHeatR = new TransparentLabel(
                    "--", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wDamR = new TransparentLabel("--", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$

            c.anchor = GridBagConstraints.CENTER;
            c.fill = GridBagConstraints.BOTH;
            c.insets = new Insets(2, 9, 1, 1);
            c.gridwidth = 2;
            c.gridx = 0;
            c.gridy = 4;
            ((GridBagLayout) getLayout()).setConstraints(wNameL, c);
            add(wNameL);

            c.insets = new Insets(2, 1, 1, 1);
            c.gridwidth = 1;
            c.gridx = 2;
            ((GridBagLayout) getLayout()).setConstraints(wHeatL, c);
            add(wHeatL);

            c.insets = new Insets(2, 1, 1, 1);
            c.gridwidth = 1;
            c.gridx = 3;
            ((GridBagLayout) getLayout()).setConstraints(wDamL, c);
            add(wDamL);

            c.insets = new Insets(2, 1, 1, 9);
            c.gridwidth = GridBagConstraints.REMAINDER;
            c.gridx = 4;
            ((GridBagLayout) getLayout()).setConstraints(wArcHeatL, c);
            add(wArcHeatL);

            c.insets = new Insets(1, 9, 2, 1);
            c.gridwidth = 2;
            c.gridx = 0;
            c.gridy = 5;
            ((GridBagLayout) getLayout()).setConstraints(wNameR, c);
            add(wNameR);

            c.gridwidth = 1;
            c.gridx = 2;
            ((GridBagLayout) getLayout()).setConstraints(wHeatR, c);
            add(wHeatR);

            c.gridwidth = 1;
            c.gridx = 3;
            ((GridBagLayout) getLayout()).setConstraints(wDamR, c);
            add(wDamR);

            c.insets = new Insets(1, 1, 2, 9);
            c.gridx = 4;
            c.gridwidth = GridBagConstraints.REMAINDER;
            ((GridBagLayout) getLayout()).setConstraints(wArcHeatR, c);
            add(wArcHeatR);

            // Adding range labels
            wMinL = new TransparentLabel(
                    Messages.getString("MechDisplay.Min"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wShortL = new TransparentLabel(
                    Messages.getString("MechDisplay.Short"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wMedL = new TransparentLabel(
                    Messages.getString("MechDisplay.Med"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wLongL = new TransparentLabel(
                    Messages.getString("MechDisplay.Long"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wExtL = new TransparentLabel(
                    Messages.getString("MechDisplay.Ext"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wAVL = new TransparentLabel(
                    Messages.getString("MechDisplay.AV"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wMinR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wShortR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wMedR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wLongR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wExtR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wShortAVR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wMedAVR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wLongAVR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wExtAVR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$

            c.weightx = 1.0;
            c.insets = new Insets(2, 9, 1, 1);
            c.gridx = 0;
            c.gridy = 6;
            c.gridwidth = 1;
            ((GridBagLayout) getLayout()).setConstraints(wMinL, c);
            add(wMinL);

            c.insets = new Insets(2, 1, 1, 1);
            c.gridx = 1;
            c.gridy = 6;
            ((GridBagLayout) getLayout()).setConstraints(wShortL, c);
            add(wShortL);

            c.gridx = 2;
            c.gridy = 6;
            ((GridBagLayout) getLayout()).setConstraints(wMedL, c);
            add(wMedL);

            // c.insets = new Insets(2, 1, 1, 9);
            c.gridx = 3;
            c.gridy = 6;
            // c.gridwidth = GridBagConstraints.REMAINDER;
            ((GridBagLayout) getLayout()).setConstraints(wLongL, c);
            add(wLongL);

            c.insets = new Insets(2, 1, 1, 9);
            c.gridx = 4;
            c.gridy = 6;
            c.gridwidth = GridBagConstraints.REMAINDER;
            ((GridBagLayout) getLayout()).setConstraints(wExtL, c);
            add(wExtL);
            // ----------------

            c.insets = new Insets(1, 9, 2, 1);
            c.gridx = 0;
            c.gridy = 7;
            c.gridwidth = 1;
            ((GridBagLayout) getLayout()).setConstraints(wMinR, c);
            add(wMinR);

            c.insets = new Insets(1, 1, 2, 1);
            c.gridx = 1;
            c.gridy = 7;
            ((GridBagLayout) getLayout()).setConstraints(wShortR, c);
            add(wShortR);

            c.gridx = 2;
            c.gridy = 7;
            ((GridBagLayout) getLayout()).setConstraints(wMedR, c);
            add(wMedR);

            // c.insets = new Insets(1, 1, 2, 9);
            c.gridx = 3;
            c.gridy = 7;
            // c.gridwidth = GridBagConstraints.REMAINDER;
            ((GridBagLayout) getLayout()).setConstraints(wLongR, c);
            add(wLongR);

            c.insets = new Insets(1, 1, 2, 9);
            c.gridx = 4;
            c.gridy = 7;
            ((GridBagLayout) getLayout()).setConstraints(wExtR, c);
            add(wExtR);
            // ----------------

            c.insets = new Insets(1, 9, 2, 1);
            c.gridx = 0;
            c.gridy = 8;
            c.gridwidth = 1;
            ((GridBagLayout) getLayout()).setConstraints(wAVL, c);
            add(wAVL);

            c.insets = new Insets(1, 1, 2, 1);
            c.gridx = 1;
            c.gridy = 8;
            ((GridBagLayout) getLayout()).setConstraints(wShortAVR, c);
            add(wShortAVR);

            c.gridx = 2;
            c.gridy = 8;
            ((GridBagLayout) getLayout()).setConstraints(wMedAVR, c);
            add(wMedAVR);

            // c.insets = new Insets(1, 1, 2, 9);
            c.gridx = 3;
            c.gridy = 8;
            // c.gridwidth = GridBagConstraints.REMAINDER;
            ((GridBagLayout) getLayout()).setConstraints(wLongAVR, c);
            add(wLongAVR);

            c.insets = new Insets(1, 1, 2, 9);
            c.gridx = 4;
            c.gridy = 8;
            ((GridBagLayout) getLayout()).setConstraints(wExtAVR, c);
            add(wExtAVR);

            // target panel
            wTargetL = new TransparentLabel(
                    Messages.getString("MechDisplay.Target"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wRangeL = new TransparentLabel(
                    Messages.getString("MechDisplay.Range"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wToHitL = new TransparentLabel(
                    Messages.getString("MechDisplay.ToHit"), fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$

            wTargetR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wRangeR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$
            wToHitR = new TransparentLabel(
                    "---", fm, clr, TransparentLabel.CENTER); //$NON-NLS-1$

            c.weightx = 0.0;
            c.insets = new Insets(2, 9, 1, 1);
            c.gridx = 0;
View Full Code Here


        public SystemPanel(ClientGUI clientgui) {
            super();

            FontMetrics fm = getFontMetrics(FONT_VALUE);

            locLabel = new TransparentLabel(
                    Messages.getString("MechDisplay.Location"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$
            slotLabel = new TransparentLabel(
                    Messages.getString("MechDisplay.Slot"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$
            unitLabel = new TransparentLabel(
                    Messages.getString("MechDisplay.Unit"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$

            locList = new List(8, false);
            locList.addItemListener(this);
            locList.addKeyListener(clientgui.menuBar);

            slotList = new List(12, false);
            slotList.addItemListener(this);
            slotList.addKeyListener(clientgui.menuBar);
            // slotList.setEnabled(false);

            unitList = new List(8, false);
            unitList.addItemListener(this);
            unitList.addKeyListener(clientgui.menuBar);

            m_chMode = new Choice();
            m_chMode.add("   "); //$NON-NLS-1$
            m_chMode.setEnabled(false);
            m_chMode.addItemListener(this);
            m_chMode.addKeyListener(clientgui.menuBar);

            m_bDumpAmmo = new Button(Messages
                    .getString("MechDisplay.m_bDumpAmmo")); //$NON-NLS-1$
            m_bDumpAmmo.setEnabled(false);
            m_bDumpAmmo.setActionCommand("dump"); //$NON-NLS-1$
            m_bDumpAmmo.addActionListener(this);
            m_bDumpAmmo.addKeyListener(clientgui.menuBar);

            modeLabel = new TransparentLabel(
                    Messages.getString("MechDisplay.modeLabel"), fm, Color.white, TransparentLabel.RIGHT); //$NON-NLS-1$
            // modeLabel.setEnabled(false);

            // layout main panel
            GridBagLayout gridbag = new GridBagLayout();
View Full Code Here

            prompt = null;

            FontMetrics fm = getFontMetrics(FONT_VALUE);

            curSensorsL = new TransparentLabel((Messages
                    .getString("MechDisplay.CurrentSensors")).concat(" "), fm,
                    Color.white, TransparentLabel.CENTER);

            chSensors = new Choice();
            chSensors.addItemListener(this);

            narcLabel = new TransparentLabel(
                    Messages.getString("MechDisplay.AffectedBy"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$

            narcList = new List(3, false);
            narcList.addKeyListener(clientgui.menuBar);

            // transport stuff
            // unusedL = new Label( "Unused Space:", Label.CENTER );

            unusedL = new TransparentLabel(
                    Messages.getString("MechDisplay.UnusedSpace"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$
            unusedR = new TextArea("", 2, 25, TextArea.SCROLLBARS_VERTICAL_ONLY); //$NON-NLS-1$
            unusedR.setEditable(false);
            unusedR.addKeyListener(clientgui.menuBar);

            carrysL = new TransparentLabel(
                    Messages.getString("MechDisplay.Carryng"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$
            carrysR = new TextArea("", 4, 25, TextArea.SCROLLBARS_VERTICAL_ONLY); //$NON-NLS-1$
            carrysR.setEditable(false);
            carrysR.addKeyListener(clientgui.menuBar);

            sinksL = new TransparentLabel(Messages
                    .getString("MechDisplay.activeSinksLabel"), fm,
                    Color.white, TransparentLabel.CENTER);
            sinksR = new TextArea("", 2, 25, TextArea.SCROLLBARS_VERTICAL_ONLY);
            sinksR.setEditable(false);
            sinksR.addKeyListener(clientgui.menuBar);

            sinks2B = new Button(Messages
                    .getString("MechDisplay.configureActiveSinksLabel"));
            sinks2B.setActionCommand("changeSinks");
            sinks2B.addActionListener(this);

            heatL = new TransparentLabel(
                    Messages.getString("MechDisplay.HeatEffects"), fm, Color.white, TransparentLabel.CENTER); //$NON-NLS-1$
            heatR = new TextArea("", 4, 25, TextArea.SCROLLBARS_VERTICAL_ONLY); //$NON-NLS-1$
            heatR.setEditable(false);
            heatR.addKeyListener(clientgui.menuBar);

            targSysL = new TransparentLabel((Messages
                    .getString("MechDisplay.TargSysLabel")).concat(" "), fm,
                    Color.white, TransparentLabel.CENTER);

            // layout choice panel
            GridBagLayout gridbag = new GridBagLayout();
View Full Code Here

TOP

Related Classes of megamek.client.ui.AWT.widget.TransparentLabel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.