Package java.awt

Examples of java.awt.TextField$TextFieldKitImpl


        labActive = new Label(
                Messages.getString("ChatLounge.labActive"), Label.RIGHT); //$NON-NLS-1$
        labInferno = new Label(
                Messages.getString("ChatLounge.labInferno"), Label.RIGHT); //$NON-NLS-1$

        fldConventional = new TextField(1);
        fldCommandDetonated = new TextField(1);
        fldVibrabomb = new TextField(1);
        fldActive = new TextField(1);
        fldInferno = new TextField(1);

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

        enableMinefields(client.game.getOptions().booleanOption("minefields")); //$NON-NLS-1$
View Full Code Here


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

        labBoardSize = new Label(Messages
                .getString("RandomMapDialog.BoardSize"), Label.LEFT); //$NON-NLS-1$
        texBoardWidth = new TextField(2);
        texBoardWidth.addFocusListener(this);
        texBoardHeight = new TextField(2);
        texBoardHeight.addFocusListener(this);
        slBoardSize = new SimpleLine(NORMAL_LINE_WIDTH);

        // Normal setting components...
        labElevation = new Label(Messages
                .getString("RandomMapDialog.labElevation"), Label.LEFT); //$NON-NLS-1$
        choElevation = new Choice();
        fillChoice(choElevation);
        slElevation = new SimpleLine(NORMAL_LINE_WIDTH);

        labCliffs = new Label(
                Messages.getString("RandomMapDialog.labCliffs"), Label.LEFT); //$NON-NLS-1$
        choCliffs = new Choice();
        fillChoice(choCliffs);
        slCliffs = new SimpleLine(NORMAL_LINE_WIDTH);

        labWoods = new Label(
                Messages.getString("RandomMapDialog.labWoods"), Label.LEFT); //$NON-NLS-1$
        choWoods = new Choice();
        fillChoice(choWoods);
        slWoods = new SimpleLine(NORMAL_LINE_WIDTH);

        labLakes = new Label(
                Messages.getString("RandomMapDialog.labLakes"), Label.LEFT); //$NON-NLS-1$
        choLakes = new Choice();
        fillChoice(choLakes);
        slLakes = new SimpleLine(NORMAL_LINE_WIDTH);

        labRough = new Label(
                Messages.getString("RandomMapDialog.labRough"), Label.LEFT); //$NON-NLS-1$
        choRough = new Choice();
        fillChoice(choRough);
        slRough = new SimpleLine(NORMAL_LINE_WIDTH);

        labSwamp = new Label(
                Messages.getString("RandomMapDialog.labSwamp"), Label.LEFT); //$NON-NLS-1$
        choSwamp = new Choice();
        fillChoice(choSwamp);
        slSwamp = new SimpleLine(NORMAL_LINE_WIDTH);

        labPavement = new Label(Messages
                .getString("RandomMapDialog.labPavement"), Label.LEFT);
        choPavement = new Choice();
        fillChoice(choPavement);
        slPavement = new SimpleLine(NORMAL_LINE_WIDTH);

        labRubble = new Label(Messages.getString("RandomMapDialog.labRubble"),
                Label.LEFT);
        choRubble = new Choice();
        fillChoice(choRubble);
        slRubble = new SimpleLine(NORMAL_LINE_WIDTH);

        labFortified = new Label(Messages
                .getString("RandomMapDialog.labFortified"), Label.LEFT);
        choFortified = new Choice();
        fillChoice(choFortified);
        slFortified = new SimpleLine(NORMAL_LINE_WIDTH);

        labIce = new Label(Messages.getString("RandomMapDialog.labIce"),
                Label.LEFT);
        choIce = new Choice();
        fillChoice(choIce);
        slIce = new SimpleLine(NORMAL_LINE_WIDTH);

        labCraters = new Label(
                Messages.getString("RandomMapDialog.labCraters"), Label.LEFT);
        choCraters = new Choice();
        fillChoice(choCraters);
        slCraters = new SimpleLine(NORMAL_LINE_WIDTH);

        labRivers = new Label(
                Messages.getString("RandomMapDialog.labRivers"), Label.LEFT); //$NON-NLS-1$
        choRivers = new Choice();
        fillChoice(choRivers);
        slRivers = new SimpleLine(NORMAL_LINE_WIDTH);

        labRoads = new Label(
                Messages.getString("RandomMapDialog.labRoads"), Label.LEFT); //$NON-NLS-1$
        choRoads = new Choice();
        fillChoice(choRoads);
        slRoads = new SimpleLine(NORMAL_LINE_WIDTH);

        labCity = new Label(
                Messages.getString("RandomMapDialog.labCity"), Label.LEFT); //$NON-NLS-1$
        choCity = new Choice();
        choCity.add(NONE);
        choCity.add("HUB");
        choCity.add("GRID");
        choCity.add("METRO");
        choCity.add("TOWN");
        slCity = new SimpleLine(NORMAL_LINE_WIDTH);

        labMountain = new Label(Messages
                .getString("RandomMapDialog.labMountain"), Label.LEFT); //$NON-NLS-1$
        choMountain = new Choice();
        fillChoice(choMountain);
        slMountain = new SimpleLine(NORMAL_LINE_WIDTH);

        // Advanced setting components...
        labTheme = new Label(Messages.getString("RandomMapDialog.labTheme"),
                Label.LEFT);
        texTheme = new TextField(20);
        /** how much hills there should be, Range 0..99 */
        labHilliness = new Label(Messages
                .getString("RandomMapDialog.labHilliness"), Label.LEFT); //$NON-NLS-1$
        texHilliness = new TextField(2);
        texHilliness.addFocusListener(this);
        /** Maximum level of the map */
        labRange = new Label(
                Messages.getString("RandomMapDialog.labRange"), Label.LEFT); //$NON-NLS-1$
        texRange = new TextField(2);
        texRange.addFocusListener(this);
        labProbInvert = new Label(Messages
                .getString("RandomMapDialog.labProbInvert"), Label.LEFT); //$NON-NLS-1$
        texProbInvert = new TextField(2);
        texProbInvert.addFocusListener(this);
        labCliffsAd = new Label(
                Messages.getString("RandomMapDialog.labCliffs"), Label.LEFT); //$NON-NLS-1$
        texCliffs = new TextField(2);
        texCliffs.addFocusListener(this);

        // mountain
        labMountainHeight = new Label(Messages
                .getString("RandomMapDialog.labMountainHeight"), Label.LEFT); //$NON-NLS-1$
        labMountainWidth = new Label(Messages
                .getString("RandomMapDialog.labMountainWidth"), Label.LEFT); //$NON-NLS-1$
        labMountainPeaks = new Label(Messages
                .getString("RandomMapDialog.labMountainPeaks"), Label.LEFT); //$NON-NLS-1$
        labMountainStyle = new Label(Messages
                .getString("RandomMapDialog.labMountainStyle"), Label.LEFT); //$NON-NLS-1$
        texMountainPeaks = new TextField(2);
        texMountainPeaks.addFocusListener(this);
        texMountainHeightMin = new TextField(2);
        texMountainHeightMin.addFocusListener(this);
        texMountainHeightMax = new TextField(2);
        texMountainHeightMax.addFocusListener(this);
        texMountainWidthMin = new TextField(2);
        texMountainWidthMin.addFocusListener(this);
        texMountainWidthMax = new TextField(2);
        texMountainWidthMax.addFocusListener(this);
        texMountainStyle = new TextField(2);
        texMountainStyle.addFocusListener(this);

        /** how much Lakes at least */
        labWaterSpots = new Label(Messages
                .getString("RandomMapDialog.labWaterSpots"), Label.LEFT); //$NON-NLS-1$
        texMinWaterSpots = new TextField(2);
        texMinWaterSpots.addFocusListener(this);
        /** how much Lakes at most */
        texMaxWaterSpots = new TextField(2);
        texMaxWaterSpots.addFocusListener(this);
        /** minimum size of a lake */
        labWaterSize = new Label(Messages
                .getString("RandomMapDialog.labWaterSize"), Label.LEFT); //$NON-NLS-1$
        texMinWaterSize = new TextField(2);
        texMinWaterSize.addFocusListener(this);
        /** maximum Size of a lake */
        texMaxWaterSize = new TextField(2);
        texMaxWaterSize.addFocusListener(this);
        /** probability for water deeper than lvl1, Range 0..100 */
        labProbDeep = new Label(Messages
                .getString("RandomMapDialog.labProbDeep"), Label.LEFT); //$NON-NLS-1$
        texProbDeep = new TextField(2);
        texProbDeep.addFocusListener(this);

        /** how much forests at least */
        labForestSpots = new Label(Messages
                .getString("RandomMapDialog.labForestSpots"), Label.LEFT); //$NON-NLS-1$
        texMinForestSpots = new TextField(2);
        texMinForestSpots.addFocusListener(this);
        /** how much forests at most */
        texMaxForestSpots = new TextField(2);
        texMaxForestSpots.addFocusListener(this);
        /** minimum size of a forest */
        labForestSize = new Label(Messages
                .getString("RandomMapDialog.labForestSize"), Label.LEFT); //$NON-NLS-1$
        texMinForestSize = new TextField(2);
        texMinForestSize.addFocusListener(this);
        /** maximum Size of a forest */
        texMaxForestSize = new TextField(2);
        texMaxForestSize.addFocusListener(this);
        /** probability for heavy wood, Range 0..100 */
        labProbHeavy = new Label(Messages
                .getString("RandomMapDialog.labProbHeavy"), Label.LEFT); //$NON-NLS-1$
        texProbHeavy = new TextField(2);
        texProbHeavy.addFocusListener(this);

        /** rough */
        labRoughSpots = new Label(Messages
                .getString("RandomMapDialog.labRoughSpots"), Label.LEFT); //$NON-NLS-1$
        texMinRoughSpots = new TextField(2);
        texMinRoughSpots.addFocusListener(this);
        texMaxRoughSpots = new TextField(2);
        texMaxRoughSpots.addFocusListener(this);
        labRoughSize = new Label(Messages
                .getString("RandomMapDialog.labRoughSize"), Label.LEFT); //$NON-NLS-1$
        texMinRoughSize = new TextField(2);
        texMinRoughSize.addFocusListener(this);
        texMaxRoughSize = new TextField(2);
        texMaxRoughSize.addFocusListener(this);

        /** swamp */
        labSwampSpots = new Label(Messages
                .getString("RandomMapDialog.labSwampSpots"), Label.LEFT); //$NON-NLS-1$
        texMinSwampSpots = new TextField(2);
        texMinSwampSpots.addFocusListener(this);
        texMaxSwampSpots = new TextField(2);
        texMaxSwampSpots.addFocusListener(this);
        labSwampSize = new Label(Messages
                .getString("RandomMapDialog.labSwampSize"), Label.LEFT); //$NON-NLS-1$
        texMinSwampSize = new TextField(2);
        texMinSwampSize.addFocusListener(this);
        texMaxSwampSize = new TextField(2);
        texMaxSwampSize.addFocusListener(this);

        /** pavement */
        labPavementSpots = new Label(Messages
                .getString("RandomMapDialog.labPavementSpots"), Label.LEFT);
        texMinPavementSpots = new TextField(2);
        texMinPavementSpots.addFocusListener(this);
        texMaxPavementSpots = new TextField(2);
        texMaxPavementSpots.addFocusListener(this);
        labPavementSize = new Label(Messages
                .getString("RandomMapDialog.labPavementSize"), Label.LEFT);
        texMinPavementSize = new TextField(2);
        texMinPavementSize.addFocusListener(this);
        texMaxPavementSize = new TextField(2);
        texMaxPavementSize.addFocusListener(this);

        /** Rubble */
        labRubbleSpots = new Label(Messages
                .getString("RandomMapDialog.labRubbleSpots"), Label.LEFT);
        texMinRubbleSpots = new TextField(2);
        texMinRubbleSpots.addFocusListener(this);
        texMaxRubbleSpots = new TextField(2);
        texMaxRubbleSpots.addFocusListener(this);
        labRubbleSize = new Label(Messages
                .getString("RandomMapDialog.labRubbleSize"), Label.LEFT);
        texMinRubbleSize = new TextField(2);
        texMinRubbleSize.addFocusListener(this);
        texMaxRubbleSize = new TextField(2);
        texMaxRubbleSize.addFocusListener(this);

        /** Fortified */
        labFortifiedSpots = new Label(Messages
                .getString("RandomMapDialog.labFortifiedSpots"), Label.LEFT);
        texMinFortifiedSpots = new TextField(2);
        texMinFortifiedSpots.addFocusListener(this);
        texMaxFortifiedSpots = new TextField(2);
        texMaxFortifiedSpots.addFocusListener(this);
        labFortifiedSize = new Label(Messages
                .getString("RandomMapDialog.labFortifiedSize"), Label.LEFT);
        texMinFortifiedSize = new TextField(2);
        texMinFortifiedSize.addFocusListener(this);
        texMaxFortifiedSize = new TextField(2);
        texMaxFortifiedSize.addFocusListener(this);

        /** ice */
        labIceSpots = new Label(Messages
                .getString("RandomMapDialog.labIceSpots"), Label.LEFT);
        texMinIceSpots = new TextField(2);
        texMinIceSpots.addFocusListener(this);
        texMaxIceSpots = new TextField(2);
        texMaxIceSpots.addFocusListener(this);
        labIceSize = new Label(
                Messages.getString("RandomMapDialog.labIceSize"), Label.LEFT);
        texMinIceSize = new TextField(2);
        texMinIceSize.addFocusListener(this);
        texMaxIceSize = new TextField(2);
        texMaxIceSize.addFocusListener(this);

        /** probability for a road, range 0..100 */
        labProbRoad = new Label(Messages
                .getString("RandomMapDialog.labProbRoad"), Label.LEFT); //$NON-NLS-1$
        texProbRoad = new TextField(2);
        texProbRoad.addFocusListener(this);
        /** probability for a river, range 0..100 */
        labProbRiver = new Label(Messages
                .getString("RandomMapDialog.labProbRiver"), Label.LEFT); //$NON-NLS-1$
        texProbRiver = new TextField(2);
        texProbRiver.addFocusListener(this);

        /* Craters */
        labProbCrater = new Label(Messages
                .getString("RandomMapDialog.labProbCrater"), Label.LEFT); //$NON-NLS-1$
        texProbCrater = new TextField(2);
        texProbCrater.addFocusListener(this);
        labRadius = new Label(
                Messages.getString("RandomMapDialog.labRadius"), Label.LEFT); //$NON-NLS-1$
        texMinRadius = new TextField(2);
        texMinRadius.addFocusListener(this);
        texMaxRadius = new TextField(2);
        texMaxRadius.addFocusListener(this);
        labMaxCraters = new Label(Messages
                .getString("RandomMapDialog.labMaxCraters"), Label.LEFT); //$NON-NLS-1$
        texMaxCraters = new TextField(2);
        texMaxCraters.addFocusListener(this);
        texMinCraters = new TextField(2);
        texMinCraters.addFocusListener(this);

        /* FX */
        labProbDrought = new Label(Messages
                .getString("RandomMapDialog.labProbDrought"), Label.LEFT);
        labProbFire = new Label(Messages
                .getString("RandomMapDialog.labProbFire"), Label.LEFT);
        labProbFreeze = new Label(Messages
                .getString("RandomMapDialog.labProbFreeze"), Label.LEFT);
        labProbFlood = new Label(Messages
                .getString("RandomMapDialog.labProbFlood"), Label.LEFT);
        labFxMod = new Label(Messages.getString("RandomMapDialog.labFxMod"),
                Label.LEFT);
        texProbDrought = new TextField(2);
        texProbFire = new TextField(2);
        texProbFreeze = new TextField(2);
        texProbFlood = new TextField(2);
        texFxMod = new TextField(2);

        /* Buildings */
        labCityBlocks = new Label(Messages
                .getString("RandomMapDialog.labCityBlocks"), Label.LEFT);
        labCityCF = new Label(Messages.getString("RandomMapDialog.labCityCF"),
                Label.LEFT);
        labCityFloors = new Label(Messages
                .getString("RandomMapDialog.labCityFloors"), Label.LEFT);
        labCityDensity = new Label(Messages
                .getString("RandomMapDialog.labCityDensity"), Label.LEFT);
        labTownSize = new Label(Messages
                .getString("RandomMapDialog.labTownSize"), Label.LEFT);
        texCityBlocks = new TextField(2);
        texCityMinCF = new TextField(2);
        texCityMaxCF = new TextField(2);
        texCityMinFloors = new TextField(2);
        texCityMaxFloors = new TextField(2);
        texCityDensity = new TextField(2);
        texTownSize = new TextField(2);

        labInvertNegative = new Label(Messages
                .getString("RandomMapDialog.labInvertNegative"), Label.LEFT); //$NON-NLS-1$
        texInvertNegative = new TextField(1);

        /** Algorithm */
        labAlgorithmToUse = new Label(Messages
                .getString("RandomMapDialog.labAlgorithmToUse"), Label.LEFT); //$NON-NLS-1$
        texAlgorithmToUse = new TextField(2);

        slElevationAd = new SimpleLine(ADVANCED_LINE_WIDTH);
        slWoodsAd = new SimpleLine(ADVANCED_LINE_WIDTH);
        slLakesAd = new SimpleLine(ADVANCED_LINE_WIDTH);
        slPavementAd = new SimpleLine(ADVANCED_LINE_WIDTH);
