X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FConfigurationDialog.java;h=fc93c3b0c6a37351b6d9ab94481886889f848f22;hb=c7561c631f4bbb94ee0ac9047e953ce56f1df8bb;hp=1d0a4bf2c46b1b2669cfe240de2bebf4a2f81520;hpb=4cc40da06ea68d5e90b2bf340cd04220bc6a06cb;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java b/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java index 1d0a4bf..fc93c3b 100644 --- a/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java +++ b/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java @@ -223,7 +223,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { actionCancel(); } }; - antialiasAction = new I18nAction("configurationDialog.page.interface.item.antialias") { + antialiasAction = new I18nAction("configurationDialog.page.interfaceTweaks.item.antialias") { /** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) @@ -232,7 +232,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /* do nothing. */ } }; - useCustomControlFontAction = new I18nAction("configurationDialog.page.interface.item.useCustomControlFont") { + useCustomControlFontAction = new I18nAction("configurationDialog.page.interfaceTweaks.item.useCustomControlFont") { /** * {@inheritDoc} @@ -244,7 +244,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { controlFontSizeSpinner.setEnabled(selected); } }; - useCustomUserFontAction = new I18nAction("configurationDialog.page.interface.item.useCustomUserFont") { + useCustomUserFontAction = new I18nAction("configurationDialog.page.interfaceTweaks.item.useCustomUserFont") { /** * {@inheritDoc} @@ -268,8 +268,11 @@ public class ConfigurationDialog extends JDialog implements I18nable { JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT); contentPane.add(tabbedPane, BorderLayout.CENTER); + JComponent interfaceConfig = createInterfaceConfig(); + tabbedPane.add(I18n.get("configurationDialog.page.interface.name"), interfaceConfig); + JComponent interfaceTweaksConfig = createInterfaceTweaksConfig(); - tabbedPane.add(I18n.get("configurationDialog.page.interface.name"), interfaceTweaksConfig); + tabbedPane.add(I18n.get("configurationDialog.page.interfaceTweaks.name"), interfaceTweaksConfig); JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 12, 12)); contentPane.add(buttonPanel, BorderLayout.PAGE_END); @@ -283,41 +286,51 @@ public class ConfigurationDialog extends JDialog implements I18nable { } /** - * Creates the panel for the interface configuration. + * Creates the interface configuration panel. * * @return The interface configuration panel */ - private JComponent createInterfaceTweaksConfig() { + private JComponent createInterfaceConfig() { JPanel interfaceConfigPanel = new JPanel(new GridBagLayout()); - interfaceConfigPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); + return interfaceConfigPanel; + } + + /** + * Creates the panel for the interface tweaks configuration. + * + * @return The interface tweaks configuration panel + */ + private JComponent createInterfaceTweaksConfig() { + JPanel interfaceTweaksConfigPanel = new JPanel(new GridBagLayout()); + interfaceTweaksConfigPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); - restartRequiredLabel = new I18nLabel("configurationDialog.page.interface.item.restartRequired"); - interfaceConfigPanel.add(restartRequiredLabel, new GridBagConstraints(0, 0, 3, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + restartRequiredLabel = new I18nLabel("configurationDialog.page.interfaceTweaks.item.restartRequired"); + interfaceTweaksConfigPanel.add(restartRequiredLabel, new GridBagConstraints(0, 0, 3, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); antialiasCheckBox = new JCheckBox(antialiasAction); - interfaceConfigPanel.add(antialiasCheckBox, new GridBagConstraints(0, 1, 3, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(18, 0, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(antialiasCheckBox, new GridBagConstraints(0, 1, 3, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(18, 0, 0, 0), 0, 0)); useCustomControlFontCheckBox = new JCheckBox(useCustomControlFontAction); - interfaceConfigPanel.add(useCustomControlFontCheckBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 0, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(useCustomControlFontCheckBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 0, 0, 0), 0, 0)); controlFontList = new FontComboBox(); - interfaceConfigPanel.add(controlFontList, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(controlFontList, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); controlFontSizeSpinner = new JSpinner(new SpinnerNumberModel(12, 6, 80, 1)); - interfaceConfigPanel.add(controlFontSizeSpinner, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(controlFontSizeSpinner, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); useCustomUserFontCheckBox = new JCheckBox(useCustomUserFontAction); - interfaceConfigPanel.add(useCustomUserFontCheckBox, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 0, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(useCustomUserFontCheckBox, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 0, 0, 0), 0, 0)); userFontList = new FontComboBox(); - interfaceConfigPanel.add(userFontList, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(userFontList, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); userFontSizeSpinner = new JSpinner(new SpinnerNumberModel(12, 6, 80, 1)); - interfaceConfigPanel.add(userFontSizeSpinner, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(userFontSizeSpinner, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); - interfaceConfigPanel.add(new JPanel(), new GridBagConstraints(0, 4, 3, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); + interfaceTweaksConfigPanel.add(new JPanel(), new GridBagConstraints(0, 4, 3, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); - return interfaceConfigPanel; + return interfaceTweaksConfigPanel; } //