private I18nAction cancelAction;
/** The “beautify GUI” action. */
- private I18nAction beautifyAction;
+ private I18nAction antialiasAction;
/** The “use custom control font” action. */
private I18nAction useCustomControlFontAction;
private I18nAction useCustomUserFontAction;
/** The “beautify” checkbox. */
- private JCheckBox beautifyCheckBox;
+ private JCheckBox antialiasCheckBox;
/** The “use custom” fonts checkbox. */
private JCheckBox useCustomControlFontCheckBox;
* @return <code>true</code> if the checkbox was selected,
* <code>false</code> otherwise
*/
- public boolean getBeautify() {
- return beautifyCheckBox.isSelected();
+ public boolean isAntialias() {
+ return antialiasCheckBox.isSelected();
}
/**
- * Sets the state of the “beautify” checkbox.
+ * Sets the state of the “antialias” checkbox.
*
- * @param beautify
+ * @param antialias
* The state of the checkbox
*/
- public void setBeautify(boolean beautify) {
- beautifyCheckBox.setSelected(beautify);
- useCustomControlFontCheckBox.setEnabled(beautify);
- controlFontList.setEnabled(beautify && useCustomControlFontCheckBox.isSelected());
- useCustomUserFontCheckBox.setEnabled(beautify);
- userFontList.setEnabled(beautify && useCustomUserFontCheckBox.isSelected());
+ public void setAntialias(boolean antialias) {
+ antialiasCheckBox.setSelected(antialias);
}
/**
* font is to be used
*/
public String getControlFont() {
- return (String) ((beautifyCheckBox.isSelected() && useCustomControlFontCheckBox.isSelected()) ? controlFontList.getSelectedItem() : null);
+ return (String) (useCustomControlFontCheckBox.isSelected() ? controlFontList.getSelectedItem() : null);
}
/**
*/
public void setControlFont(String controlFont) {
useCustomControlFontCheckBox.setSelected(controlFont != null);
- controlFontList.setEnabled(beautifyCheckBox.isSelected() && (controlFont != null));
+ controlFontList.setEnabled(controlFont != null);
controlFontList.setSelectedItem(controlFont);
}
* input font is to be used
*/
public String getUserFont() {
- return (String) ((beautifyCheckBox.isSelected() && useCustomUserFontCheckBox.isSelected()) ? userFontList.getSelectedItem() : null);
+ return (String) (useCustomUserFontCheckBox.isSelected() ? userFontList.getSelectedItem() : null);
}
/**
*/
public void setUserFont(String userFont) {
useCustomUserFontCheckBox.setSelected(userFont != null);
- userFontList.setEnabled(beautifyCheckBox.isSelected() && (userFont != null));
+ userFontList.setEnabled(userFont != null);
userFontList.setSelectedItem(userFont);
}
actionCancel();
}
};
- beautifyAction = new I18nAction("configurationDialog.page.interface.item.beautify") {
+ antialiasAction = new I18nAction("configurationDialog.page.interface.item.beautify") {
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
- @SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionEvent) {
- setBeautify(beautifyCheckBox.isSelected());
+ /* do nothing. */
}
};
useCustomControlFontAction = new I18nAction("configurationDialog.page.interface.item.useCustomControlFont") {
contentPane.add(tabbedPane, BorderLayout.CENTER);
JComponent interfaceConfig = createInterfaceConfig();
- tabbedPane.add("Swing Interface", interfaceConfig);
+ tabbedPane.add(I18n.get("configurationDialog.page.interface.name"), interfaceConfig);
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 12, 12));
contentPane.add(buttonPanel, BorderLayout.PAGE_END);
JPanel interfaceConfigPanel = new JPanel(new GridBagLayout());
interfaceConfigPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
- beautifyCheckBox = new JCheckBox(beautifyAction);
- interfaceConfigPanel.add(beautifyCheckBox, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
+ antialiasCheckBox = new JCheckBox(antialiasAction);
+ interfaceConfigPanel.add(antialiasCheckBox, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
useCustomControlFontCheckBox = new JCheckBox(useCustomControlFontAction);
- interfaceConfigPanel.add(useCustomControlFontCheckBox, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 18, 0, 0), 0, 0));
+ interfaceConfigPanel.add(useCustomControlFontCheckBox, new GridBagConstraints(0, 1, 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, 1, 1, 1, 1.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, 2, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0));
+ interfaceConfigPanel.add(useCustomUserFontCheckBox, new GridBagConstraints(0, 2, 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, 2, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0));
public void updateI18n() {
okayAction.updateI18n();
cancelAction.updateI18n();
- beautifyAction.updateI18n();
+ antialiasAction.updateI18n();
+ useCustomControlFontAction.updateI18n();
+ useCustomUserFontAction.updateI18n();
SwingUtils.repackCentered(this);
}