/*
- * jSite - PreferencesPage.java - Copyright © 2009–2012 David Roden
+ * jSite - PreferencesPage.java - Copyright © 2009–2019 David Roden
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import de.todesbaum.jsite.i18n.I18n;
import de.todesbaum.jsite.i18n.I18nContainer;
import de.todesbaum.jsite.main.ConfigurationLocator.ConfigurationLocation;
-import de.todesbaum.util.freenet.fcp2.ClientPutDir.ManifestPutter;
import de.todesbaum.util.freenet.fcp2.PriorityClass;
import de.todesbaum.util.swing.TWizard;
import de.todesbaum.util.swing.TWizardPage;
/** The insert priority select box. */
private JComboBox insertPriorityComboBox;
- /** The manifest putter select box. */
- private JComboBox manifestPutterComboBox;
-
/**
* Creates a new “preferences” page.
*
/**
* {@inheritDoc}
*/
+ @Override
public void run() {
setHeading(I18n.getMessage("jsite.preferences.heading"));
setDescription(I18n.getMessage("jsite.preferences.description"));
}
/**
- * Returns the selected manifest putter.
- *
- * @return The selected manifest putter
- */
- public ManifestPutter getManifestPutter() {
- return (ManifestPutter) manifestPutterComboBox.getSelectedItem();
- }
-
- /**
- * Sets the manifest putter.
- *
- * @param manifestPutter
- * The manifest putter
- */
- public void setManifestPutter(ManifestPutter manifestPutter) {
- manifestPutterComboBox.setSelectedItem(manifestPutter);
- }
-
- /**
* {@inheritDoc}
*/
@Override
/**
* {@inheritDoc}
*/
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionEvent) {
selectDefaultTempDirectory();
/**
* {@inheritDoc}
*/
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionEvent) {
selectCustomTempDirectory();
};
chooseTempDirectoryAction = new AbstractAction(I18n.getMessage("jsite.preferences.temp-directory.choose")) {
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent e) {
chooseTempDirectory();
};
nextToJarFileAction = new AbstractAction(I18n.getMessage("jsite.preferences.config-directory.jar")) {
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionevent) {
configurationLocation = ConfigurationLocation.NEXT_TO_JAR_FILE;
};
homeDirectoryAction = new AbstractAction(I18n.getMessage("jsite.preferences.config-directory.home")) {
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionevent) {
configurationLocation = ConfigurationLocation.HOME_DIRECTORY;
};
customDirectoryAction = new AbstractAction(I18n.getMessage("jsite.preferences.config-directory.custom")) {
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionEvent) {
configurationLocation = ConfigurationLocation.CUSTOM;
};
useEarlyEncodeAction = new AbstractAction(I18n.getMessage("jsite.preferences.insert-options.use-early-encode")) {
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionEvent) {
useEarlyEncode = useEarlyEncodeCheckBox.isSelected();
};
priorityAction = new AbstractAction(I18n.getMessage("jsite.preferences.insert-options.priority")) {
+ @Override
@SuppressWarnings("synthetic-access")
public void actionPerformed(ActionEvent actionEvent) {
priority = (PriorityClass) insertPriorityComboBox.getSelectedItem();
I18nContainer.getInstance().registerRunnable(new Runnable() {
+ @Override
@SuppressWarnings("synthetic-access")
public void run() {
selectDefaultTempDirectoryAction.putValue(Action.NAME, I18n.getMessage("jsite.preferences.temp-directory.default"));
insertPriorityComboBox.setAction(priorityAction);
preferencesPanel.add(insertPriorityComboBox, new GridBagConstraints(1, 9, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 18, 0, 0), 0, 0));
- final JLabel manifestPutterLabel = new JLabel(I18n.getMessage("jsite.preferences.insert-options.manifest-putter"));
- preferencesPanel.add(manifestPutterLabel, new GridBagConstraints(0, 10, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0));
-
- manifestPutterComboBox = new JComboBox(ManifestPutter.values());
- preferencesPanel.add(manifestPutterComboBox, new GridBagConstraints(1, 10, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 18, 0, 0), 0, 0));
-
I18nContainer.getInstance().registerRunnable(new Runnable() {
/**
* {@inheritDoc}
*/
+ @Override
public void run() {
tempDirectoryLabel.setText("<html><b>" + I18n.getMessage("jsite.preferences.temp-directory") + "</b></html>");
configurationDirectoryLabel.setText("<html><b>" + I18n.getMessage("jsite.preferences.config-directory") + "</b></html>");
insertOptionsLabel.setText("<html><b>" + I18n.getMessage("jsite.preferences.insert-options") + "</b></html>");
insertPriorityLabel.setText(I18n.getMessage("jsite.preferences.insert-options.priority"));
- manifestPutterLabel.setText(I18n.getMessage("jsite.preferences.insert-options.manifest-putter"));
}
});