Package java.awt

Examples of java.awt.Label


        layout.weightx = 0;
        layout.weighty = 0;

        // Add a "spacer" label to push everything else to the bottom.
        layout.weighty = 1;
        panel.add(new Label(), layout);
        layout.weighty = 0;
        layout.gridy++;

        // Add a label for the "keep old camo" button.
        panel.add(new AdvancedLabel(Messages
View Full Code Here


    protected Button okayB, cancelB;

    public ConnectDialog(Frame frame) {
        super(frame, Messages.getString("MegaMek.ConnectDialog.title"), true); //$NON-NLS-1$

        yourNameL = new Label(
                Messages.getString("MegaMek.yourNameL"), Label.RIGHT); //$NON-NLS-1$
        serverAddrL = new Label(
                Messages.getString("MegaMek.serverAddrL"), Label.RIGHT); //$NON-NLS-1$
        portL = new Label(Messages.getString("MegaMek.portL"), Label.RIGHT); //$NON-NLS-1$

        yourNameF = new TextField(PreferenceManager.getClientPreferences()
                .getLastPlayerName(), 16);
        yourNameF.addActionListener(this);
        serverAddrF = new TextField(PreferenceManager.getClientPreferences()
View Full Code Here

        super.setResizable(false);
        frame = p;

        butOk.addActionListener(this);

        Label labMessage = new Label(Messages
                .getString("VibrabombSettingDialog.selectSetting")); //$NON-NLS-1$
        setLayout(gridbag);

        c.fill = GridBagConstraints.VERTICAL;
        c.insets = new Insets(1, 1, 1, 1);
View Full Code Here

                panMain.add(main, component);
                panSecondary.add(secondary, ((ChatLounge) component)
                        .getSecondaryDisplay());
                break;
            case PHASE_STARTING_SCENARIO:
                component = new Label(Messages
                        .getString("ClientGUI.StartingScenario")); //$NON-NLS-1$
                main = "Label-StartingScenario"; //$NON-NLS-1$
                secondary = main;
                panMain.add(main, component);
                panSecondary.add(secondary, new Label("")); //$NON-NLS-1$
                break;
            case PHASE_EXCHANGE:
                component = new Label(Messages
                        .getString("ClientGUI.TransmittingData")); //$NON-NLS-1$
                main = "Label-Exchange"; //$NON-NLS-1$
                secondary = main;
                panMain.add(main, component);
                panSecondary.add(secondary, new Label("")); //$NON-NLS-1$
                break;
            case PHASE_SET_ARTYAUTOHITHEXES:
                component = new SelectArtyAutoHitHexDisplay(this);

                main = "BoardView"; //$NON-NLS-1$
                secondary = "SelectArtyAutoHitHexDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_DEPLOY_MINEFIELDS:
                component = new DeployMinefieldDisplay(this);

                main = "BoardView"; //$NON-NLS-1$
                secondary = "DeployMinefieldDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_DEPLOYMENT:
                component = new DeploymentDisplay(this);
                main = "BoardView"; //$NON-NLS-1$
                secondary = "DeploymentDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_TARGETING:
                component = new TargetingPhaseDisplay(this, false);
                ((TargetingPhaseDisplay) component).initializeListeners();
                main = "BoardView"; //$NON-NLS-1$
                secondary = "TargetingPhaseDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_MOVEMENT:
                component = new MovementDisplay(this);
                main = "BoardView"; //$NON-NLS-1$
                secondary = "MovementDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_OFFBOARD:
                component = new TargetingPhaseDisplay(this, true);
                ((TargetingPhaseDisplay) component).initializeListeners();
                main = "BoardView"; //$NON-NLS-1$
                secondary = "OffboardDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_FIRING:
                component = new FiringDisplay(this);
                main = "BoardView"; //$NON-NLS-1$
                secondary = "FiringDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_PHYSICAL:
                component = new PhysicalDisplay(this);
                main = "BoardView"; //$NON-NLS-1$
                secondary = "PhysicalDisplay"; //$NON-NLS-1$
                if (!mainNames.keySet().contains(main)) {
                    panMain.add(main, bvc);
                }
                panSecondary.add(secondary, component);
                break;
            case PHASE_INITIATIVE_REPORT:
                component = new ReportDisplay(client);
                main = "ReportDisplay"; //$NON-NLS-1$
                secondary = main;
                panMain.add(main, component);
                panSecondary.add(secondary, ((ReportDisplay) component)
                        .getSecondaryDisplay());
                break;
            case PHASE_TARGETING_REPORT:
            case PHASE_MOVEMENT_REPORT:
            case PHASE_OFFBOARD_REPORT:
            case PHASE_FIRING_REPORT:
            case PHASE_PHYSICAL_REPORT:
            case PHASE_END_REPORT:
            case PHASE_VICTORY:
                // Try to reuse the ReportDisplay for other phases...
                component = phaseComponents.get(String
                        .valueOf(IGame.Phase.PHASE_INITIATIVE_REPORT));
                if (null == component) {
                    // no ReportDisplay to reuse -- get a new one
                    component = initializePanel(IGame.Phase.PHASE_INITIATIVE_REPORT);
                }
                main = "ReportDisplay"; //$NON-NLS-1$
                secondary = main;
                break;
            default:
                component = new Label(Messages
                        .getString("ClientGUI.waitingOnTheServer")); //$NON-NLS-1$
                main = "Label-Default"; //$NON-NLS-1$
                secondary = main;
                panMain.add(main, component);
                panSecondary.add(secondary, new Label("")); //$NON-NLS-1$
        }
        phaseComponents.put(name, component);
        mainNames.put(name, main);
        secondaryNames.put(name, secondary);
View Full Code Here

        super(frame, Messages.getString("BoardEditor.SetDimentions"), true); //$NON-NLS-1$

        xvalue = 0;
        yvalue = 0;

        labWidth = new Label(
                Messages.getString("BoardEditor.labWidth"), Label.RIGHT); //$NON-NLS-1$
        labHeight = new Label(
                Messages.getString("BoardEditor.labHeight"), Label.RIGHT); //$NON-NLS-1$

        texWidth = new TextField("16", 2); //$NON-NLS-1$
        texHeight = new TextField("17", 2); //$NON-NLS-1$
View Full Code Here

            m_pSouthParams.add(m_pListOptions);
            m_pSouthParams.add(m_pOpenAdvanced);

            Panel row1 = new Panel();
            row1.setLayout(new FlowLayout(FlowLayout.LEFT));
            row1.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.Walk")));
            row1.add(m_cWalk);
            row1.add(m_tWalk);
            m_pSouthParams.add(row1);

            Panel row2 = new Panel();
            row2.setLayout(new FlowLayout(FlowLayout.LEFT));
            row2.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.Jump")));
            row2.add(m_cJump);
            row2.add(m_tJump);
            m_pSouthParams.add(row2);

            Panel row3 = new Panel();
            row3.setLayout(new FlowLayout(FlowLayout.LEFT));
            row3.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.Armor")));
            row3.add(m_cArmor);
            m_pSouthParams.add(row3);

            Panel row4 = new Panel();
            row4.setLayout(new FlowLayout(FlowLayout.LEFT));
            row4.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.Weapons")));
            m_pSouthParams.add(row4);

            Panel row5 = new Panel();
            row5.setLayout(new FlowLayout(FlowLayout.LEFT));
            row5.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.WeaponsAtLeast")));
            row5.add(m_tWeapons1);
            row5.add(m_cWeapons1);
            m_pSouthParams.add(row5);

            Panel row6 = new Panel();
            row6.setLayout(new FlowLayout(FlowLayout.LEFT));
            row6.add(m_cOrAnd);
            row6.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.WeaponsAtLeast")));
            row6.add(m_tWeapons2);
            row6.add(m_cWeapons2);
            m_pSouthParams.add(row6);

            Panel row7 = new Panel();
            row7.setLayout(new FlowLayout(FlowLayout.LEFT));
            row7.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.Equipment")));
            row7.add(m_chkEquipment);
            row7.add(m_cEquipment);
            m_pSouthParams.add(row7);

            Panel row8 = new Panel();
            row8.setLayout(new FlowLayout(FlowLayout.LEFT));
            row8.add(new Label(Messages
                    .getString("MechSelectorDialog.Search.Year")));
            row8.add(m_tStartYear);
            row8.add(new Label("-"));
            row8.add(m_tEndYear);
            m_pSouthParams.add(row8);

            Panel row9 = new Panel();
            row9.add(m_bSearch);
View Full Code Here

        GridBagLayout gridbag = new GridBagLayout();
        setLayout(gridbag);

        GridBagConstraints c = new GridBagConstraints();

        Label labMessage = new Label(message, Label.LEFT);
        c.weightx = 1.0;
        c.weighty = 1.0;
        c.gridwidth = 0;
        c.anchor = GridBagConstraints.WEST;
        gridbag.setConstraints(labMessage, c);
View Full Code Here

     * Sets up the editor panel, which goes on the right of the map and has
     * controls for editing the current square.
     */
    private void setupEditorPanel() {
        canHex = new HexCanvas();
        labElev = new Label(
                Messages.getString("BoardEditor.labElev"), Label.RIGHT); //$NON-NLS-1$
        texElev = new TextField("0", 1); //$NON-NLS-1$
        texElev.addActionListener(this);
        texElev.addTextListener(this);
        butElevUp = new Button(Messages.getString("BoardEditor.butElevUp")); //$NON-NLS-1$
        butElevUp.addActionListener(this);
        butElevDown = new Button(Messages.getString("BoardEditor.butElevDown")); //$NON-NLS-1$
        butElevDown.addActionListener(this);

        labTerrain = new Label(
                Messages.getString("BoardEditor.labTerrain"), Label.LEFT); //$NON-NLS-1$
        lisTerrain = new java.awt.List(6);
        lisTerrain.addItemListener(this);
        refreshTerrainList();

        butDelTerrain = new Button(Messages
                .getString("BoardEditor.butDelTerrain")); //$NON-NLS-1$
        butDelTerrain.addActionListener(this);

        choTerrainType = new Choice();
        for (int i = 1; i < Terrains.SIZE; i++) {
            choTerrainType.add(Terrains.getName(i));
        }

        texTerrainLevel = new TextField("1", 1); //$NON-NLS-1$

        butAddTerrain = new Button(Messages
                .getString("BoardEditor.butAddTerrain")); //$NON-NLS-1$
        butAddTerrain.addActionListener(this);

        butMiniMap = new Button(Messages.getString("BoardEditor.butMiniMap")); //$NON-NLS-1$
        butMiniMap.setActionCommand("viewMiniMap"); //$NON-NLS-1$
        butMiniMap.addActionListener(this);

        panTerrainType = new Panel(new BorderLayout());
        panTerrainType.add(choTerrainType, BorderLayout.WEST);
        panTerrainType.add(texTerrainLevel, BorderLayout.CENTER);

        cheTerrExitSpecified = new Checkbox(Messages
                .getString("BoardEditor.cheTerrExitSpecified")); //$NON-NLS-1$
        butTerrExits = new Button(Messages
                .getString("BoardEditor.butTerrExits")); //$NON-NLS-1$
        texTerrExits = new TextField("0", 1); //$NON-NLS-1$
        butTerrExits.addActionListener(this);

        panTerrExits = new Panel(new FlowLayout());
        panTerrExits.add(cheTerrExitSpecified);
        panTerrExits.add(butTerrExits);
        panTerrExits.add(texTerrExits);

        panRoads = new Panel(new FlowLayout());
        cheRoadsAutoExit = new Checkbox(Messages
                .getString("BoardEditor.cheRoadsAutoExit")); //$NON-NLS-1$
        cheRoadsAutoExit.addItemListener(this);
        panRoads.add(cheRoadsAutoExit);

        labTheme = new Label(
                Messages.getString("BoardEditor.labTheme"), Label.LEFT); //$NON-NLS-1$
        texTheme = new TextField("", 15); //$NON-NLS-1$
        texTheme.addTextListener(this);

        labBoard = new Label(
                Messages.getString("BoardEditor.labBoard"), Label.LEFT); //$NON-NLS-1$
        butBoardNew = new Button(Messages.getString("BoardEditor.butBoardNew")); //$NON-NLS-1$
        butBoardNew.setActionCommand("fileBoardNew"); //$NON-NLS-1$
        butBoardNew.addActionListener(this);

        butBoardLoad = new Button(Messages
                .getString("BoardEditor.butBoardLoad")); //$NON-NLS-1$
        butBoardLoad.setActionCommand("fileBoardOpen"); //$NON-NLS-1$
        butBoardLoad.addActionListener(this);

        butBoardSave = new Button(Messages
                .getString("BoardEditor.butBoardSave")); //$NON-NLS-1$
        butBoardSave.setActionCommand("fileBoardSave"); //$NON-NLS-1$
        butBoardSave.addActionListener(this);

        butBoardSaveAs = new Button(Messages
                .getString("BoardEditor.butBoardSaveAs")); //$NON-NLS-1$
        butBoardSaveAs.setActionCommand("fileBoardSaveAs"); //$NON-NLS-1$
        butBoardSaveAs.addActionListener(this);

        butBoardSaveAsImage = new Button(Messages
                .getString("BoardEditor.butBoardSaveAsImage")); //$NON-NLS-1$
        butBoardSaveAsImage.setActionCommand("fileBoardSaveAsImage"); //$NON-NLS-1$
        butBoardSaveAsImage.addActionListener(this);

        panButtons = new Panel(new GridLayout(3, 2, 2, 2));
        panButtons.add(labBoard);
        panButtons.add(butBoardNew);
        panButtons.add(butBoardLoad);
        panButtons.add(butBoardSave);
        panButtons.add(butBoardSaveAs);
        panButtons.add(butBoardSaveAsImage);

        blankL = new Label("", Label.CENTER); //$NON-NLS-1$

        final GridBagLayout gridbag = new GridBagLayout();
        final GridBagConstraints c = new GridBagConstraints();
        setLayout(gridbag);

View Full Code Here

            boardSaveAsImage();
            return;
        }
        final Dialog waitD = new Dialog(this.frame, Messages
                .getString("BoardEditor.waitDialog.title")); //$NON-NLS-1$
        waitD.add(new Label(Messages
                .getString("BoardEditor.waitDialog.message"))); //$NON-NLS-1$
        waitD.setSize(250, 130);
        // move to middle of screen
        waitD.setLocation(
                frame.getSize().width / 2 - waitD.getSize().width / 2, frame
View Full Code Here

                m_choice.add(Integer.toString(i));
            }
            int loc;
            loc = m.getLocation();
            String sDesc = "Nuclear warheads for " + m_mounted.getName() + " (" + entity.getLocationAbbr(loc) + "):"; //$NON-NLS-1$ //$NON-NLS-2$
            Label lLoc = new Label(sDesc);
            GridBagLayout g = new GridBagLayout();
            setLayout(g);
            GridBagConstraints c = new GridBagConstraints();
            c.gridx = 0;
            c.gridy = 0;
View Full Code Here

TOP

Related Classes of java.awt.Label

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.