add advanced mode
[jSite2.git] / src / net / pterodactylus / jsite / gui / ConfigurationDialog.java
index fc93c3b..a5a6c88 100644 (file)
@@ -43,6 +43,12 @@ public class ConfigurationDialog extends JDialog implements I18nable {
        /** The “cancel” action. */
        private I18nAction cancelAction;
 
+       /** The “advanced mode” action. */
+       private I18nAction advancedModeAction;
+
+       /** The “advanced mode” checkbox. */
+       private JCheckBox advancedModeCheckBox;
+
        /** The “beautify GUI” action. */
        private I18nAction antialiasAction;
 
@@ -110,6 +116,27 @@ public class ConfigurationDialog extends JDialog implements I18nable {
        }
 
        /**
+        * Returns whether the advanced mode is selected.
+        *
+        * @return <code>true</code> if the advanced mode is selected,
+        *         <code>false</code> otherwise
+        */
+       public boolean isAdvancedMode() {
+               return advancedModeCheckBox.isSelected();
+       }
+
+       /**
+        * Sets whether the advanced mode is selected.
+        *
+        * @param advancedMode
+        *            <code>true</code> if the advanced mode is selected,
+        *            <code>false</code> otherwise
+        */
+       public void setAdvancedMode(boolean advancedMode) {
+               advancedModeCheckBox.setSelected(advancedMode);
+       }
+
+       /**
         * Returns whether the “beautify” checkbox has been selected. The result of
         * this method should not be used if {@link #wasCancelled()} returned
         * <code>true</code>!
@@ -223,6 +250,15 @@ public class ConfigurationDialog extends JDialog implements I18nable {
                                actionCancel();
                        }
                };
+               advancedModeAction = new I18nAction("configurationDialog.page.interface.item.advancedMode") {
+
+                       /**
+                        * {@inheritDoc}
+                        */
+                       public void actionPerformed(ActionEvent e) {
+                               /* do nothing. */
+                       }
+               };
                antialiasAction = new I18nAction("configurationDialog.page.interfaceTweaks.item.antialias") {
 
                        /**
@@ -292,6 +328,12 @@ public class ConfigurationDialog extends JDialog implements I18nable {
         */
        private JComponent createInterfaceConfig() {
                JPanel interfaceConfigPanel = new JPanel(new GridBagLayout());
+               interfaceConfigPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
+
+               advancedModeCheckBox = new JCheckBox(advancedModeAction);
+               interfaceConfigPanel.add(advancedModeCheckBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+
+               interfaceConfigPanel.add(new JPanel(), new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
                return interfaceConfigPanel;
        }