Search in sources :

Example 1 with RemoteJCheckBox

use of org.pepsoft.util.swing.RemoteJCheckBox in project WorldPainter by Captain-Chaos.

the class App method createTerrainPanel.

private JPanel createTerrainPanel() {
    JPanel terrainPanel = new JPanel();
    terrainPanel.setLayout(new GridBagLayout());
    GridBagConstraints constraints = new GridBagConstraints();
    constraints.insets = new Insets(1, 1, 1, 1);
    Configuration config = Configuration.getInstance();
    constraints.anchor = GridBagConstraints.FIRST_LINE_START;
    constraints.weightx = 0.0;
    JCheckBox checkBoxShowTerrain = new RemoteJCheckBox(terrainCheckBox, "Show:");
    checkBoxShowTerrain.setHorizontalTextPosition(SwingConstants.LEADING);
    checkBoxShowTerrain.setToolTipText("Uncheck to hide biomes from view (it will still be exported)");
    if (!config.isEasyMode()) {
        constraints.gridwidth = 1;
        constraints.weightx = 0.0;
        terrainPanel.add(checkBoxShowTerrain, constraints);
    }
    JCheckBox checkBoxSoloTerrain = new RemoteJCheckBox(terrainSoloCheckBox, "Solo:");
    checkBoxSoloTerrain.setHorizontalTextPosition(SwingConstants.LEADING);
    checkBoxSoloTerrain.setToolTipText("<html>Check to show <em>only</em> the biomes (the other layers are still exported)</html>");
    if (!config.isEasyMode()) {
        constraints.gridwidth = GridBagConstraints.REMAINDER;
        terrainPanel.add(checkBoxSoloTerrain, constraints);
    }
    JPanel buttonPanel = new JPanel(new GridLayout(0, 4));
    buttonPanel.add(createTerrainButton(GRASS));
    buttonPanel.add(createTerrainButton(PERMADIRT));
    buttonPanel.add(createTerrainButton(SAND));
    buttonPanel.add(createTerrainButton(GRASS_PATH));
    buttonPanel.add(createTerrainButton(BARE_GRASS));
    buttonPanel.add(createTerrainButton(STONE));
    buttonPanel.add(createTerrainButton(ROCK));
    buttonPanel.add(createTerrainButton(SANDSTONE));
    buttonPanel.add(createTerrainButton(STONE_MIX));
    buttonPanel.add(createTerrainButton(GRANITE));
    buttonPanel.add(createTerrainButton(DIORITE));
    buttonPanel.add(createTerrainButton(ANDESITE));
    buttonPanel.add(createTerrainButton(PODZOL));
    buttonPanel.add(createTerrainButton(COBBLESTONE));
    buttonPanel.add(createTerrainButton(MOSSY_COBBLESTONE));
    buttonPanel.add(createTerrainButton(GRAVEL));
    buttonPanel.add(createTerrainButton(OBSIDIAN));
    buttonPanel.add(createTerrainButton(WATER));
    buttonPanel.add(createTerrainButton(LAVA));
    buttonPanel.add(createTerrainButton(MAGMA));
    buttonPanel.add(createTerrainButton(NETHERRACK));
    buttonPanel.add(createTerrainButton(SOUL_SAND));
    buttonPanel.add(createTerrainButton(NETHERLIKE));
    buttonPanel.add(createTerrainButton(MYCELIUM));
    buttonPanel.add(createTerrainButton(END_STONE));
    buttonPanel.add(createTerrainButton(BEDROCK));
    buttonPanel.add(createTerrainButton(CLAY));
    buttonPanel.add(createTerrainButton(DESERT));
    buttonPanel.add(createTerrainButton(RED_SAND));
    buttonPanel.add(createTerrainButton(RED_SANDSTONE));
    buttonPanel.add(createTerrainButton(RED_DESERT));
    buttonPanel.add(createTerrainButton(MESA));
    buttonPanel.add(createTerrainButton(WHITE_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(ORANGE_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(MAGENTA_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(LIGHT_BLUE_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(YELLOW_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(LIME_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(PINK_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(GREY_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(LIGHT_GREY_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(CYAN_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(PURPLE_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(BLUE_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(BROWN_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(GREEN_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(RED_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(BLACK_STAINED_CLAY));
    buttonPanel.add(createTerrainButton(HARDENED_CLAY));
    buttonPanel.add(createTerrainButton(BEACHES));
    buttonPanel.add(createTerrainButton(DEEP_SNOW));
    JButton addCustomTerrainButton = new JButton(ACTION_SHOW_CUSTOM_TERRAIN_POPUP);
    addCustomTerrainButton.setMargin(App.BUTTON_INSETS);
    buttonPanel.add(addCustomTerrainButton);
    terrainPanel.add(buttonPanel, constraints);
    return terrainPanel;
}
Also used : RemoteJCheckBox(org.pepsoft.util.swing.RemoteJCheckBox) RemoteJCheckBox(org.pepsoft.util.swing.RemoteJCheckBox)

Aggregations

RemoteJCheckBox (org.pepsoft.util.swing.RemoteJCheckBox)1