use of com.badlogic.gdx.setup.GdxSetupUI.SetupCheckBox in project libgdx by libgdx.
the class SettingsDialog method uiLayout.
private void uiLayout() {
content = new JPanel(new GridBagLayout());
content.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
bottomPanel = new JPanel(new GridBagLayout());
buttonPanel = new JPanel(new GridBagLayout());
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
buttonOK = new SetupButton("Save");
buttonCancel = new SetupButton("Cancel");
buttonPanel.add(buttonOK, new GridBagConstraints(0, 0, 1, 1, 0, 0, CENTER, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
buttonPanel.add(buttonCancel, new GridBagConstraints(1, 0, 1, 1, 0, 0, CENTER, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
contentPane.add(content, new GridBagConstraints(0, 0, 1, 1, 1, 1, NORTH, BOTH, new Insets(0, 0, 0, 0), 0, 0));
JLabel settings = new JLabel("Settings");
JLabel description = new JLabel("Description");
settings.setForeground(new Color(255, 255, 255));
description.setForeground(new Color(255, 255, 255));
settings.setHorizontalAlignment(JLabel.CENTER);
description.setHorizontalAlignment(JLabel.CENTER);
content.add(settings, new GridBagConstraints(0, 0, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
content.add(description, new GridBagConstraints(3, 0, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
JLabel mavenLabel = new JLabel("Maven Mirror Url");
JLabel mavenDesc = new JLabel("Replaces Maven Central with this repository");
mavenTextField = new JTextField(15);
mavenTextField.setMinimumSize(mavenTextField.getPreferredSize());
mavenLabel.setForeground(new Color(170, 170, 170));
mavenDesc.setForeground(new Color(170, 170, 170));
JLabel ideaLabel = new JLabel("IDEA");
JLabel ideaDesc = new JLabel("Generates Intellij IDEA project files");
ideaBox = new SetupCheckBox();
ideaLabel.setForeground(new Color(170, 170, 170));
ideaDesc.setForeground(new Color(170, 170, 170));
ideaBox.setBackground(new Color(36, 36, 36));
JLabel eclipseLabel = new JLabel("Eclipse");
JLabel eclipseDesc = new JLabel("Generates Eclipse project files");
eclipseBox = new SetupCheckBox();
eclipseLabel.setForeground(new Color(170, 170, 170));
eclipseDesc.setForeground(new Color(170, 170, 170));
eclipseBox.setBackground(new Color(36, 36, 36));
JLabel offlineLabel = new JLabel("Offline Mode");
JLabel offlineDesc = new JLabel("Don't force download dependencies");
offlineBox = new SetupCheckBox();
offlineLabel.setForeground(new Color(170, 170, 170));
offlineDesc.setForeground(new Color(170, 170, 170));
offlineBox.setBackground(new Color(36, 36, 36));
JSeparator separator = new JSeparator();
separator.setForeground(new Color(85, 85, 85));
separator.setBackground(new Color(85, 85, 85));
content.add(separator, new GridBagConstraints(0, 1, 4, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
content.add(mavenLabel, new GridBagConstraints(0, 2, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
content.add(mavenTextField, new GridBagConstraints(1, 2, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(mavenDesc, new GridBagConstraints(3, 2, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(ideaLabel, new GridBagConstraints(0, 3, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
content.add(ideaBox, new GridBagConstraints(1, 3, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(ideaDesc, new GridBagConstraints(3, 3, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(eclipseLabel, new GridBagConstraints(0, 4, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
content.add(eclipseBox, new GridBagConstraints(1, 4, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(eclipseDesc, new GridBagConstraints(3, 4, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(offlineLabel, new GridBagConstraints(0, 5, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
content.add(offlineBox, new GridBagConstraints(1, 5, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
content.add(offlineDesc, new GridBagConstraints(3, 5, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
String text = "<p style=\"font-size:10\">Click for more info on using Gradle without IDE integration</p>";
linkText = new JLabel("<html>" + text + "</html>");
bottomPanel.add(linkText, new GridBagConstraints(0, 0, 1, 1, 1, 1, WEST, NONE, new Insets(0, 10, 0, 0), 0, 0));
bottomPanel.add(buttonPanel, new GridBagConstraints(3, 0, 1, 1, 1, 1, SOUTHEAST, NONE, new Insets(0, 0, 0, 0), 0, 0));
contentPane.add(bottomPanel, new GridBagConstraints(0, 1, 4, 1, 1, 1, SOUTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
}
Aggregations