panOptions = new Panel();
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);