View Full Code Here

        return true;
    }

    public void focusGained(FocusEvent fe) {
        if (fe.getSource() instanceof TextField) {
            TextField tf = (TextField) fe.getSource();
            tf.selectAll();
        }
    }
View Full Code Here

        }
    }

    public void focusLost(FocusEvent fe) {
        if (fe.getSource() instanceof TextField) {
            TextField tf = (TextField) fe.getSource();
            tf.select(0, 0);
        }
    }
View Full Code Here

                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()
                .getLastConnectAddr(), 16);
        serverAddrF.addActionListener(this);
        portF = new TextField(PreferenceManager.getClientPreferences()
                .getLastConnectPort()
                + "", 4); //$NON-NLS-1$
        portF.addActionListener(this);

        okayB = new Button(Messages.getString("Okay")); //$NON-NLS-1$
View Full Code Here

        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$

        butOkay = new Button(Messages.getString("Okay")); //$NON-NLS-1$
        butOkay.setActionCommand("done"); //$NON-NLS-1$
        butOkay.addActionListener(this);
        butOkay.setSize(80, 24);
View Full Code Here

        chatArea = new TextArea(
                " \n", GUIPreferences.getInstance().getInt("AdvancedChatboxSize"), 40, TextArea.SCROLLBARS_VERTICAL_ONLY); //$NON-NLS-1$
        chatArea.setEditable(false);
        playerList = new List(GUIPreferences.getInstance().getInt(
                "AdvancedChatboxSize"));
        inputField = new TextField();
        inputField.addKeyListener(this);
        butDone = new Button(Messages.getString("ChatterBox.ImDone")); //$NON-NLS-1$
        butDone.setEnabled(false);

        chatPanel = new Panel(new BorderLayout());
View Full Code Here

     */
    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$
View Full Code Here

                if (!editable)
                    choice.setEnabled(false);

                break;
            default:
                textField = new TextField(option.stringValue(), option
                        .getTextFieldLength());
                textField.addMouseListener(this);
                label = new Label(option.getDisplayableName());
                label.addMouseListener(this);
View Full Code Here

        main.add(panXmit);
        this.add(main);

        // Populate the connection panel.
        panConnect.add(new Label(" Connect To:"));
        hostName = new TextField("localhost", 10);
        panConnect.add(hostName);
        panConnect.add(new Label("Port Number:"));
        hostPort = new TextField("2346", 10);
        panConnect.add(hostPort);
        button = new Button("Listen");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                (new Thread(PacketTool.this, "Packet Reader")).start();
View Full Code Here

TOP

Related Classes of java.awt.TextField$TextFieldKitImpl

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.