/** 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;
}
/**
+ * 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>!
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") {
/**
*/
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;
}