Merge pull request #2536 from SiboVG/remove-selectcolor
Remove SelectColorButton and SelectColorToggleButton
This commit is contained in:
commit
7e995f2ace
@ -17,8 +17,6 @@ import java.awt.Color;
|
|||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A panel implementation of a color chooser. The panel has a label and a textfield. The label identifies
|
* A panel implementation of a color chooser. The panel has a label and a textfield. The label identifies
|
||||||
* what the color is to be used for (the purpose), and the textfield is uneditable but has its background set
|
* what the color is to be used for (the purpose), and the textfield is uneditable but has its background set
|
||||||
@ -60,7 +58,7 @@ public class ColorChooser extends JPanel {
|
|||||||
field.setBackground(curColor);
|
field.setBackground(curColor);
|
||||||
parent.add(field, "width 50:100:100");
|
parent.add(field, "width 50:100:100");
|
||||||
|
|
||||||
final JButton button = new SelectColorButton(COLOR_CHOOSER_BUTTON_LABEL);
|
final JButton button = new JButton(COLOR_CHOOSER_BUTTON_LABEL);
|
||||||
|
|
||||||
ActionListener actionListener = new ActionListener() {
|
ActionListener actionListener = new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,7 +10,6 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.JToggleButton;
|
import javax.swing.JToggleButton;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorToggleButton;
|
|
||||||
import info.openrocket.core.l10n.Translator;
|
import info.openrocket.core.l10n.Translator;
|
||||||
import info.openrocket.core.rocketcomponent.AxialStage;
|
import info.openrocket.core.rocketcomponent.AxialStage;
|
||||||
import info.openrocket.core.rocketcomponent.BodyTube;
|
import info.openrocket.core.rocketcomponent.BodyTube;
|
||||||
@ -45,7 +44,7 @@ public class StageSelector extends JPanel implements StateChangeListener {
|
|||||||
|
|
||||||
for (RocketComponent stage : assemblies) {
|
for (RocketComponent stage : assemblies) {
|
||||||
if (!(stage instanceof AxialStage)) continue;
|
if (!(stage instanceof AxialStage)) continue;
|
||||||
JToggleButton button = new SelectColorToggleButton(new StageAction((AxialStage) stage));
|
JToggleButton button = new JToggleButton(new StageAction((AxialStage) stage));
|
||||||
button.setSelected(configuration.isStageActive(stage.getStageNumber()));
|
button.setSelected(configuration.isStageActive(stage.getStageNumber()));
|
||||||
this.add(button);
|
this.add(button);
|
||||||
buttons.add(button);
|
buttons.add(button);
|
||||||
|
@ -23,7 +23,6 @@ import info.openrocket.core.l10n.Translator;
|
|||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.core.util.Chars;
|
import info.openrocket.core.util.Chars;
|
||||||
import info.openrocket.core.util.MathUtil;
|
import info.openrocket.core.util.MathUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,7 +146,7 @@ public class CompassSelectionButton extends FlatButton implements Resettable {
|
|||||||
|
|
||||||
panel.add(new JLabel("" + Chars.DEGREE), "wrap para");
|
panel.add(new JLabel("" + Chars.DEGREE), "wrap para");
|
||||||
|
|
||||||
JButton close = new SelectColorButton("OK");
|
JButton close = new JButton("OK");
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -64,7 +64,6 @@ import info.openrocket.swing.gui.util.ColorConversion;
|
|||||||
import info.openrocket.swing.gui.util.EditDecalHelper;
|
import info.openrocket.swing.gui.util.EditDecalHelper;
|
||||||
import info.openrocket.swing.gui.util.EditDecalHelper.EditDecalHelperException;
|
import info.openrocket.swing.gui.util.EditDecalHelper.EditDecalHelperException;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class AppearancePanel extends JPanel implements Invalidatable, InvalidatingWidget {
|
public class AppearancePanel extends JPanel implements Invalidatable, InvalidatingWidget {
|
||||||
private static final long serialVersionUID = 2709187552673202019L;
|
private static final long serialVersionUID = 2709187552673202019L;
|
||||||
@ -270,7 +269,7 @@ public class AppearancePanel extends JPanel implements Invalidatable, Invalidati
|
|||||||
if (figureColor == null) {
|
if (figureColor == null) {
|
||||||
figureColor = ((SwingPreferences) Application.getPreferences()).getDefaultColor(c.getClass());
|
figureColor = ((SwingPreferences) Application.getPreferences()).getDefaultColor(c.getClass());
|
||||||
}
|
}
|
||||||
final JButton figureColorButton = new SelectColorButton(
|
final JButton figureColorButton = new JButton(
|
||||||
new ColorIcon(figureColor));
|
new ColorIcon(figureColor));
|
||||||
|
|
||||||
ab.addChangeListener(new StateChangeListener() {
|
ab.addChangeListener(new StateChangeListener() {
|
||||||
@ -320,7 +319,7 @@ public class AppearancePanel extends JPanel implements Invalidatable, Invalidati
|
|||||||
add(colorDefault);
|
add(colorDefault);
|
||||||
order.add(colorDefault);
|
order.add(colorDefault);
|
||||||
|
|
||||||
saveAsDefault = new SelectColorButton(
|
saveAsDefault = new JButton(
|
||||||
trans.get("RocketCompCfg.but.Saveasdefstyle"));
|
trans.get("RocketCompCfg.but.Saveasdefstyle"));
|
||||||
saveAsDefault.addActionListener(new ActionListener() {
|
saveAsDefault.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -532,7 +531,7 @@ public class AppearancePanel extends JPanel implements Invalidatable, Invalidati
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
JButton colorButton = new SelectColorButton(new ColorIcon(builder.getPaint()));
|
JButton colorButton = new JButton(new ColorIcon(builder.getPaint()));
|
||||||
|
|
||||||
colorButton.addActionListener(new ColorActionListener(builder, "Paint"));
|
colorButton.addActionListener(new ColorActionListener(builder, "Paint"));
|
||||||
|
|
||||||
@ -592,7 +591,7 @@ public class AppearancePanel extends JPanel implements Invalidatable, Invalidati
|
|||||||
|
|
||||||
//// Edit button
|
//// Edit button
|
||||||
if ((SystemInfo.getPlatform() != Platform.UNIX) || !SystemInfo.isConfined()) {
|
if ((SystemInfo.getPlatform() != Platform.UNIX) || !SystemInfo.isConfined()) {
|
||||||
JButton editBtn = new SelectColorButton(
|
JButton editBtn = new JButton(
|
||||||
trans.get("AppearanceCfg.but.edit"));
|
trans.get("AppearanceCfg.but.edit"));
|
||||||
// Enable the editBtn only when the appearance builder has an Image
|
// Enable the editBtn only when the appearance builder has an Image
|
||||||
// assigned to it.
|
// assigned to it.
|
||||||
|
@ -9,7 +9,6 @@ import javax.swing.JSpinner;
|
|||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import info.openrocket.core.logging.Markers;
|
import info.openrocket.core.logging.Markers;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
import info.openrocket.core.document.OpenRocketDocument;
|
import info.openrocket.core.document.OpenRocketDocument;
|
||||||
@ -156,7 +155,7 @@ public class ComponentAssemblyConfig extends RocketComponentConfig {
|
|||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
split = new SelectColorButton(btnText);
|
split = new JButton(btnText);
|
||||||
split.setToolTipText(btnTextTtip);
|
split.setToolTipText(btnTextTtip);
|
||||||
split.addActionListener(new ActionListener() {
|
split.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,7 +57,6 @@ import info.openrocket.swing.gui.components.BasicSlider;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -86,7 +85,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
|
|||||||
//// Convert buttons
|
//// Convert buttons
|
||||||
if (!(component instanceof FreeformFinSet)) {
|
if (!(component instanceof FreeformFinSet)) {
|
||||||
//// Convert to freeform
|
//// Convert to freeform
|
||||||
convert = new SelectColorButton(trans.get("FinSetConfig.but.Converttofreeform"));
|
convert = new JButton(trans.get("FinSetConfig.but.Converttofreeform"));
|
||||||
//// Convert this fin set into a freeform fin set
|
//// Convert this fin set into a freeform fin set
|
||||||
convert.setToolTipText(trans.get("FinSetConfig.but.Converttofreeform.ttip"));
|
convert.setToolTipText(trans.get("FinSetConfig.but.Converttofreeform.ttip"));
|
||||||
convert.addActionListener(new ActionListener() {
|
convert.addActionListener(new ActionListener() {
|
||||||
@ -114,7 +113,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//// Split fins
|
//// Split fins
|
||||||
split = new SelectColorButton(trans.get("FinSetConfig.but.Splitfins"));
|
split = new JButton(trans.get("FinSetConfig.but.Splitfins"));
|
||||||
//// Split the fin set into separate fins
|
//// Split the fin set into separate fins
|
||||||
split.setToolTipText(trans.get("FinSetConfig.but.Splitfins.ttip"));
|
split.setToolTipText(trans.get("FinSetConfig.but.Splitfins.ttip"));
|
||||||
split.addActionListener(new ActionListener() {
|
split.addActionListener(new ActionListener() {
|
||||||
@ -146,7 +145,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
|
|||||||
split.setEnabled(((FinSet) component).getFinCount() > 1);
|
split.setEnabled(((FinSet) component).getFinCount() > 1);
|
||||||
|
|
||||||
//// Export to SVG
|
//// Export to SVG
|
||||||
JButton exportSVGBtn = new SelectColorButton(trans.get("FinSetConfig.lbl.exportSVG"));
|
JButton exportSVGBtn = new JButton(trans.get("FinSetConfig.lbl.exportSVG"));
|
||||||
exportSVGBtn.setToolTipText(trans.get("FinSetConfig.lbl.exportSVG.ttip"));
|
exportSVGBtn.setToolTipText(trans.get("FinSetConfig.lbl.exportSVG.ttip"));
|
||||||
exportSVGBtn.addActionListener(new ActionListener() {
|
exportSVGBtn.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -292,7 +291,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
|
|||||||
order.add(enumCombo);
|
order.add(enumCombo);
|
||||||
|
|
||||||
// Calculate fin tab height, length, and position
|
// Calculate fin tab height, length, and position
|
||||||
autoCalc = new SelectColorButton(trans.get("FinSetConfig.but.AutoCalc"));
|
autoCalc = new JButton(trans.get("FinSetConfig.but.AutoCalc"));
|
||||||
autoCalc.setToolTipText(trans.get("FinSetConfig.but.AutoCalc.ttip"));
|
autoCalc.setToolTipText(trans.get("FinSetConfig.but.AutoCalc.ttip"));
|
||||||
|
|
||||||
autoCalc.addActionListener(new ActionListener() {
|
autoCalc.addActionListener(new ActionListener() {
|
||||||
|
@ -71,7 +71,6 @@ import info.openrocket.swing.gui.scalefigure.ScaleSelector;
|
|||||||
import info.openrocket.swing.gui.util.CustomFinImporter;
|
import info.openrocket.swing.gui.util.CustomFinImporter;
|
||||||
import info.openrocket.swing.gui.util.FileHelper;
|
import info.openrocket.swing.gui.util.FileHelper;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class FreeformFinSetConfig extends FinSetConfig {
|
public class FreeformFinSetConfig extends FinSetConfig {
|
||||||
@ -266,7 +265,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
|||||||
});
|
});
|
||||||
JScrollPane tablePane = new JScrollPane(table);
|
JScrollPane tablePane = new JScrollPane(table);
|
||||||
|
|
||||||
JButton scaleButton = new SelectColorButton(trans.get("FreeformFinSetConfig.lbl.scaleFin"));
|
JButton scaleButton = new JButton(trans.get("FreeformFinSetConfig.lbl.scaleFin"));
|
||||||
scaleButton.addActionListener(new ActionListener() {
|
scaleButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -295,7 +294,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
|||||||
// panel.add(new JLabel("Coordinates:"), "aligny bottom, alignx 50%");
|
// panel.add(new JLabel("Coordinates:"), "aligny bottom, alignx 50%");
|
||||||
// panel.add(new JLabel(" View:"), "wrap, aligny bottom");
|
// panel.add(new JLabel(" View:"), "wrap, aligny bottom");
|
||||||
|
|
||||||
JButton exportCsvButton = new SelectColorButton(trans.get("FreeformFinSetConfig.lbl.exportCSV"));
|
JButton exportCsvButton = new JButton(trans.get("FreeformFinSetConfig.lbl.exportCSV"));
|
||||||
exportCsvButton.addActionListener(new ActionListener() {
|
exportCsvButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -317,7 +316,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
JButton importButton = new SelectColorButton(trans.get("CustomFinImport.button.label"));
|
JButton importButton = new JButton(trans.get("CustomFinImport.button.label"));
|
||||||
importButton.addActionListener(new ActionListener() {
|
importButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -58,7 +58,6 @@ import info.openrocket.swing.gui.components.DescriptionArea;
|
|||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -255,7 +254,7 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
JButton button = new SelectColorButton(trans.get("ringcompcfg.but.Reset"));
|
JButton button = new JButton(trans.get("ringcompcfg.but.Reset"));
|
||||||
//// Reset the component to the rocket centerline
|
//// Reset the component to the rocket centerline
|
||||||
button.setToolTipText(trans.get("ringcompcfg.but.Resetcomponant"));
|
button.setToolTipText(trans.get("ringcompcfg.but.Resetcomponant"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@ -405,7 +404,7 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
// Split button
|
// Split button
|
||||||
//// Split cluster
|
//// Split cluster
|
||||||
JButton split = new SelectColorButton(trans.get("InnerTubeCfg.but.Splitcluster"));
|
JButton split = new JButton(trans.get("InnerTubeCfg.but.Splitcluster"));
|
||||||
//// <html>Split the cluster into separate components.<br>
|
//// <html>Split the cluster into separate components.<br>
|
||||||
//// This also duplicates all components attached to this inner tube.
|
//// This also duplicates all components attached to this inner tube.
|
||||||
split.setToolTipText(trans.get("InnerTubeCfg.lbl.longA1") +
|
split.setToolTipText(trans.get("InnerTubeCfg.lbl.longA1") +
|
||||||
@ -456,7 +455,7 @@ public class InnerTubeConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
// Reset button
|
// Reset button
|
||||||
///// Reset settings
|
///// Reset settings
|
||||||
JButton reset = new SelectColorButton(trans.get("InnerTubeCfg.but.Resetsettings"));
|
JButton reset = new JButton(trans.get("InnerTubeCfg.but.Resetsettings"));
|
||||||
//// Reset the separation and rotation to the default values
|
//// Reset the separation and rotation to the default values
|
||||||
reset.setToolTipText(trans.get("InnerTubeCfg.but.ttip.Resetsettings"));
|
reset.setToolTipText(trans.get("InnerTubeCfg.but.ttip.Resetsettings"));
|
||||||
reset.addActionListener(new ActionListener() {
|
reset.addActionListener(new ActionListener() {
|
||||||
|
@ -26,7 +26,6 @@ import info.openrocket.swing.gui.adaptors.DoubleModel;
|
|||||||
import info.openrocket.swing.gui.adaptors.EnumModel;
|
import info.openrocket.swing.gui.adaptors.EnumModel;
|
||||||
import info.openrocket.swing.gui.components.BasicSlider;
|
import info.openrocket.swing.gui.components.BasicSlider;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@ -195,7 +194,7 @@ public class MassComponentConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
JButton button = new SelectColorButton(trans.get("MassComponentCfg.but.Reset"));
|
JButton button = new JButton(trans.get("MassComponentCfg.but.Reset"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -17,7 +17,6 @@ import info.openrocket.core.startup.Application;
|
|||||||
|
|
||||||
import info.openrocket.swing.gui.adaptors.EnumModel;
|
import info.openrocket.swing.gui.adaptors.EnumModel;
|
||||||
import info.openrocket.swing.gui.adaptors.MaterialModel;
|
import info.openrocket.swing.gui.adaptors.MaterialModel;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
@ -79,7 +78,7 @@ public class MaterialPanel extends JPanel implements Invalidatable, Invalidating
|
|||||||
order.add(finishCombo);
|
order.add(finishCombo);
|
||||||
|
|
||||||
//// Set for all
|
//// Set for all
|
||||||
JButton button = new SelectColorButton(trans.get("MaterialPanel.but.SetForAll"));
|
JButton button = new JButton(trans.get("MaterialPanel.but.SetForAll"));
|
||||||
//// Set this finish for all components of the rocket.
|
//// Set this finish for all components of the rocket.
|
||||||
button.setToolTipText(trans.get("MaterialPanel.but.SetForAll.ttip"));
|
button.setToolTipText(trans.get("MaterialPanel.but.SetForAll.ttip"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
|
@ -40,7 +40,6 @@ import info.openrocket.swing.gui.components.BasicSlider;
|
|||||||
import info.openrocket.swing.gui.components.HtmlLabel;
|
import info.openrocket.swing.gui.components.HtmlLabel;
|
||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class ParachuteConfig extends RecoveryDeviceConfig {
|
public class ParachuteConfig extends RecoveryDeviceConfig {
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
order.add(((SpinnerEditor) spin.getEditor()).getTextField());
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
JButton button = new SelectColorButton(trans.get("ParachuteCfg.but.Reset"));
|
JButton button = new JButton(trans.get("ParachuteCfg.but.Reset"));
|
||||||
button.setToolTipText(String.format(trans.get("ParachuteCfg.but.ResetCd.ttip"), Parachute.DEFAULT_CD));
|
button.setToolTipText(String.format(trans.get("ParachuteCfg.but.ResetCd.ttip"), Parachute.DEFAULT_CD));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -336,7 +335,7 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
|
|||||||
|
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
JButton button = new SelectColorButton(trans.get("ParachuteCfg.but.Reset"));
|
JButton button = new JButton(trans.get("ParachuteCfg.but.Reset"));
|
||||||
button.setToolTipText("ParachuteCfg.but.ResetRadial.ttip");
|
button.setToolTipText("ParachuteCfg.but.ResetRadial.ttip");
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,7 +54,6 @@ import info.openrocket.swing.gui.util.GUIUtil;
|
|||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.IconToggleButton;
|
import info.openrocket.swing.gui.widgets.IconToggleButton;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import info.openrocket.core.database.ComponentPresetDatabase;
|
import info.openrocket.core.database.ComponentPresetDatabase;
|
||||||
import info.openrocket.core.document.OpenRocketDocument;
|
import info.openrocket.core.document.OpenRocketDocument;
|
||||||
@ -161,7 +160,7 @@ public class RocketComponentConfig extends JPanel implements Invalidatable, Inva
|
|||||||
this.add(presetComboBox, "growx 110");
|
this.add(presetComboBox, "growx 110");
|
||||||
order.add(presetComboBox);
|
order.add(presetComboBox);
|
||||||
|
|
||||||
final JButton selectPreset = new SelectColorButton(trans.get("PresetModel.lbl.partsLib"));
|
final JButton selectPreset = new JButton(trans.get("PresetModel.lbl.partsLib"));
|
||||||
selectPreset.setToolTipText(trans.get("PresetModel.lbl.partsLib.ttip"));
|
selectPreset.setToolTipText(trans.get("PresetModel.lbl.partsLib.ttip"));
|
||||||
selectPreset.addActionListener(new ActionListener() {
|
selectPreset.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -290,7 +289,7 @@ public class RocketComponentConfig extends JPanel implements Invalidatable, Inva
|
|||||||
}
|
}
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
this.cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
this.cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
this.cancelButton.setToolTipText(trans.get("RocketCompCfg.btn.Cancel.ttip"));
|
this.cancelButton.setToolTipText(trans.get("RocketCompCfg.btn.Cancel.ttip"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -329,7 +328,7 @@ public class RocketComponentConfig extends JPanel implements Invalidatable, Inva
|
|||||||
buttonPanel.add(cancelButton, "split 2, right, gapleft 30lp");
|
buttonPanel.add(cancelButton, "split 2, right, gapleft 30lp");
|
||||||
|
|
||||||
//// Ok button
|
//// Ok button
|
||||||
this.okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
this.okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
this.okButton.setToolTipText(trans.get("RocketCompCfg.btn.OK.ttip"));
|
this.okButton.setToolTipText(trans.get("RocketCompCfg.btn.OK.ttip"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,6 @@ import info.openrocket.core.rocketcomponent.RocketComponent;
|
|||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
|
|
||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JCheckBox;
|
import javax.swing.JCheckBox;
|
||||||
@ -54,7 +53,7 @@ public class SaveDesignInfoPanel extends RocketConfig {
|
|||||||
buttonPanel.add(dontShowAgain, "gapright 10, growx");
|
buttonPanel.add(dontShowAgain, "gapright 10, growx");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
this.cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
this.cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
this.cancelButton.setToolTipText(trans.get("RocketCompCfg.btn.Cancel.ttip"));
|
this.cancelButton.setToolTipText(trans.get("RocketCompCfg.btn.Cancel.ttip"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -86,7 +85,7 @@ public class SaveDesignInfoPanel extends RocketConfig {
|
|||||||
buttonPanel.add(cancelButton, "split 2, right, gapleft 30lp");
|
buttonPanel.add(cancelButton, "split 2, right, gapleft 30lp");
|
||||||
|
|
||||||
//// Ok button
|
//// Ok button
|
||||||
this.okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
this.okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
this.okButton.setToolTipText(trans.get("RocketCompCfg.btn.OK.ttip"));
|
this.okButton.setToolTipText(trans.get("RocketCompCfg.btn.OK.ttip"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,8 +16,6 @@ import info.openrocket.swing.gui.adaptors.DoubleModel;
|
|||||||
import info.openrocket.swing.gui.components.BasicSlider;
|
import info.openrocket.swing.gui.components.BasicSlider;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
|
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JCheckBox;
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
@ -168,7 +166,7 @@ public class ShockCordConfig extends RocketComponentConfig {
|
|||||||
|
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
JButton button = new SelectColorButton(trans.get("ShockCordCfg.but.Reset"));
|
JButton button = new JButton(trans.get("ShockCordCfg.but.Reset"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -39,7 +39,6 @@ import info.openrocket.swing.gui.components.BasicSlider;
|
|||||||
import info.openrocket.swing.gui.components.HtmlLabel;
|
import info.openrocket.swing.gui.components.HtmlLabel;
|
||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
|
|
||||||
public class StreamerConfig extends RecoveryDeviceConfig {
|
public class StreamerConfig extends RecoveryDeviceConfig {
|
||||||
@ -316,7 +315,7 @@ public class StreamerConfig extends RecoveryDeviceConfig {
|
|||||||
|
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
JButton button = new SelectColorButton(trans.get("StreamerCfg.but.Reset"));
|
JButton button = new JButton(trans.get("StreamerCfg.but.Reset"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -34,7 +34,6 @@ import info.openrocket.core.l10n.Translator;
|
|||||||
import info.openrocket.core.logging.Markers;
|
import info.openrocket.core.logging.Markers;
|
||||||
import info.openrocket.core.simulation.customexpression.CustomExpression;
|
import info.openrocket.core.simulation.customexpression.CustomExpression;
|
||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class CustomExpressionPanel extends JPanel {
|
public class CustomExpressionPanel extends JPanel {
|
||||||
@ -66,7 +65,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
//this.add(desc, "width 1px, growx 1, wrap unrel, wrap");
|
//this.add(desc, "width 1px, growx 1, wrap unrel, wrap");
|
||||||
|
|
||||||
//// New expression
|
//// New expression
|
||||||
JButton button = new SelectColorButton(trans.get("customExpressionPanel.but.NewExpression"));
|
JButton button = new JButton(trans.get("customExpressionPanel.but.NewExpression"));
|
||||||
button.setToolTipText(trans.get("customExpressionPanel.but.ttip.NewExpression"));
|
button.setToolTipText(trans.get("customExpressionPanel.but.ttip.NewExpression"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -81,7 +80,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
this.add(button, "split 4, width :100:200");
|
this.add(button, "split 4, width :100:200");
|
||||||
|
|
||||||
//// Import
|
//// Import
|
||||||
final JButton importButton = new SelectColorButton(trans.get("customExpressionPanel.but.Import"));
|
final JButton importButton = new JButton(trans.get("customExpressionPanel.but.Import"));
|
||||||
importButton.setToolTipText(trans.get("customExpressionPanel.but.ttip.Import"));
|
importButton.setToolTipText(trans.get("customExpressionPanel.but.ttip.Import"));
|
||||||
importButton.addActionListener(new ActionListener() {
|
importButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -120,7 +119,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
this.add(importButton, "width :100:200");
|
this.add(importButton, "width :100:200");
|
||||||
|
|
||||||
//// Close button
|
//// Close button
|
||||||
final JButton closeButton = new SelectColorButton(trans.get("dlg.but.close"));
|
final JButton closeButton = new JButton(trans.get("dlg.but.close"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -215,7 +214,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
//unitSelector = setLabelStyle(unitSelector);
|
//unitSelector = setLabelStyle(unitSelector);
|
||||||
//unitSelector.setBackground(GUIUtil.getUITheme().getBackgroundColor());
|
//unitSelector.setBackground(GUIUtil.getUITheme().getBackgroundColor());
|
||||||
|
|
||||||
JButton editButton = new SelectColorButton(Icons.EDIT_EDIT);
|
JButton editButton = new JButton(Icons.EDIT_EDIT);
|
||||||
editButton.setToolTipText(trans.get("customExpression.Units.but.ttip.Edit"));
|
editButton.setToolTipText(trans.get("customExpression.Units.but.ttip.Edit"));
|
||||||
editButton.setBorderPainted(false);
|
editButton.setBorderPainted(false);
|
||||||
editButton.addActionListener(new ActionListener() {
|
editButton.addActionListener(new ActionListener() {
|
||||||
@ -227,7 +226,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
JButton upButton = new SelectColorButton(Icons.UP);
|
JButton upButton = new JButton(Icons.UP);
|
||||||
upButton.setToolTipText(trans.get("customExpression.Units.but.ttip.MoveUp"));
|
upButton.setToolTipText(trans.get("customExpression.Units.but.ttip.MoveUp"));
|
||||||
upButton.setBorderPainted(false);
|
upButton.setBorderPainted(false);
|
||||||
upButton.setVisible(showUp);
|
upButton.setVisible(showUp);
|
||||||
@ -239,7 +238,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
JButton downButton = new SelectColorButton(Icons.DOWN);
|
JButton downButton = new JButton(Icons.DOWN);
|
||||||
downButton.setToolTipText(trans.get("customExpression.Units.but.ttip.MoveDown"));
|
downButton.setToolTipText(trans.get("customExpression.Units.but.ttip.MoveDown"));
|
||||||
downButton.setBorderPainted(false);
|
downButton.setBorderPainted(false);
|
||||||
downButton.setVisible(showDown);
|
downButton.setVisible(showDown);
|
||||||
@ -252,7 +251,7 @@ public class CustomExpressionPanel extends JPanel {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
JButton deleteButton = new SelectColorButton(Icons.EDIT_DELETE);
|
JButton deleteButton = new JButton(Icons.EDIT_DELETE);
|
||||||
//// Remove this expression
|
//// Remove this expression
|
||||||
deleteButton.setToolTipText(trans.get("customExpression.Units.but.ttip.Delete"));
|
deleteButton.setToolTipText(trans.get("customExpression.Units.but.ttip.Delete"));
|
||||||
deleteButton.setBorderPainted(false);
|
deleteButton.setBorderPainted(false);
|
||||||
|
@ -23,7 +23,6 @@ import info.openrocket.core.startup.Application;
|
|||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -54,7 +53,7 @@ public class ExpressionBuilderDialog extends JDialog {
|
|||||||
private final JLabel nameCheck = new JLabel(RedIcon);
|
private final JLabel nameCheck = new JLabel(RedIcon);
|
||||||
private final JLabel expressionCheck = new JLabel(RedIcon);
|
private final JLabel expressionCheck = new JLabel(RedIcon);
|
||||||
private final JLabel unitCheck = new JLabel(RedIcon);
|
private final JLabel unitCheck = new JLabel(RedIcon);
|
||||||
private final JButton okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
private final JButton okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
private final JTextField expressionField = new JTextField(20);
|
private final JTextField expressionField = new JTextField(20);
|
||||||
|
|
||||||
public ExpressionBuilderDialog(Window parent, OpenRocketDocument doc){
|
public ExpressionBuilderDialog(Window parent, OpenRocketDocument doc){
|
||||||
@ -157,7 +156,7 @@ public class ExpressionBuilderDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
//// Insert variable button
|
//// Insert variable button
|
||||||
final JButton insertVariableButton = new SelectColorButton(trans.get("ExpressionBuilderDialog.InsertVariable"));
|
final JButton insertVariableButton = new JButton(trans.get("ExpressionBuilderDialog.InsertVariable"));
|
||||||
insertVariableButton.addActionListener(new ActionListener() {
|
insertVariableButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -168,7 +167,7 @@ public class ExpressionBuilderDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//// Insert operator button
|
//// Insert operator button
|
||||||
final JButton insertOperatorButton = new SelectColorButton(trans.get("ExpressionBuilderDialog.InsertOperator"));
|
final JButton insertOperatorButton = new JButton(trans.get("ExpressionBuilderDialog.InsertOperator"));
|
||||||
insertOperatorButton.addActionListener(new ActionListener() {
|
insertOperatorButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -192,7 +191,7 @@ public class ExpressionBuilderDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
final JButton cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
final JButton cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -26,7 +26,6 @@ import info.openrocket.core.l10n.Translator;
|
|||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -50,7 +49,7 @@ public class OperatorSelector extends JDialog {
|
|||||||
this.parentWindow = parent;
|
this.parentWindow = parent;
|
||||||
this.parentBuilder = parentBuilder;
|
this.parentBuilder = parentBuilder;
|
||||||
|
|
||||||
final JButton insertButton = new SelectColorButton(trans.get("ExpressionBuilderDialog.InsertOperator"));
|
final JButton insertButton = new JButton(trans.get("ExpressionBuilderDialog.InsertOperator"));
|
||||||
|
|
||||||
JPanel mainPanel = new JPanel(new MigLayout());
|
JPanel mainPanel = new JPanel(new MigLayout());
|
||||||
|
|
||||||
@ -135,7 +134,7 @@ public class OperatorSelector extends JDialog {
|
|||||||
mainPanel.add(scrollPane, "wrap, push, grow");
|
mainPanel.add(scrollPane, "wrap, push, grow");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
final JButton cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
final JButton cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -25,7 +25,6 @@ import info.openrocket.core.l10n.Translator;
|
|||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -52,7 +51,7 @@ public class VariableSelector extends JDialog {
|
|||||||
super(parent, trans.get("CustomVariableSelector.title"), JDialog.ModalityType.DOCUMENT_MODAL);
|
super(parent, trans.get("CustomVariableSelector.title"), JDialog.ModalityType.DOCUMENT_MODAL);
|
||||||
|
|
||||||
this.parentBuilder = parentBuilder;
|
this.parentBuilder = parentBuilder;
|
||||||
final JButton insertButton = new SelectColorButton(trans.get("ExpressionBuilderDialog.InsertVariable"));
|
final JButton insertButton = new JButton(trans.get("ExpressionBuilderDialog.InsertVariable"));
|
||||||
|
|
||||||
JPanel mainPanel = new JPanel(new MigLayout());
|
JPanel mainPanel = new JPanel(new MigLayout());
|
||||||
|
|
||||||
@ -116,7 +115,7 @@ public class VariableSelector extends JDialog {
|
|||||||
mainPanel.add(scrollPane, "wrap, push, grow");
|
mainPanel.add(scrollPane, "wrap, push, grow");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
final JButton cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
final JButton cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -21,7 +21,6 @@ import info.openrocket.core.l10n.Translator;
|
|||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.core.util.BuildProperties;
|
import info.openrocket.core.util.BuildProperties;
|
||||||
import info.openrocket.core.util.Chars;
|
import info.openrocket.core.util.Chars;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class AboutDialog extends JDialog {
|
public class AboutDialog extends JDialog {
|
||||||
@ -158,7 +157,7 @@ public class AboutDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
//Close button
|
//Close button
|
||||||
JButton close = new SelectColorButton(trans.get("button.close"));
|
JButton close = new JButton(trans.get("button.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -37,7 +37,6 @@ import info.openrocket.swing.gui.theme.UITheme;
|
|||||||
import info.openrocket.swing.logging.LogLevelBufferLogger;
|
import info.openrocket.swing.logging.LogLevelBufferLogger;
|
||||||
import info.openrocket.swing.logging.LogLine;
|
import info.openrocket.swing.logging.LogLine;
|
||||||
import info.openrocket.swing.logging.LoggingSystemSetup;
|
import info.openrocket.swing.logging.LoggingSystemSetup;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class BugReportDialog extends JDialog {
|
public class BugReportDialog extends JDialog {
|
||||||
@ -98,7 +97,7 @@ public class BugReportDialog extends JDialog {
|
|||||||
panel.add(new StyledLabel(trans.get("bugreport.lbl.Theinformation"), -1), "wrap para");
|
panel.add(new StyledLabel(trans.get("bugreport.lbl.Theinformation"), -1), "wrap para");
|
||||||
|
|
||||||
////Close button
|
////Close button
|
||||||
JButton close = new SelectColorButton(trans.get("dlg.but.close"));
|
JButton close = new JButton(trans.get("dlg.but.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -71,8 +71,6 @@ import info.openrocket.swing.gui.components.StyledLabel;
|
|||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.scalefigure.RocketPanel;
|
import info.openrocket.swing.gui.scalefigure.RocketPanel;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorToggleButton;
|
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -138,7 +136,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe
|
|||||||
BasicSlider slider = new BasicSlider(theta.getSliderModel(0, 2 * Math.PI));
|
BasicSlider slider = new BasicSlider(theta.getSliderModel(0, 2 * Math.PI));
|
||||||
panel.add(slider, "growx, split 2");
|
panel.add(slider, "growx, split 2");
|
||||||
//// Worst button
|
//// Worst button
|
||||||
worstToggle = new SelectColorToggleButton(trans.get("componentanalysisdlg.ToggleBut.worst"));
|
worstToggle = new JToggleButton(trans.get("componentanalysisdlg.ToggleBut.worst"));
|
||||||
worstToggle.setSelected(true);
|
worstToggle.setSelected(true);
|
||||||
worstToggle.addActionListener(new ActionListener() {
|
worstToggle.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -475,7 +473,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe
|
|||||||
JButton button;
|
JButton button;
|
||||||
|
|
||||||
// TODO: LOW: printing
|
// TODO: LOW: printing
|
||||||
// button = new SelectColorButton("Print");
|
// button = new JButton("Print");
|
||||||
// button.addActionListener(new ActionListener() {
|
// button.addActionListener(new ActionListener() {
|
||||||
// public void actionPerformed(ActionEvent e) {
|
// public void actionPerformed(ActionEvent e) {
|
||||||
// try {
|
// try {
|
||||||
@ -489,9 +487,9 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe
|
|||||||
// });
|
// });
|
||||||
// panel.add(button,"tag ok");
|
// panel.add(button,"tag ok");
|
||||||
|
|
||||||
//button = new SelectColorButton("Close");
|
//button = new JButton("Close");
|
||||||
//Close button
|
//Close button
|
||||||
button = new SelectColorButton(trans.get("dlg.but.close"));
|
button = new JButton(trans.get("dlg.but.close"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -29,7 +29,6 @@ import info.openrocket.swing.gui.adaptors.DoubleModel;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class CustomMaterialDialog extends JDialog {
|
public class CustomMaterialDialog extends JDialog {
|
||||||
@ -151,7 +150,7 @@ public class CustomMaterialDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//// OK button
|
//// OK button
|
||||||
JButton okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
JButton okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
|
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -163,7 +162,7 @@ public class CustomMaterialDialog extends JDialog {
|
|||||||
panel.add(okButton, "span, split, tag ok");
|
panel.add(okButton, "span, split, tag ok");
|
||||||
|
|
||||||
//// Cancel
|
//// Cancel
|
||||||
JButton closeButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton closeButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -60,7 +60,6 @@ import info.openrocket.swing.logging.LogLevelBufferLogger;
|
|||||||
import info.openrocket.swing.logging.LogLine;
|
import info.openrocket.swing.logging.LogLine;
|
||||||
import info.openrocket.swing.logging.LoggingSystemSetup;
|
import info.openrocket.swing.logging.LoggingSystemSetup;
|
||||||
import info.openrocket.swing.logging.StackTraceWriter;
|
import info.openrocket.swing.logging.StackTraceWriter;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class DebugLogDialog extends JDialog {
|
public class DebugLogDialog extends JDialog {
|
||||||
@ -182,7 +181,7 @@ public class DebugLogDialog extends JDialog {
|
|||||||
topPanel.add(followBox, "skip, gapright para, right");
|
topPanel.add(followBox, "skip, gapright para, right");
|
||||||
|
|
||||||
//// Clear button
|
//// Clear button
|
||||||
JButton clear = new SelectColorButton(trans.get("debuglogdlg.but.clear"));
|
JButton clear = new JButton(trans.get("debuglogdlg.but.clear"));
|
||||||
clear.addActionListener(new ActionListener() {
|
clear.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -350,7 +349,7 @@ public class DebugLogDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
//Close button
|
//Close button
|
||||||
JButton close = new SelectColorButton(trans.get("dlg.but.close"));
|
JButton close = new JButton(trans.get("dlg.but.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -24,7 +24,6 @@ import info.openrocket.core.startup.Application;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class EditDecalDialog extends JDialog {
|
public class EditDecalDialog extends JDialog {
|
||||||
@ -67,7 +66,7 @@ public class EditDecalDialog extends JDialog {
|
|||||||
commandText.setEnabled(false);
|
commandText.setEnabled(false);
|
||||||
panel.add(commandText, "growx, wrap");
|
panel.add(commandText, "growx, wrap");
|
||||||
|
|
||||||
final JButton chooser = new SelectColorButton(trans.get("EditDecalDialog.btn.chooser"));
|
final JButton chooser = new JButton(trans.get("EditDecalDialog.btn.chooser"));
|
||||||
chooser.setEnabled(false);
|
chooser.setEnabled(false);
|
||||||
chooser.addActionListener(new ActionListener() {
|
chooser.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ public class EditDecalDialog extends JDialog {
|
|||||||
commandText.setEnabled(true);
|
commandText.setEnabled(true);
|
||||||
panel.add(commandText, "growx, wrap");
|
panel.add(commandText, "growx, wrap");
|
||||||
|
|
||||||
final JButton chooser = new SelectColorButton(trans.get("EditDecalDialog.btn.chooser"));
|
final JButton chooser = new JButton(trans.get("EditDecalDialog.btn.chooser"));
|
||||||
chooser.setEnabled(true);
|
chooser.setEnabled(true);
|
||||||
chooser.addActionListener(new ActionListener() {
|
chooser.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
@ -147,7 +146,7 @@ public class EditDecalDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OK / Cancel buttons
|
// OK / Cancel buttons
|
||||||
JButton okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
JButton okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -157,7 +156,7 @@ public class EditDecalDialog extends JDialog {
|
|||||||
panel.add(okButton, "tag ok, spanx, split");
|
panel.add(okButton, "tag ok, spanx, split");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
JButton cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -20,7 +20,6 @@ import info.openrocket.swing.gui.components.DescriptionArea;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class LicenseDialog extends JDialog {
|
public class LicenseDialog extends JDialog {
|
||||||
private static final Translator trans = Application.getTranslator();
|
private static final Translator trans = Application.getTranslator();
|
||||||
@ -145,7 +144,7 @@ public class LicenseDialog extends JDialog {
|
|||||||
panel.add(info, "newline, width 700lp, height 250lp, pushy, grow, spanx, wrap para");
|
panel.add(info, "newline, width 700lp, height 250lp, pushy, grow, spanx, wrap para");
|
||||||
|
|
||||||
//Close button
|
//Close button
|
||||||
JButton close = new SelectColorButton(trans.get("dlg.but.close"));
|
JButton close = new JButton(trans.get("dlg.but.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -48,7 +48,6 @@ import info.openrocket.swing.gui.print.components.RocketPrintTree;
|
|||||||
import info.openrocket.swing.gui.util.FileHelper;
|
import info.openrocket.swing.gui.util.FileHelper;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class isolates the Swing components used to create a panel that is added to a standard Java print dialog.
|
* This class isolates the Swing components used to create a panel that is added to a standard Java print dialog.
|
||||||
@ -170,7 +169,7 @@ public class PrintDialog extends JDialog implements TreeSelectionListener {
|
|||||||
panel.add(new JPanel(), "pad 0, aligny top, growx");
|
panel.add(new JPanel(), "pad 0, aligny top, growx");
|
||||||
|
|
||||||
|
|
||||||
JButton settingsButton = new SelectColorButton(trans.get("printdlg.but.settings"));
|
JButton settingsButton = new JButton(trans.get("printdlg.but.settings"));
|
||||||
settingsButton.addActionListener(new ActionListener() {
|
settingsButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -184,7 +183,7 @@ public class PrintDialog extends JDialog implements TreeSelectionListener {
|
|||||||
panel.add(settingsButton, "aligny top, wrap para");
|
panel.add(settingsButton, "aligny top, wrap para");
|
||||||
|
|
||||||
|
|
||||||
previewButton = new SelectColorButton(trans.get("but.previewAndPrint"));
|
previewButton = new JButton(trans.get("but.previewAndPrint"));
|
||||||
previewButton.addActionListener(new ActionListener() {
|
previewButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -195,7 +194,7 @@ public class PrintDialog extends JDialog implements TreeSelectionListener {
|
|||||||
panel.add(previewButton, "split, right, gap para");
|
panel.add(previewButton, "split, right, gap para");
|
||||||
|
|
||||||
|
|
||||||
saveAsPDF = new SelectColorButton(trans.get("printdlg.but.saveaspdf"));
|
saveAsPDF = new JButton(trans.get("printdlg.but.saveaspdf"));
|
||||||
saveAsPDF.addActionListener(new ActionListener() {
|
saveAsPDF.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -207,7 +206,7 @@ public class PrintDialog extends JDialog implements TreeSelectionListener {
|
|||||||
panel.add(saveAsPDF, "right, gap para");
|
panel.add(saveAsPDF, "right, gap para");
|
||||||
|
|
||||||
|
|
||||||
cancel = new SelectColorButton(trans.get("button.cancel"));
|
cancel = new JButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -27,7 +27,6 @@ import info.openrocket.swing.gui.print.PaperOrientation;
|
|||||||
import info.openrocket.swing.gui.print.PaperSize;
|
import info.openrocket.swing.gui.print.PaperSize;
|
||||||
import info.openrocket.swing.gui.print.PrintSettings;
|
import info.openrocket.swing.gui.print.PrintSettings;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is a dialog for displaying advanced settings for printing rocket related info.
|
* This class is a dialog for displaying advanced settings for printing rocket related info.
|
||||||
@ -93,7 +92,7 @@ public class PrintSettingsDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
//// Reset
|
//// Reset
|
||||||
JButton button = new SelectColorButton(trans.get("but.Reset"));
|
JButton button = new JButton(trans.get("but.Reset"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -107,7 +106,7 @@ public class PrintSettingsDialog extends JDialog {
|
|||||||
panel.add(button, "spanx, split, right");
|
panel.add(button, "spanx, split, right");
|
||||||
|
|
||||||
//// Close
|
//// Close
|
||||||
JButton closeButton = new SelectColorButton(trans.get("but.Close"));
|
JButton closeButton = new JButton(trans.get("but.Close"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -68,7 +68,6 @@ import info.openrocket.swing.gui.adaptors.DoubleModel;
|
|||||||
import info.openrocket.swing.gui.components.BasicSlider;
|
import info.openrocket.swing.gui.components.BasicSlider;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog that allows scaling the rocket design.
|
* Dialog that allows scaling the rocket design.
|
||||||
@ -476,7 +475,7 @@ public class ScaleDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
// Scale / Accept Buttons
|
// Scale / Accept Buttons
|
||||||
JButton scale = new SelectColorButton(trans.get("button.scale"));
|
JButton scale = new JButton(trans.get("button.scale"));
|
||||||
scale.addActionListener(new ActionListener() {
|
scale.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -495,7 +494,7 @@ public class ScaleDialog extends JDialog {
|
|||||||
panel.add(scale, "span, split, right, gap para");
|
panel.add(scale, "span, split, right, gap para");
|
||||||
|
|
||||||
// Cancel Button
|
// Cancel Button
|
||||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
JButton cancel = new JButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -23,7 +23,6 @@ import info.openrocket.core.startup.Application;
|
|||||||
import info.openrocket.core.util.MathUtil;
|
import info.openrocket.core.util.MathUtil;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,7 +72,7 @@ public class SwingWorkerDialog extends JDialog implements PropertyChangeListener
|
|||||||
panel.add(progressBar, "growx, wrap para");
|
panel.add(progressBar, "growx, wrap para");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
JButton cancel = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton cancel = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -40,7 +40,6 @@ import info.openrocket.swing.gui.util.Icons;
|
|||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.util.URLUtil;
|
import info.openrocket.swing.gui.util.URLUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -133,7 +132,7 @@ public class UpdateInfoDialog extends JDialog {
|
|||||||
|
|
||||||
// Lower row buttons
|
// Lower row buttons
|
||||||
//// Remind me later button
|
//// Remind me later button
|
||||||
JButton btnLater = new SelectColorButton(trans.get("update.dlg.btn.remindMeLater"));
|
JButton btnLater = new JButton(trans.get("update.dlg.btn.remindMeLater"));
|
||||||
btnLater.addActionListener(new ActionListener() {
|
btnLater.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -143,7 +142,7 @@ public class UpdateInfoDialog extends JDialog {
|
|||||||
panel.add(btnLater, "skip 1, split 2");
|
panel.add(btnLater, "skip 1, split 2");
|
||||||
|
|
||||||
//// Skip this version button
|
//// Skip this version button
|
||||||
JButton btnSkip = new SelectColorButton(trans.get("update.dlg.checkbox.skipThisVersion"));
|
JButton btnSkip = new JButton(trans.get("update.dlg.checkbox.skipThisVersion"));
|
||||||
btnSkip.addActionListener(new ActionListener() {
|
btnSkip.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -181,7 +180,7 @@ public class UpdateInfoDialog extends JDialog {
|
|||||||
panel.add(comboBox, "pushx, right");
|
panel.add(comboBox, "pushx, right");
|
||||||
|
|
||||||
//// Install update button
|
//// Install update button
|
||||||
JButton btnInstall = new SelectColorButton(trans.get("update.dlg.updateAvailable.but.install"));
|
JButton btnInstall = new JButton(trans.get("update.dlg.updateAvailable.but.install"));
|
||||||
btnInstall.addActionListener(new ActionListener() {
|
btnInstall.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -5,7 +5,6 @@ import info.openrocket.swing.gui.components.StyledLabel;
|
|||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.util.URLUtil;
|
import info.openrocket.swing.gui.util.URLUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -96,7 +95,7 @@ public class WelcomeDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Close button
|
// Close button
|
||||||
JButton closeBtn = new SelectColorButton(trans.get("button.close"));
|
JButton closeBtn = new JButton(trans.get("button.close"));
|
||||||
closeBtn.setToolTipText(trans.get("welcome.dlg.btn.close.ttip"));
|
closeBtn.setToolTipText(trans.get("welcome.dlg.btn.close.ttip"));
|
||||||
closeBtn.addActionListener(new ActionListener() {
|
closeBtn.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,7 +33,6 @@ import info.openrocket.swing.gui.adaptors.EnumModel;
|
|||||||
import info.openrocket.swing.gui.components.BasicSlider;
|
import info.openrocket.swing.gui.components.BasicSlider;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class DeploymentSelectionDialog extends JDialog {
|
public class DeploymentSelectionDialog extends JDialog {
|
||||||
@ -125,7 +124,7 @@ public class DeploymentSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(new JPanel(), "span, split, growx");
|
panel.add(new JPanel(), "span, split, growx");
|
||||||
|
|
||||||
JButton okButton = new SelectColorButton(trans.get("button.ok"));
|
JButton okButton = new JButton(trans.get("button.ok"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -140,7 +139,7 @@ public class DeploymentSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(okButton, "sizegroup btn");
|
panel.add(okButton, "sizegroup btn");
|
||||||
|
|
||||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
JButton cancel = new JButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -32,7 +32,6 @@ import info.openrocket.swing.gui.SpinnerEditor;
|
|||||||
import info.openrocket.swing.gui.adaptors.DoubleModel;
|
import info.openrocket.swing.gui.adaptors.DoubleModel;
|
||||||
import info.openrocket.swing.gui.adaptors.EnumModel;
|
import info.openrocket.swing.gui.adaptors.EnumModel;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class IgnitionSelectionDialog extends JDialog {
|
public class IgnitionSelectionDialog extends JDialog {
|
||||||
private static final long serialVersionUID = -3399966098520607837L;
|
private static final long serialVersionUID = -3399966098520607837L;
|
||||||
@ -101,7 +100,7 @@ public class IgnitionSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(new JPanel(), "span, split, growx");
|
panel.add(new JPanel(), "span, split, growx");
|
||||||
|
|
||||||
JButton okButton = new SelectColorButton(trans.get("button.ok"));
|
JButton okButton = new JButton(trans.get("button.ok"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -132,7 +131,7 @@ public class IgnitionSelectionDialog extends JDialog {
|
|||||||
panel.add(okButton, "sizegroup btn");
|
panel.add(okButton, "sizegroup btn");
|
||||||
|
|
||||||
|
|
||||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
JButton cancel = new JButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -22,7 +22,6 @@ import info.openrocket.swing.gui.components.StyledLabel;
|
|||||||
import info.openrocket.swing.gui.configdialog.CommonStrings;
|
import info.openrocket.swing.gui.configdialog.CommonStrings;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class RenameConfigDialog extends JDialog {
|
public class RenameConfigDialog extends JDialog {
|
||||||
private static final long serialVersionUID = -5423008694485357248L;
|
private static final long serialVersionUID = -5423008694485357248L;
|
||||||
@ -46,7 +45,7 @@ public class RenameConfigDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(new JPanel(), "growx");
|
panel.add(new JPanel(), "growx");
|
||||||
|
|
||||||
JButton okButton = new SelectColorButton(trans.get("button.ok"));
|
JButton okButton = new JButton(trans.get("button.ok"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -57,7 +56,7 @@ public class RenameConfigDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
panel.add(okButton);
|
panel.add(okButton);
|
||||||
|
|
||||||
JButton resetToDefaultButton = new SelectColorButton(trans.get("RenameConfigDialog.but.reset"));
|
JButton resetToDefaultButton = new JButton(trans.get("RenameConfigDialog.but.reset"));
|
||||||
resetToDefaultButton.addActionListener(new ActionListener() {
|
resetToDefaultButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -67,7 +66,7 @@ public class RenameConfigDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
panel.add(resetToDefaultButton);
|
panel.add(resetToDefaultButton);
|
||||||
|
|
||||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
JButton cancel = new JButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -33,7 +33,6 @@ import info.openrocket.swing.gui.adaptors.EnumModel;
|
|||||||
import info.openrocket.swing.gui.components.BasicSlider;
|
import info.openrocket.swing.gui.components.BasicSlider;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class SeparationSelectionDialog extends JDialog {
|
public class SeparationSelectionDialog extends JDialog {
|
||||||
@ -129,7 +128,7 @@ public class SeparationSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(new JPanel(), "span, split, growx");
|
panel.add(new JPanel(), "span, split, growx");
|
||||||
|
|
||||||
JButton okButton = new SelectColorButton(trans.get("button.ok"));
|
JButton okButton = new JButton(trans.get("button.ok"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -148,7 +147,7 @@ public class SeparationSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(okButton, "sizegroup btn");
|
panel.add(okButton, "sizegroup btn");
|
||||||
|
|
||||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
JButton cancel = new JButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -22,7 +22,6 @@ import info.openrocket.core.motor.Motor;
|
|||||||
import info.openrocket.core.rocketcomponent.FlightConfigurationId;
|
import info.openrocket.core.rocketcomponent.FlightConfigurationId;
|
||||||
import info.openrocket.core.rocketcomponent.MotorMount;
|
import info.openrocket.core.rocketcomponent.MotorMount;
|
||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class MotorChooserDialog extends JDialog implements CloseableDialog {
|
public class MotorChooserDialog extends JDialog implements CloseableDialog {
|
||||||
@ -51,7 +50,7 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog {
|
|||||||
|
|
||||||
|
|
||||||
// OK / Cancel buttons
|
// OK / Cancel buttons
|
||||||
JButton okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
JButton okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -61,7 +60,7 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog {
|
|||||||
panel.add(okButton, "tag ok, spanx, split");
|
panel.add(okButton, "tag ok, spanx, split");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
JButton cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -39,7 +39,6 @@ import info.openrocket.core.rocketcomponent.RocketComponent;
|
|||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.core.unit.Unit;
|
import info.openrocket.core.unit.Unit;
|
||||||
import info.openrocket.core.unit.UnitGroup;
|
import info.openrocket.core.unit.UnitGroup;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public abstract class MotorFilterPanel extends JPanel {
|
public abstract class MotorFilterPanel extends JPanel {
|
||||||
private static final long serialVersionUID = -2068101000195158181L;
|
private static final long serialVersionUID = -2068101000195158181L;
|
||||||
@ -184,7 +183,7 @@ public abstract class MotorFilterPanel extends JPanel {
|
|||||||
JScrollPane scrollPane = new JScrollPane(manufacturerCheckList.getList());
|
JScrollPane scrollPane = new JScrollPane(manufacturerCheckList.getList());
|
||||||
sub.add(scrollPane, "grow, pushy, wrap");
|
sub.add(scrollPane, "grow, pushy, wrap");
|
||||||
|
|
||||||
JButton clearMotors = new SelectColorButton(trans.get("TCMotorSelPan.btn.checkNone"));
|
JButton clearMotors = new JButton(trans.get("TCMotorSelPan.btn.checkNone"));
|
||||||
clearMotors.addActionListener( new ActionListener() {
|
clearMotors.addActionListener( new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -195,7 +194,7 @@ public abstract class MotorFilterPanel extends JPanel {
|
|||||||
|
|
||||||
sub.add(clearMotors,"split 2");
|
sub.add(clearMotors,"split 2");
|
||||||
|
|
||||||
JButton selectMotors = new SelectColorButton(trans.get("TCMotorSelPan.btn.checkAll"));
|
JButton selectMotors = new JButton(trans.get("TCMotorSelPan.btn.checkAll"));
|
||||||
selectMotors.addActionListener( new ActionListener() {
|
selectMotors.addActionListener( new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -19,7 +19,6 @@ import info.openrocket.core.unit.UnitGroup;
|
|||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.jfree.chart.ChartFactory;
|
import org.jfree.chart.ChartFactory;
|
||||||
import org.jfree.chart.ChartPanel;
|
import org.jfree.chart.ChartPanel;
|
||||||
@ -108,7 +107,7 @@ public class ThrustCurveMotorPlotDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
// Close button
|
// Close button
|
||||||
JButton close = new SelectColorButton(trans.get("dlg.but.close"));
|
JButton close = new JButton(trans.get("dlg.but.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -103,9 +103,7 @@ import info.openrocket.swing.gui.scalefigure.RocketFigure;
|
|||||||
import info.openrocket.swing.gui.scalefigure.ScaleScrollPane;
|
import info.openrocket.swing.gui.scalefigure.ScaleScrollPane;
|
||||||
import info.openrocket.swing.gui.util.FileHelper;
|
import info.openrocket.swing.gui.util.FileHelper;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorToggleButton;
|
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General rocket optimization dialog.
|
* General rocket optimization dialog.
|
||||||
@ -266,7 +264,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
// // Add/remove buttons
|
// // Add/remove buttons
|
||||||
sub = new JPanel(new MigLayout("fill"));
|
sub = new JPanel(new MigLayout("fill"));
|
||||||
|
|
||||||
addButton = new SelectColorButton(Chars.LEFT_ARROW + " " + trans.get("btn.add") + " ");
|
addButton = new JButton(Chars.LEFT_ARROW + " " + trans.get("btn.add") + " ");
|
||||||
addButton.setToolTipText(trans.get("btn.add.ttip"));
|
addButton.setToolTipText(trans.get("btn.add.ttip"));
|
||||||
addButton.addActionListener(e -> {
|
addButton.addActionListener(e -> {
|
||||||
List<SimulationModifier> mods = getSelectedAvailableModifiers();
|
List<SimulationModifier> mods = getSelectedAvailableModifiers();
|
||||||
@ -283,7 +281,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
disableComponents.add(addButton);
|
disableComponents.add(addButton);
|
||||||
sub.add(addButton, "wrap para, sg button");
|
sub.add(addButton, "wrap para, sg button");
|
||||||
|
|
||||||
removeButton = new SelectColorButton(" " + trans.get("btn.delete") + " " + Chars.RIGHT_ARROW);
|
removeButton = new JButton(" " + trans.get("btn.delete") + " " + Chars.RIGHT_ARROW);
|
||||||
removeButton.setToolTipText(trans.get("btn.delete.ttip"));
|
removeButton.setToolTipText(trans.get("btn.delete.ttip"));
|
||||||
removeButton.addActionListener(e -> {
|
removeButton.addActionListener(e -> {
|
||||||
List<SimulationModifier> mods = getSelectedModifiers();
|
List<SimulationModifier> mods = getSelectedModifiers();
|
||||||
@ -302,7 +300,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
disableComponents.add(removeButton);
|
disableComponents.add(removeButton);
|
||||||
sub.add(removeButton, "wrap para*2, sg button");
|
sub.add(removeButton, "wrap para*2, sg button");
|
||||||
|
|
||||||
removeAllButton = new SelectColorButton(trans.get("btn.deleteAll"));
|
removeAllButton = new JButton(trans.get("btn.deleteAll"));
|
||||||
removeAllButton.setToolTipText(trans.get("btn.deleteAll.ttip"));
|
removeAllButton.setToolTipText(trans.get("btn.deleteAll.ttip"));
|
||||||
removeAllButton.addActionListener(new ActionListener() {
|
removeAllButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -540,7 +538,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
|
|
||||||
// // Start/Stop button
|
// // Start/Stop button
|
||||||
|
|
||||||
startButton = new SelectColorToggleButton(START_TEXT);
|
startButton = new JToggleButton(START_TEXT);
|
||||||
startButton.addActionListener(e -> {
|
startButton.addActionListener(e -> {
|
||||||
if (updating) {
|
if (updating) {
|
||||||
log.debug("Updating, ignoring event");
|
log.debug("Updating, ignoring event");
|
||||||
@ -556,7 +554,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
sub.add(startButton, "span, growx, wrap para*2");
|
sub.add(startButton, "span, growx, wrap para*2");
|
||||||
|
|
||||||
plotButton = new SelectColorButton(trans.get("btn.plotPath"));
|
plotButton = new JButton(trans.get("btn.plotPath"));
|
||||||
plotButton.setToolTipText(trans.get("btn.plotPath.ttip"));
|
plotButton.setToolTipText(trans.get("btn.plotPath.ttip"));
|
||||||
plotButton.addActionListener(e -> {
|
plotButton.addActionListener(e -> {
|
||||||
log.info(Markers.USER_MARKER, "Plotting optimization path, dimensionality=" + selectedModifiers.size());
|
log.info(Markers.USER_MARKER, "Plotting optimization path, dimensionality=" + selectedModifiers.size());
|
||||||
@ -573,7 +571,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
disableComponents.add(plotButton);
|
disableComponents.add(plotButton);
|
||||||
sub.add(plotButton, "span, growx, wrap");
|
sub.add(plotButton, "span, growx, wrap");
|
||||||
|
|
||||||
saveButton = new SelectColorButton(trans.get("btn.save"));
|
saveButton = new JButton(trans.get("btn.save"));
|
||||||
saveButton.setToolTipText(trans.get("btn.save.ttip"));
|
saveButton.setToolTipText(trans.get("btn.save.ttip"));
|
||||||
saveButton.addActionListener(e -> {
|
saveButton.addActionListener(e -> {
|
||||||
log.info(Markers.USER_MARKER, "User selected save path");
|
log.info(Markers.USER_MARKER, "User selected save path");
|
||||||
@ -585,7 +583,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
panel.add(sub, "wrap para*2");
|
panel.add(sub, "wrap para*2");
|
||||||
|
|
||||||
// // Bottom buttons
|
// // Bottom buttons
|
||||||
final JButton applyButton = new SelectColorButton(trans.get("btn.apply"));
|
final JButton applyButton = new JButton(trans.get("btn.apply"));
|
||||||
applyButton.setToolTipText(trans.get("btn.apply.ttip"));
|
applyButton.setToolTipText(trans.get("btn.apply.ttip"));
|
||||||
applyButton.addActionListener(e -> {
|
applyButton.addActionListener(e -> {
|
||||||
log.info(Markers.USER_MARKER, "Applying optimization changes");
|
log.info(Markers.USER_MARKER, "Applying optimization changes");
|
||||||
@ -594,7 +592,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
disableComponents.add(applyButton);
|
disableComponents.add(applyButton);
|
||||||
panel.add(applyButton, "span, split, gapright para, right");
|
panel.add(applyButton, "span, split, gapright para, right");
|
||||||
|
|
||||||
final JButton resetButton = new SelectColorButton(trans.get("btn.reset"));
|
final JButton resetButton = new JButton(trans.get("btn.reset"));
|
||||||
resetButton.setToolTipText(trans.get("btn.reset.ttip"));
|
resetButton.setToolTipText(trans.get("btn.reset.ttip"));
|
||||||
resetButton.addActionListener(e -> {
|
resetButton.addActionListener(e -> {
|
||||||
log.info(Markers.USER_MARKER, "Resetting optimization design");
|
log.info(Markers.USER_MARKER, "Resetting optimization design");
|
||||||
@ -603,7 +601,7 @@ public class GeneralOptimizationDialog extends JDialog {
|
|||||||
disableComponents.add(resetButton);
|
disableComponents.add(resetButton);
|
||||||
panel.add(resetButton, "gapright para, right");
|
panel.add(resetButton, "gapright para, right");
|
||||||
|
|
||||||
final JButton closeButton = new SelectColorButton(trans.get("btn.close"));
|
final JButton closeButton = new JButton(trans.get("btn.close"));
|
||||||
closeButton.setToolTipText(trans.get("btn.close.ttip"));
|
closeButton.setToolTipText(trans.get("btn.close.ttip"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,7 +30,6 @@ import info.openrocket.core.util.MathUtil;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.jfree.chart.ChartFactory;
|
import org.jfree.chart.ChartFactory;
|
||||||
import org.jfree.chart.ChartPanel;
|
import org.jfree.chart.ChartPanel;
|
||||||
@ -111,7 +110,7 @@ public class OptimizationPlotDialog extends JDialog {
|
|||||||
panel.add(label, "");
|
panel.add(label, "");
|
||||||
|
|
||||||
|
|
||||||
JButton close = new SelectColorButton(trans.get("button.close"));
|
JButton close = new JButton(trans.get("button.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -54,7 +54,6 @@ import info.openrocket.swing.gui.util.SwingPreferences;
|
|||||||
import info.openrocket.swing.gui.util.PreferencesExporter;
|
import info.openrocket.swing.gui.util.PreferencesExporter;
|
||||||
import info.openrocket.swing.gui.util.PreferencesImporter;
|
import info.openrocket.swing.gui.util.PreferencesImporter;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class GeneralPreferencesPanel extends PreferencesPanel {
|
public class GeneralPreferencesPanel extends PreferencesPanel {
|
||||||
@ -193,7 +192,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
this.add(field, "w 100px, gapright unrel, spanx, growx, split");
|
this.add(field, "w 100px, gapright unrel, spanx, growx, split");
|
||||||
|
|
||||||
//// Add button
|
//// Add button
|
||||||
JButton button = new SelectColorButton(trans.get("pref.dlg.but.add"));
|
JButton button = new JButton(trans.get("pref.dlg.but.add"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -236,7 +235,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
this.add(button, "gapright unrel");
|
this.add(button, "gapright unrel");
|
||||||
|
|
||||||
//// Reset button
|
//// Reset button
|
||||||
button = new SelectColorButton(trans.get("pref.dlg.but.reset"));
|
button = new JButton(trans.get("pref.dlg.but.reset"));
|
||||||
|
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -270,7 +269,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
this.add(softwareUpdateBox);
|
this.add(softwareUpdateBox);
|
||||||
|
|
||||||
//// Check now button
|
//// Check now button
|
||||||
button = new SelectColorButton(trans.get("pref.dlg.but.checknow"));
|
button = new JButton(trans.get("pref.dlg.but.checknow"));
|
||||||
//// Check for software updates now
|
//// Check for software updates now
|
||||||
button.setToolTipText(trans.get("pref.dlg.ttip.Checkupdatesnow"));
|
button.setToolTipText(trans.get("pref.dlg.ttip.Checkupdatesnow"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@ -341,7 +340,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
JPanel buttonPanel = new JPanel(new MigLayout("fillx, ins 0"));
|
JPanel buttonPanel = new JPanel(new MigLayout("fillx, ins 0"));
|
||||||
|
|
||||||
//// Import preferences
|
//// Import preferences
|
||||||
final JButton importPreferences = new SelectColorButton(trans.get("pref.dlg.but.importPreferences"));
|
final JButton importPreferences = new JButton(trans.get("pref.dlg.but.importPreferences"));
|
||||||
importPreferences.setToolTipText(trans.get("pref.dlg.but.importPreferences.ttip"));
|
importPreferences.setToolTipText(trans.get("pref.dlg.but.importPreferences.ttip"));
|
||||||
importPreferences.addActionListener(new ActionListener() {
|
importPreferences.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -368,7 +367,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
buttonPanel.add(importPreferences);
|
buttonPanel.add(importPreferences);
|
||||||
|
|
||||||
//// Export preferences
|
//// Export preferences
|
||||||
final JButton exportPreferences = new SelectColorButton(trans.get("pref.dlg.but.exportPreferences"));
|
final JButton exportPreferences = new JButton(trans.get("pref.dlg.but.exportPreferences"));
|
||||||
exportPreferences.setToolTipText(trans.get("pref.dlg.but.exportPreferences.ttip"));
|
exportPreferences.setToolTipText(trans.get("pref.dlg.but.exportPreferences.ttip"));
|
||||||
exportPreferences.addActionListener(new ActionListener() {
|
exportPreferences.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -379,7 +378,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
buttonPanel.add(exportPreferences);
|
buttonPanel.add(exportPreferences);
|
||||||
|
|
||||||
//// Reset all preferences
|
//// Reset all preferences
|
||||||
final JButton resetAllPreferences = new SelectColorButton(trans.get("pref.dlg.but.resetAllPreferences"));
|
final JButton resetAllPreferences = new JButton(trans.get("pref.dlg.but.resetAllPreferences"));
|
||||||
resetAllPreferences.setToolTipText(trans.get("pref.dlg.but.resetAllPreferences.ttip"));
|
resetAllPreferences.setToolTipText(trans.get("pref.dlg.but.resetAllPreferences.ttip"));
|
||||||
resetAllPreferences.addActionListener(new ActionListener() {
|
resetAllPreferences.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -424,7 +423,7 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
panel.add(bar, "growx, wrap para");
|
panel.add(bar, "growx, wrap para");
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
JButton cancel = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton cancel = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -34,7 +34,6 @@ import info.openrocket.swing.gui.components.StyledLabel;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import com.itextpdf.text.Font;
|
import com.itextpdf.text.Font;
|
||||||
|
|
||||||
@ -111,7 +110,7 @@ public class GraphicsPreferencesPanel extends PreferencesPanel {
|
|||||||
});
|
});
|
||||||
add(commandText, "growx, wrap");
|
add(commandText, "growx, wrap");
|
||||||
|
|
||||||
final JButton chooser = new SelectColorButton(trans.get("EditDecalDialog.btn.chooser"));
|
final JButton chooser = new JButton(trans.get("EditDecalDialog.btn.chooser"));
|
||||||
chooser.setEnabled(commandLineIsSelected);
|
chooser.setEnabled(commandLineIsSelected);
|
||||||
chooser.addActionListener(new ActionListener() {
|
chooser.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ import info.openrocket.swing.gui.adaptors.ColumnTableModel;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
||||||
import info.openrocket.swing.gui.dialogs.CustomMaterialDialog;
|
import info.openrocket.swing.gui.dialogs.CustomMaterialDialog;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class MaterialEditPanel extends JPanel {
|
public class MaterialEditPanel extends JPanel {
|
||||||
@ -149,7 +148,7 @@ public class MaterialEditPanel extends JPanel {
|
|||||||
|
|
||||||
|
|
||||||
//// New button
|
//// New button
|
||||||
addButton = new SelectColorButton(trans.get("matedtpan.but.new"));
|
addButton = new JButton(trans.get("matedtpan.but.new"));
|
||||||
//// Add a new material
|
//// Add a new material
|
||||||
addButton.setToolTipText(trans.get("matedtpan.col.but.ttip.New"));
|
addButton.setToolTipText(trans.get("matedtpan.col.but.ttip.New"));
|
||||||
addButton.addActionListener(new ActionListener() {
|
addButton.addActionListener(new ActionListener() {
|
||||||
@ -173,7 +172,7 @@ public class MaterialEditPanel extends JPanel {
|
|||||||
this.add(addButton, "gap rel rel para para, split 3, growx 1");
|
this.add(addButton, "gap rel rel para para, split 3, growx 1");
|
||||||
|
|
||||||
//// Edit button
|
//// Edit button
|
||||||
editButton = new SelectColorButton(trans.get("matedtpan.but.edit"));
|
editButton = new JButton(trans.get("matedtpan.but.edit"));
|
||||||
//// Edit an existing material
|
//// Edit an existing material
|
||||||
editButton.setToolTipText(trans.get("matedtpan.but.ttip.edit"));
|
editButton.setToolTipText(trans.get("matedtpan.but.ttip.edit"));
|
||||||
editButton.addActionListener(new ActionListener() {
|
editButton.addActionListener(new ActionListener() {
|
||||||
@ -244,7 +243,7 @@ public class MaterialEditPanel extends JPanel {
|
|||||||
this.add(editButton, "gap rel rel para para, growx 1");
|
this.add(editButton, "gap rel rel para para, growx 1");
|
||||||
|
|
||||||
//// Delete button
|
//// Delete button
|
||||||
deleteButton = new SelectColorButton(trans.get("matedtpan.but.delete"));
|
deleteButton = new JButton(trans.get("matedtpan.but.delete"));
|
||||||
//// Delete a user-defined material
|
//// Delete a user-defined material
|
||||||
deleteButton.setToolTipText(trans.get("matedtpan.but.ttip.delete"));
|
deleteButton.setToolTipText(trans.get("matedtpan.but.ttip.delete"));
|
||||||
deleteButton.addActionListener(new ActionListener() {
|
deleteButton.addActionListener(new ActionListener() {
|
||||||
@ -265,7 +264,7 @@ public class MaterialEditPanel extends JPanel {
|
|||||||
this.add(deleteButton, "gap rel rel para para, growx 1, wrap unrel");
|
this.add(deleteButton, "gap rel rel para para, growx 1, wrap unrel");
|
||||||
|
|
||||||
//// Revert all button
|
//// Revert all button
|
||||||
revertButton = new SelectColorButton(trans.get("matedtpan.but.revertall"));
|
revertButton = new JButton(trans.get("matedtpan.but.revertall"));
|
||||||
//// Delete all user-defined materials
|
//// Delete all user-defined materials
|
||||||
revertButton.setToolTipText(trans.get("matedtpan.but.ttip.revertall"));
|
revertButton.setToolTipText(trans.get("matedtpan.but.ttip.revertall"));
|
||||||
revertButton.addActionListener(new ActionListener() {
|
revertButton.addActionListener(new ActionListener() {
|
||||||
|
@ -29,7 +29,6 @@ import info.openrocket.swing.gui.util.PreferencesImporter;
|
|||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.core.l10n.Translator;
|
import info.openrocket.core.l10n.Translator;
|
||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -98,7 +97,7 @@ public class PreferencesDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
JButton cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancelButton.setToolTipText(trans.get("SimulationConfigDialog.btn.Cancel.ttip"));
|
cancelButton.setToolTipText(trans.get("SimulationConfigDialog.btn.Cancel.ttip"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -121,7 +120,7 @@ public class PreferencesDialog extends JDialog {
|
|||||||
panel.add(cancelButton, "span, split 2, right, tag cancel");
|
panel.add(cancelButton, "span, split 2, right, tag cancel");
|
||||||
|
|
||||||
//// Ok button
|
//// Ok button
|
||||||
JButton okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
JButton okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
okButton.setToolTipText(trans.get("SimulationConfigDialog.btn.OK.ttip"));
|
okButton.setToolTipText(trans.get("SimulationConfigDialog.btn.OK.ttip"));
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,7 +23,6 @@ import info.openrocket.swing.gui.theme.UITheme;
|
|||||||
import info.openrocket.core.simulation.RK4SimulationStepper;
|
import info.openrocket.core.simulation.RK4SimulationStepper;
|
||||||
import info.openrocket.core.unit.UnitGroup;
|
import info.openrocket.core.unit.UnitGroup;
|
||||||
import info.openrocket.core.util.GeodeticComputationStrategy;
|
import info.openrocket.core.util.GeodeticComputationStrategy;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class SimulationPreferencesPanel extends PreferencesPanel {
|
public class SimulationPreferencesPanel extends PreferencesPanel {
|
||||||
private static final long serialVersionUID = 7983195730016979888L;
|
private static final long serialVersionUID = 7983195730016979888L;
|
||||||
@ -170,7 +169,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel {
|
|||||||
sub.add(subsub, "spanx, wrap para");
|
sub.add(subsub, "spanx, wrap para");
|
||||||
|
|
||||||
// Reset to default button
|
// Reset to default button
|
||||||
JButton button = new SelectColorButton(trans.get("simedtdlg.but.resettodefault"));
|
JButton button = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
||||||
// Reset the time step to its default value (
|
// Reset the time step to its default value (
|
||||||
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
||||||
+ UnitGroup.UNITS_SHORT_TIME
|
+ UnitGroup.UNITS_SHORT_TIME
|
||||||
|
@ -17,7 +17,6 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
||||||
import info.openrocket.core.unit.UnitGroup;
|
import info.openrocket.core.unit.UnitGroup;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class UnitsPreferencesPanel extends PreferencesPanel {
|
public class UnitsPreferencesPanel extends PreferencesPanel {
|
||||||
|
|
||||||
@ -176,7 +175,7 @@ public class UnitsPreferencesPanel extends PreferencesPanel {
|
|||||||
|
|
||||||
|
|
||||||
//// Default metric button
|
//// Default metric button
|
||||||
JButton button = new SelectColorButton(trans.get("pref.dlg.but.defaultmetric"));
|
JButton button = new JButton(trans.get("pref.dlg.but.defaultmetric"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -188,7 +187,7 @@ public class UnitsPreferencesPanel extends PreferencesPanel {
|
|||||||
this.add(button, "spanx, split 2, grow");
|
this.add(button, "spanx, split 2, grow");
|
||||||
|
|
||||||
//// Default imperial button
|
//// Default imperial button
|
||||||
button = new SelectColorButton(trans.get("pref.dlg.but.defaultimperial"));
|
button = new JButton(trans.get("pref.dlg.but.defaultimperial"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -46,7 +46,6 @@ import info.openrocket.swing.gui.components.StyledLabel;
|
|||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.util.TableUIPreferences;
|
import info.openrocket.swing.gui.util.TableUIPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
import info.openrocket.swing.utils.TableRowTraversalPolicy;
|
import info.openrocket.swing.utils.TableRowTraversalPolicy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -208,7 +207,7 @@ public class ComponentPresetChooserDialog extends JDialog {
|
|||||||
panel.add(alwaysOpenPreset, "spanx 2");
|
panel.add(alwaysOpenPreset, "spanx 2");
|
||||||
|
|
||||||
// Close buttons
|
// Close buttons
|
||||||
JButton closeButton = new SelectColorButton(trans.get("dlg.but.close"));
|
JButton closeButton = new JButton(trans.get("dlg.but.close"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -49,7 +49,6 @@ import info.openrocket.core.startup.Application;
|
|||||||
import info.openrocket.core.unit.UnitGroup;
|
import info.openrocket.core.unit.UnitGroup;
|
||||||
import info.openrocket.core.util.ORColor;
|
import info.openrocket.core.util.ORColor;
|
||||||
import info.openrocket.core.util.StateChangeListener;
|
import info.openrocket.core.util.StateChangeListener;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class PhotoSettingsConfig extends JTabbedPane {
|
public class PhotoSettingsConfig extends JTabbedPane {
|
||||||
@ -133,16 +132,16 @@ public class PhotoSettingsConfig extends JTabbedPane {
|
|||||||
|
|
||||||
setPreferredSize(new Dimension(240, 320));
|
setPreferredSize(new Dimension(240, 320));
|
||||||
|
|
||||||
final JButton sunLightColorButton = new SelectColorButton();
|
final JButton sunLightColorButton = new JButton();
|
||||||
sunLightColorButton.setMaximumSize(new Dimension(35, 25));
|
sunLightColorButton.setMaximumSize(new Dimension(35, 25));
|
||||||
|
|
||||||
final JButton skyColorButton = new SelectColorButton();
|
final JButton skyColorButton = new JButton();
|
||||||
skyColorButton.setMaximumSize(new Dimension(35, 25));
|
skyColorButton.setMaximumSize(new Dimension(35, 25));
|
||||||
|
|
||||||
final JButton smokeColorButton = new SelectColorButton();
|
final JButton smokeColorButton = new JButton();
|
||||||
smokeColorButton.setMaximumSize(new Dimension(35, 25));
|
smokeColorButton.setMaximumSize(new Dimension(35, 25));
|
||||||
|
|
||||||
final JButton flameColorButton = new SelectColorButton();
|
final JButton flameColorButton = new JButton();
|
||||||
flameColorButton.setMaximumSize(new Dimension(35, 25));
|
flameColorButton.setMaximumSize(new Dimension(35, 25));
|
||||||
|
|
||||||
p.addChangeListener(new StateChangeListener() {
|
p.addChangeListener(new StateChangeListener() {
|
||||||
|
@ -31,7 +31,6 @@ import info.openrocket.swing.gui.components.StyledLabel;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
import info.openrocket.swing.gui.components.StyledLabel.Style;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class GuidedTourSelectionDialog extends JDialog {
|
public class GuidedTourSelectionDialog extends JDialog {
|
||||||
private static final long serialVersionUID = -3643116444821710259L;
|
private static final long serialVersionUID = -3643116444821710259L;
|
||||||
@ -95,7 +94,7 @@ public class GuidedTourSelectionDialog extends JDialog {
|
|||||||
tourLength = new StyledLabel(-1);
|
tourLength = new StyledLabel(-1);
|
||||||
sub.add(tourLength, "wrap unrel");
|
sub.add(tourLength, "wrap unrel");
|
||||||
|
|
||||||
JButton start = new SelectColorButton(trans.get("btn.start"));
|
JButton start = new JButton(trans.get("btn.start"));
|
||||||
start.setIcon(Icons.HELP_TOURS);
|
start.setIcon(Icons.HELP_TOURS);
|
||||||
start.addActionListener(new ActionListener() {
|
start.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -109,7 +108,7 @@ public class GuidedTourSelectionDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
JButton close = new SelectColorButton(trans.get("button.close"));
|
JButton close = new JButton(trans.get("button.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -25,7 +25,6 @@ import info.openrocket.core.util.Chars;
|
|||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class SlideShowDialog extends JDialog {
|
public class SlideShowDialog extends JDialog {
|
||||||
@ -54,7 +53,7 @@ public class SlideShowDialog extends JDialog {
|
|||||||
|
|
||||||
JPanel sub = new JPanel(new MigLayout("ins 0, fill"));
|
JPanel sub = new JPanel(new MigLayout("ins 0, fill"));
|
||||||
|
|
||||||
prevButton = new SelectColorButton(Chars.LEFT_ARROW + " " + trans.get("btn.prev"));
|
prevButton = new JButton(Chars.LEFT_ARROW + " " + trans.get("btn.prev"));
|
||||||
prevButton.addActionListener(new ActionListener() {
|
prevButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -66,7 +65,7 @@ public class SlideShowDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
nextButton = new SelectColorButton(trans.get("btn.next") + " " + Chars.RIGHT_ARROW);
|
nextButton = new JButton(trans.get("btn.next") + " " + Chars.RIGHT_ARROW);
|
||||||
nextButton.addActionListener(new ActionListener() {
|
nextButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -81,7 +80,7 @@ public class SlideShowDialog extends JDialog {
|
|||||||
|
|
||||||
panel.add(sub, "pushx, center");
|
panel.add(sub, "pushx, center");
|
||||||
|
|
||||||
closeButton = new SelectColorButton(trans.get("button.close"));
|
closeButton = new JButton(trans.get("button.close"));
|
||||||
closeButton.addActionListener(new ActionListener() {
|
closeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -47,7 +47,6 @@ import info.openrocket.swing.gui.dialogs.flightconfiguration.IgnitionSelectionDi
|
|||||||
import info.openrocket.swing.gui.dialogs.flightconfiguration.MotorMountConfigurationPanel;
|
import info.openrocket.swing.gui.dialogs.flightconfiguration.MotorMountConfigurationPanel;
|
||||||
import info.openrocket.swing.gui.dialogs.motor.MotorChooserDialog;
|
import info.openrocket.swing.gui.dialogs.motor.MotorChooserDialog;
|
||||||
import info.openrocket.swing.gui.main.FlightConfigurationPanel;
|
import info.openrocket.swing.gui.main.FlightConfigurationPanel;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount> {
|
public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount> {
|
||||||
@ -118,19 +117,19 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
|||||||
configurationPanel.add(scroll, "spanx, grow, pushy, wrap");
|
configurationPanel.add(scroll, "spanx, grow, pushy, wrap");
|
||||||
|
|
||||||
//// Select motor
|
//// Select motor
|
||||||
selectMotorButton = new SelectColorButton(selectMotorAction);
|
selectMotorButton = new JButton(selectMotorAction);
|
||||||
configurationPanel.add(selectMotorButton, "split, align right, sizegroup button");
|
configurationPanel.add(selectMotorButton, "split, align right, sizegroup button");
|
||||||
|
|
||||||
//// Delete motor button
|
//// Delete motor button
|
||||||
deleteMotorButton = new SelectColorButton(deleteMotorAction);
|
deleteMotorButton = new JButton(deleteMotorAction);
|
||||||
configurationPanel.add(deleteMotorButton, "sizegroup button");
|
configurationPanel.add(deleteMotorButton, "sizegroup button");
|
||||||
|
|
||||||
//// Select Ignition button
|
//// Select Ignition button
|
||||||
selectIgnitionButton = new SelectColorButton(selectIgnitionAction);
|
selectIgnitionButton = new JButton(selectIgnitionAction);
|
||||||
configurationPanel.add(selectIgnitionButton, "sizegroup button, gapleft para");
|
configurationPanel.add(selectIgnitionButton, "sizegroup button, gapleft para");
|
||||||
|
|
||||||
//// Reset Ignition button
|
//// Reset Ignition button
|
||||||
resetIgnitionButton = new SelectColorButton(resetIgnitionAction);
|
resetIgnitionButton = new JButton(resetIgnitionAction);
|
||||||
configurationPanel.add(resetIgnitionButton, "sizegroup button, wrap");
|
configurationPanel.add(resetIgnitionButton, "sizegroup button, wrap");
|
||||||
|
|
||||||
cards.add(configurationPanel, TABLE_LABEL );
|
cards.add(configurationPanel, TABLE_LABEL );
|
||||||
|
@ -36,7 +36,6 @@ import info.openrocket.core.unit.UnitGroup;
|
|||||||
|
|
||||||
import info.openrocket.swing.gui.dialogs.flightconfiguration.DeploymentSelectionDialog;
|
import info.openrocket.swing.gui.dialogs.flightconfiguration.DeploymentSelectionDialog;
|
||||||
import info.openrocket.swing.gui.main.FlightConfigurationPanel;
|
import info.openrocket.swing.gui.main.FlightConfigurationPanel;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class RecoveryConfigurationPanel extends FlightConfigurablePanel<RecoveryDevice> {
|
public class RecoveryConfigurationPanel extends FlightConfigurablePanel<RecoveryDevice> {
|
||||||
|
|
||||||
@ -72,12 +71,12 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel<Recovery
|
|||||||
popupMenuFull.add(duplicateConfigAction);
|
popupMenuFull.add(duplicateConfigAction);
|
||||||
|
|
||||||
//// Select deployment
|
//// Select deployment
|
||||||
selectDeploymentButton = new SelectColorButton(selectDeploymentAction);
|
selectDeploymentButton = new JButton(selectDeploymentAction);
|
||||||
selectDeploymentButton.setEnabled(false);
|
selectDeploymentButton.setEnabled(false);
|
||||||
this.add(selectDeploymentButton, "split, align right, sizegroup button");
|
this.add(selectDeploymentButton, "split, align right, sizegroup button");
|
||||||
|
|
||||||
//// Reset deployment
|
//// Reset deployment
|
||||||
resetDeploymentButton = new SelectColorButton(resetDeploymentAction);
|
resetDeploymentButton = new JButton(resetDeploymentAction);
|
||||||
resetDeploymentButton.setEnabled(false);
|
resetDeploymentButton.setEnabled(false);
|
||||||
this.add(resetDeploymentButton, "sizegroup button, wrap");
|
this.add(resetDeploymentButton, "sizegroup button, wrap");
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@ import info.openrocket.core.unit.UnitGroup;
|
|||||||
|
|
||||||
import info.openrocket.swing.gui.dialogs.flightconfiguration.SeparationSelectionDialog;
|
import info.openrocket.swing.gui.dialogs.flightconfiguration.SeparationSelectionDialog;
|
||||||
import info.openrocket.swing.gui.main.FlightConfigurationPanel;
|
import info.openrocket.swing.gui.main.FlightConfigurationPanel;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialStage> {
|
public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialStage> {
|
||||||
private static final long serialVersionUID = -1556652925279847316L;
|
private static final long serialVersionUID = -1556652925279847316L;
|
||||||
@ -71,12 +70,12 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialS
|
|||||||
popupMenuFull.add(duplicateConfigAction);
|
popupMenuFull.add(duplicateConfigAction);
|
||||||
|
|
||||||
//// Select separation
|
//// Select separation
|
||||||
selectSeparationButton = new SelectColorButton(selectSeparationAction);
|
selectSeparationButton = new JButton(selectSeparationAction);
|
||||||
selectSeparationButton.setEnabled(false);
|
selectSeparationButton.setEnabled(false);
|
||||||
this.add(selectSeparationButton, "split, align right, sizegroup button");
|
this.add(selectSeparationButton, "split, align right, sizegroup button");
|
||||||
|
|
||||||
//// Reset separation
|
//// Reset separation
|
||||||
resetDeploymentButton = new SelectColorButton(resetSeparationAction);
|
resetDeploymentButton = new JButton(resetSeparationAction);
|
||||||
resetDeploymentButton.setEnabled(false);
|
resetDeploymentButton.setEnabled(false);
|
||||||
this.add(resetDeploymentButton, "sizegroup button, wrap");
|
this.add(resetDeploymentButton, "sizegroup button, wrap");
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ import info.openrocket.swing.gui.util.Icons;
|
|||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.SaveFileChooser;
|
import info.openrocket.swing.gui.widgets.SaveFileChooser;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.jfree.chart.ChartPanel;
|
import org.jfree.chart.ChartPanel;
|
||||||
import org.jfree.chart.ChartUtils;
|
import org.jfree.chart.ChartUtils;
|
||||||
@ -135,7 +134,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//// Zoom in button
|
//// Zoom in button
|
||||||
JButton button = new SelectColorButton(Icons.ZOOM_IN);
|
JButton button = new JButton(Icons.ZOOM_IN);
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -150,7 +149,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
panel.add(button, "gapleft rel");
|
panel.add(button, "gapleft rel");
|
||||||
|
|
||||||
//// Reset Zoom button.
|
//// Reset Zoom button.
|
||||||
button = new SelectColorButton(Icons.ZOOM_RESET);
|
button = new JButton(Icons.ZOOM_RESET);
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -161,7 +160,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
|
|
||||||
|
|
||||||
//// Zoom out button
|
//// Zoom out button
|
||||||
button = new SelectColorButton(Icons.ZOOM_OUT);
|
button = new JButton(Icons.ZOOM_OUT);
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -175,7 +174,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
panel.add(button, "gapleft rel");
|
panel.add(button, "gapleft rel");
|
||||||
|
|
||||||
//// Print chart button
|
//// Print chart button
|
||||||
button = new SelectColorButton(trans.get("PlotDialog.btn.exportImage"));
|
button = new JButton(trans.get("PlotDialog.btn.exportImage"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -185,7 +184,7 @@ public class SimulationPlotDialog extends JDialog {
|
|||||||
panel.add(button, "gapleft rel");
|
panel.add(button, "gapleft rel");
|
||||||
|
|
||||||
//// Close button
|
//// Close button
|
||||||
button = new SelectColorButton(trans.get("dlg.but.close"));
|
button = new JButton(trans.get("dlg.but.close"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -18,8 +18,6 @@ import java.awt.event.ActionListener;
|
|||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
|
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ButtonColumn class provides a renderer and an editor that looks like a
|
* The ButtonColumn class provides a renderer and an editor that looks like a
|
||||||
* JButton. The renderer and editor will then be used for a specified column
|
* JButton. The renderer and editor will then be used for a specified column
|
||||||
@ -63,8 +61,8 @@ public class ButtonColumn extends AbstractCellEditor
|
|||||||
this.table = table;
|
this.table = table;
|
||||||
this.action = action;
|
this.action = action;
|
||||||
|
|
||||||
renderButton = new SelectColorButton();
|
renderButton = new JButton();
|
||||||
editButton = new SelectColorButton();
|
editButton = new JButton();
|
||||||
editButton.setFocusPainted( false );
|
editButton.setFocusPainted( false );
|
||||||
editButton.addActionListener( this );
|
editButton.addActionListener( this );
|
||||||
originalBorder = editButton.getBorder();
|
originalBorder = editButton.getBorder();
|
||||||
|
@ -65,7 +65,6 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import info.openrocket.swing.gui.SpinnerEditor;
|
import info.openrocket.swing.gui.SpinnerEditor;
|
||||||
import info.openrocket.swing.gui.adaptors.DoubleModel;
|
import info.openrocket.swing.gui.adaptors.DoubleModel;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preset editor for creating new preset components.
|
* Preset editor for creating new preset components.
|
||||||
@ -376,7 +375,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
ncPanel.add(panel, "cell 4 3, span 1 3");
|
ncPanel.add(panel, "cell 4 3, span 1 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
ncImageBtn = new SelectColorButton("No Image");
|
ncImageBtn = new JButton("No Image");
|
||||||
ncImageBtn.setMaximumSize(new Dimension(75, 75));
|
ncImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
ncImageBtn.setMinimumSize(new Dimension(75, 75));
|
ncImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(ncImageBtn);
|
panel.add(ncImageBtn);
|
||||||
@ -503,7 +502,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
trPanel.add(panel, "cell 4 6");
|
trPanel.add(panel, "cell 4 6");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
trImageBtn = new SelectColorButton("No Image");
|
trImageBtn = new JButton("No Image");
|
||||||
trImageBtn.setMaximumSize(new Dimension(75, 75));
|
trImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
trImageBtn.setMinimumSize(new Dimension(75, 75));
|
trImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(trImageBtn);
|
panel.add(trImageBtn);
|
||||||
@ -581,7 +580,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
btPanel.add(panel, "cell 4 3");
|
btPanel.add(panel, "cell 4 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
btImageBtn = new SelectColorButton("No Image");
|
btImageBtn = new JButton("No Image");
|
||||||
btImageBtn.setMaximumSize(new Dimension(75, 75));
|
btImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
btImageBtn.setMinimumSize(new Dimension(75, 75));
|
btImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(btImageBtn);
|
panel.add(btImageBtn);
|
||||||
@ -659,7 +658,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
tcPanel.add(panel, "cell 4 3");
|
tcPanel.add(panel, "cell 4 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
tcImageBtn = new SelectColorButton("No Image");
|
tcImageBtn = new JButton("No Image");
|
||||||
tcImageBtn.setMaximumSize(new Dimension(75, 75));
|
tcImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
tcImageBtn.setMinimumSize(new Dimension(75, 75));
|
tcImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(tcImageBtn);
|
panel.add(tcImageBtn);
|
||||||
@ -730,7 +729,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
bhPanel.add(panel, "cell 4 2");
|
bhPanel.add(panel, "cell 4 2");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
bhImageBtn = new SelectColorButton("No Image");
|
bhImageBtn = new JButton("No Image");
|
||||||
bhImageBtn.setMaximumSize(new Dimension(75, 75));
|
bhImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
bhImageBtn.setMinimumSize(new Dimension(75, 75));
|
bhImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(bhImageBtn);
|
panel.add(bhImageBtn);
|
||||||
@ -809,7 +808,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
crPanel.add(panel, "cell 4 3");
|
crPanel.add(panel, "cell 4 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
crImageBtn = new SelectColorButton("No Image");
|
crImageBtn = new JButton("No Image");
|
||||||
crImageBtn.setMaximumSize(new Dimension(75, 75));
|
crImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
crImageBtn.setMinimumSize(new Dimension(75, 75));
|
crImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(crImageBtn);
|
panel.add(crImageBtn);
|
||||||
@ -887,7 +886,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
ebPanel.add(panel, "cell 4 3");
|
ebPanel.add(panel, "cell 4 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
ebImageBtn = new SelectColorButton("No Image");
|
ebImageBtn = new JButton("No Image");
|
||||||
ebImageBtn.setMaximumSize(new Dimension(75, 75));
|
ebImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
ebImageBtn.setMinimumSize(new Dimension(75, 75));
|
ebImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(ebImageBtn);
|
panel.add(ebImageBtn);
|
||||||
@ -965,7 +964,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
llPanel.add(panel, "cell 4 3");
|
llPanel.add(panel, "cell 4 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
llImageBtn = new SelectColorButton("No Image");
|
llImageBtn = new JButton("No Image");
|
||||||
llImageBtn.setMaximumSize(new Dimension(75, 75));
|
llImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
llImageBtn.setMinimumSize(new Dimension(75, 75));
|
llImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(llImageBtn);
|
panel.add(llImageBtn);
|
||||||
@ -1062,7 +1061,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
rbPanel.add(panel, "cell 4 4");
|
rbPanel.add(panel, "cell 4 4");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
rbImageBtn = new SelectColorButton("No Image");
|
rbImageBtn = new JButton("No Image");
|
||||||
rbImageBtn.setMaximumSize(new Dimension(75, 75));
|
rbImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
rbImageBtn.setMinimumSize(new Dimension(75, 75));
|
rbImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(rbImageBtn);
|
panel.add(rbImageBtn);
|
||||||
@ -1140,7 +1139,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
stPanel.add(panel, "cell 4 3");
|
stPanel.add(panel, "cell 4 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
stImageBtn = new SelectColorButton("No Image");
|
stImageBtn = new JButton("No Image");
|
||||||
stImageBtn.setMaximumSize(new Dimension(75, 75));
|
stImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
stImageBtn.setMinimumSize(new Dimension(75, 75));
|
stImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(stImageBtn);
|
panel.add(stImageBtn);
|
||||||
@ -1232,7 +1231,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
panel.setMinimumSize(new Dimension(200, 200));
|
panel.setMinimumSize(new Dimension(200, 200));
|
||||||
pcPanel.add(panel, "cell 1 3, span 1 3");
|
pcPanel.add(panel, "cell 1 3, span 1 3");
|
||||||
panel.setLayout(null);
|
panel.setLayout(null);
|
||||||
pcImageBtn = new SelectColorButton("No Image");
|
pcImageBtn = new JButton("No Image");
|
||||||
pcImageBtn.setMaximumSize(new Dimension(75, 75));
|
pcImageBtn.setMaximumSize(new Dimension(75, 75));
|
||||||
pcImageBtn.setMinimumSize(new Dimension(75, 75));
|
pcImageBtn.setMinimumSize(new Dimension(75, 75));
|
||||||
panel.add(pcImageBtn);
|
panel.add(pcImageBtn);
|
||||||
@ -1255,7 +1254,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
JPanel buttonPane = new JPanel();
|
JPanel buttonPane = new JPanel();
|
||||||
getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
||||||
buttonPane.setLayout(new MigLayout("", "[130px][176.00px][131.00px]", "[29px]"));
|
buttonPane.setLayout(new MigLayout("", "[130px][176.00px][131.00px]", "[29px]"));
|
||||||
JButton btnSaveAndNew = new SelectColorButton("Save and New");
|
JButton btnSaveAndNew = new JButton("Save and New");
|
||||||
btnSaveAndNew.addMouseListener(new MouseAdapter() {
|
btnSaveAndNew.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent arg0) {
|
public void mouseClicked(MouseEvent arg0) {
|
||||||
@ -1264,7 +1263,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
});
|
});
|
||||||
buttonPane.add(btnSaveAndNew, "cell 0 0,alignx left,aligny top");
|
buttonPane.add(btnSaveAndNew, "cell 0 0,alignx left,aligny top");
|
||||||
|
|
||||||
JButton okButton = new SelectColorButton("Save and Close");
|
JButton okButton = new JButton("Save and Close");
|
||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
@ -1277,7 +1276,7 @@ public class PresetEditorDialog extends JDialog implements ItemListener {
|
|||||||
buttonPane.add(okButton, "cell 1 0,alignx left,aligny top");
|
buttonPane.add(okButton, "cell 1 0,alignx left,aligny top");
|
||||||
getRootPane().setDefaultButton(okButton);
|
getRootPane().setDefaultButton(okButton);
|
||||||
|
|
||||||
JButton cancelButton = new SelectColorButton("Close");
|
JButton cancelButton = new JButton("Close");
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
|
@ -34,7 +34,6 @@ import info.openrocket.swing.gui.adaptors.BooleanModel;
|
|||||||
import info.openrocket.swing.gui.adaptors.DoubleModel;
|
import info.openrocket.swing.gui.adaptors.DoubleModel;
|
||||||
import info.openrocket.swing.gui.components.BasicSlider;
|
import info.openrocket.swing.gui.components.BasicSlider;
|
||||||
import info.openrocket.swing.gui.components.UnitSelector;
|
import info.openrocket.swing.gui.components.UnitSelector;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class SimulationConditionsPanel extends JPanel {
|
public class SimulationConditionsPanel extends JPanel {
|
||||||
private static final Translator trans = Application.getTranslator();
|
private static final Translator trans = Application.getTranslator();
|
||||||
@ -49,7 +48,7 @@ public class SimulationConditionsPanel extends JPanel {
|
|||||||
addSimulationConditionsPanel(this, conditions);
|
addSimulationConditionsPanel(this, conditions);
|
||||||
|
|
||||||
|
|
||||||
JButton restoreDefaults = new SelectColorButton(trans.get("simedtdlg.but.resettodefault"));
|
JButton restoreDefaults = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
||||||
restoreDefaults.addActionListener(new ActionListener() {
|
restoreDefaults.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -64,7 +63,7 @@ public class SimulationConditionsPanel extends JPanel {
|
|||||||
});
|
});
|
||||||
this.add(restoreDefaults, "span, split 3, skip, gapbottom para, gapright para, right");
|
this.add(restoreDefaults, "span, split 3, skip, gapbottom para, gapright para, right");
|
||||||
|
|
||||||
JButton saveDefaults = new SelectColorButton(trans.get("simedtdlg.but.savedefault"));
|
JButton saveDefaults = new JButton(trans.get("simedtdlg.but.savedefault"));
|
||||||
saveDefaults.addActionListener(new ActionListener() {
|
saveDefaults.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,6 @@ import info.openrocket.swing.gui.components.ConfigurationComboBox;
|
|||||||
import info.openrocket.swing.gui.components.StyledLabel;
|
import info.openrocket.swing.gui.components.StyledLabel;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
import info.openrocket.core.l10n.Translator;
|
import info.openrocket.core.l10n.Translator;
|
||||||
import info.openrocket.core.rocketcomponent.FlightConfiguration;
|
import info.openrocket.core.rocketcomponent.FlightConfiguration;
|
||||||
import info.openrocket.core.rocketcomponent.FlightConfigurationId;
|
import info.openrocket.core.rocketcomponent.FlightConfigurationId;
|
||||||
@ -314,7 +313,7 @@ public class SimulationConfigDialog extends JDialog {
|
|||||||
|
|
||||||
//// Run simulation button
|
//// Run simulation button
|
||||||
// TODO: disable when sim is up to date?
|
// TODO: disable when sim is up to date?
|
||||||
/*JButton button = new SelectColorButton(trans.get("SimulationEditDialog.btn.simulateAndPlot"));
|
/*JButton button = new JButton(trans.get("SimulationEditDialog.btn.simulateAndPlot"));
|
||||||
if (!isSingleEdit()) {
|
if (!isSingleEdit()) {
|
||||||
button.setText(trans.get("SimulationEditDialog.btn.simulate"));
|
button.setText(trans.get("SimulationEditDialog.btn.simulate"));
|
||||||
}
|
}
|
||||||
@ -332,7 +331,7 @@ public class SimulationConfigDialog extends JDialog {
|
|||||||
simEditPanel.add(button, "align right, gapright 10lp, tag ok");*/
|
simEditPanel.add(button, "align right, gapright 10lp, tag ok");*/
|
||||||
|
|
||||||
//// Cancel button
|
//// Cancel button
|
||||||
this.cancelButton = new SelectColorButton(trans.get("dlg.but.cancel"));
|
this.cancelButton = new JButton(trans.get("dlg.but.cancel"));
|
||||||
this.cancelButton.setToolTipText(trans.get("SimulationConfigDialog.btn.Cancel.ttip"));
|
this.cancelButton.setToolTipText(trans.get("SimulationConfigDialog.btn.Cancel.ttip"));
|
||||||
this.cancelButton.addActionListener(new ActionListener() {
|
this.cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -350,7 +349,7 @@ public class SimulationConfigDialog extends JDialog {
|
|||||||
bottomPanel.add(this.cancelButton, "split 2, tag ok");
|
bottomPanel.add(this.cancelButton, "split 2, tag ok");
|
||||||
|
|
||||||
//// Ok button
|
//// Ok button
|
||||||
this.okButton = new SelectColorButton(trans.get("dlg.but.ok"));
|
this.okButton = new JButton(trans.get("dlg.but.ok"));
|
||||||
this.okButton.setToolTipText(trans.get("SimulationConfigDialog.btn.OK.ttip"));
|
this.okButton.setToolTipText(trans.get("SimulationConfigDialog.btn.OK.ttip"));
|
||||||
this.okButton.addActionListener(new ActionListener() {
|
this.okButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,7 +41,6 @@ import info.openrocket.swing.gui.util.GUIUtil;
|
|||||||
import info.openrocket.swing.gui.util.SaveCSVWorker;
|
import info.openrocket.swing.gui.util.SaveCSVWorker;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SaveFileChooser;
|
import info.openrocket.swing.gui.widgets.SaveFileChooser;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class SimulationExportPanel extends JPanel {
|
public class SimulationExportPanel extends JPanel {
|
||||||
|
|
||||||
@ -143,7 +142,7 @@ public class SimulationExportPanel extends JPanel {
|
|||||||
panel.add(new JScrollPane(table), "wmin 300lp, width 300lp, height 1, grow 100, wrap");
|
panel.add(new JScrollPane(table), "wmin 300lp, width 300lp, height 1, grow 100, wrap");
|
||||||
|
|
||||||
// Select all/none buttons
|
// Select all/none buttons
|
||||||
button = new SelectColorButton(trans.get("SimExpPan.but.Selectall"));
|
button = new JButton(trans.get("SimExpPan.but.Selectall"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -152,7 +151,7 @@ public class SimulationExportPanel extends JPanel {
|
|||||||
});
|
});
|
||||||
panel.add(button, "split 2, growx 1, sizegroup selectbutton");
|
panel.add(button, "split 2, growx 1, sizegroup selectbutton");
|
||||||
|
|
||||||
button = new SelectColorButton(trans.get("SimExpPan.but.Selectnone"));
|
button = new JButton(trans.get("SimExpPan.but.Selectnone"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -208,7 +207,7 @@ public class SimulationExportPanel extends JPanel {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
// Export button
|
// Export button
|
||||||
button = new SelectColorButton(trans.get("SimExpPan.but.Exporttofile"));
|
button = new JButton(trans.get("SimExpPan.but.Exporttofile"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -48,7 +48,6 @@ import info.openrocket.swing.gui.util.GUIUtil;
|
|||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.simulation.extension.SwingSimulationExtensionConfigurator;
|
import info.openrocket.swing.simulation.extension.SwingSimulationExtensionConfigurator;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
||||||
|
|
||||||
@ -171,7 +170,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
sub.add(subsub, "spanx, wrap para");
|
sub.add(subsub, "spanx, wrap para");
|
||||||
|
|
||||||
// Reset to default button
|
// Reset to default button
|
||||||
JButton button = new SelectColorButton(trans.get("simedtdlg.but.resettodefault"));
|
JButton button = new JButton(trans.get("simedtdlg.but.resettodefault"));
|
||||||
// Reset the time step to its default value (
|
// Reset the time step to its default value (
|
||||||
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault")
|
||||||
+ UnitGroup.UNITS_SHORT_TIME
|
+ UnitGroup.UNITS_SHORT_TIME
|
||||||
@ -205,7 +204,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
sub.add(desc, "aligny 0, hmin 100lp, growx, wrap para");
|
sub.add(desc, "aligny 0, hmin 100lp, growx, wrap para");
|
||||||
|
|
||||||
|
|
||||||
final JButton addExtension = new SelectColorButton(trans.get("simedtdlg.SimExt.add"));
|
final JButton addExtension = new JButton(trans.get("simedtdlg.SimExt.add"));
|
||||||
extensionMenu = getExtensionMenu();
|
extensionMenu = getExtensionMenu();
|
||||||
addExtension.addActionListener(new ActionListener() {
|
addExtension.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent ev) {
|
public void actionPerformed(ActionEvent ev) {
|
||||||
@ -383,7 +382,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
|
|
||||||
// Configure
|
// Configure
|
||||||
if (findConfigurator(extension) != null) {
|
if (findConfigurator(extension) != null) {
|
||||||
button = new SelectColorButton(Icons.CONFIGURE);
|
button = new JButton(Icons.CONFIGURE);
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -397,7 +396,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
|
|
||||||
// Help
|
// Help
|
||||||
if (extension.getDescription() != null) {
|
if (extension.getDescription() != null) {
|
||||||
button = new SelectColorButton(Icons.HELP);
|
button = new JButton(Icons.HELP);
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -406,7 +405,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
JPanel panel = new JPanel(new MigLayout("fill"));
|
JPanel panel = new JPanel(new MigLayout("fill"));
|
||||||
DescriptionArea area = new DescriptionArea(extension.getDescription(), 10, 0);
|
DescriptionArea area = new DescriptionArea(extension.getDescription(), 10, 0);
|
||||||
panel.add(area, "width 400lp, wrap para");
|
panel.add(area, "width 400lp, wrap para");
|
||||||
JButton close = new SelectColorButton(trans.get("button.close"));
|
JButton close = new JButton(trans.get("button.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -424,7 +423,7 @@ class SimulationOptionsPanel extends JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
button = new SelectColorButton(Icons.EDIT_DELETE);
|
button = new JButton(Icons.EDIT_DELETE);
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent arg0) {
|
public void actionPerformed(ActionEvent arg0) {
|
||||||
|
@ -45,7 +45,6 @@ import info.openrocket.swing.gui.util.GUIUtil;
|
|||||||
import info.openrocket.swing.gui.util.Icons;
|
import info.openrocket.swing.gui.util.Icons;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
import info.openrocket.swing.gui.theme.UITheme;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Panel that displays the simulation plot options to the user.
|
* Panel that displays the simulation plot options to the user.
|
||||||
@ -252,7 +251,7 @@ public class SimulationPlotPanel extends JPanel {
|
|||||||
|
|
||||||
|
|
||||||
//// All + None buttons
|
//// All + None buttons
|
||||||
JButton button = new SelectColorButton(trans.get("simplotpanel.but.All"));
|
JButton button = new JButton(trans.get("simplotpanel.but.All"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -264,7 +263,7 @@ public class SimulationPlotPanel extends JPanel {
|
|||||||
this.add(button, "split 2, gapleft para, gapright para, growx, sizegroup buttons");
|
this.add(button, "split 2, gapleft para, gapright para, growx, sizegroup buttons");
|
||||||
|
|
||||||
//// None
|
//// None
|
||||||
button = new SelectColorButton(trans.get("simplotpanel.but.None"));
|
button = new JButton(trans.get("simplotpanel.but.None"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -314,7 +313,7 @@ public class SimulationPlotPanel extends JPanel {
|
|||||||
|
|
||||||
|
|
||||||
//// New Y axis plot type
|
//// New Y axis plot type
|
||||||
button = new SelectColorButton(trans.get("simplotpanel.but.NewYaxisplottype"));
|
button = new JButton(trans.get("simplotpanel.but.NewYaxisplottype"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -367,7 +366,7 @@ public class SimulationPlotPanel extends JPanel {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
//// Plot flight
|
//// Plot flight
|
||||||
button = new SelectColorButton(trans.get("simplotpanel.but.Plotflight"));
|
button = new JButton(trans.get("simplotpanel.but.Plotflight"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -551,7 +550,7 @@ public class SimulationPlotPanel extends JPanel {
|
|||||||
this.add(axisSelector);
|
this.add(axisSelector);
|
||||||
|
|
||||||
|
|
||||||
JButton button = new SelectColorButton(Icons.EDIT_DELETE);
|
JButton button = new JButton(Icons.EDIT_DELETE);
|
||||||
//// Remove this plot
|
//// Remove this plot
|
||||||
button.setToolTipText(trans.get("simplotpanel.but.ttip.Deletethisplot"));
|
button.setToolTipText(trans.get("simplotpanel.but.ttip.Deletethisplot"));
|
||||||
button.setBorderPainted(false);
|
button.setBorderPainted(false);
|
||||||
|
@ -52,7 +52,6 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import info.openrocket.swing.gui.dialogs.DetailDialog;
|
import info.openrocket.swing.gui.dialogs.DetailDialog;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.swing.gui.util.SwingPreferences;
|
import info.openrocket.swing.gui.util.SwingPreferences;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
public class SimulationRunDialog extends JDialog {
|
public class SimulationRunDialog extends JDialog {
|
||||||
private static final long serialVersionUID = -1593459321777026455L;
|
private static final long serialVersionUID = -1593459321777026455L;
|
||||||
@ -163,7 +162,7 @@ public class SimulationRunDialog extends JDialog {
|
|||||||
panel.add(progressBar, "spanx, growx, wrap para");
|
panel.add(progressBar, "spanx, growx, wrap para");
|
||||||
|
|
||||||
// Add cancel button
|
// Add cancel button
|
||||||
JButton cancel = new SelectColorButton(trans.get("dlg.but.cancel"));
|
JButton cancel = new JButton(trans.get("dlg.but.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -4,13 +4,14 @@ import info.openrocket.swing.gui.util.Icons;
|
|||||||
|
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button specifically for displaying an icon.
|
* Button specifically for displaying an icon.
|
||||||
*
|
*
|
||||||
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
||||||
*/
|
*/
|
||||||
public class IconButton extends SelectColorButton {
|
public class IconButton extends JButton {
|
||||||
private static final int ICON_GAP = 10;
|
private static final int ICON_GAP = 10;
|
||||||
private static final double ICON_SCALE = 0.9;
|
private static final double ICON_SCALE = 0.9;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import info.openrocket.swing.gui.util.Icons;
|
|||||||
|
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
import javax.swing.JToggleButton;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
|
||||||
@ -16,7 +17,7 @@ import java.awt.Insets;
|
|||||||
*
|
*
|
||||||
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
||||||
*/
|
*/
|
||||||
public class IconToggleButton extends SelectColorToggleButton {
|
public class IconToggleButton extends JToggleButton {
|
||||||
private double ICON_SCALE = 1;
|
private double ICON_SCALE = 1;
|
||||||
|
|
||||||
public IconToggleButton(Action a) {
|
public IconToggleButton(Action a) {
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
package info.openrocket.swing.gui.widgets;
|
|
||||||
|
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
|
||||||
|
|
||||||
import javax.swing.Action;
|
|
||||||
import javax.swing.Icon;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.UIManager;
|
|
||||||
import javax.swing.event.ChangeEvent;
|
|
||||||
import javax.swing.event.ChangeListener;
|
|
||||||
import java.awt.event.FocusAdapter;
|
|
||||||
import java.awt.event.FocusEvent;
|
|
||||||
|
|
||||||
public class SelectColorButton extends JButton {
|
|
||||||
|
|
||||||
public SelectColorButton() {
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorButton(Icon icon) {
|
|
||||||
super(icon);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorButton(String text) {
|
|
||||||
super(text);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorButton(Action a) {
|
|
||||||
super(a);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorButton(String text, Icon icon) {
|
|
||||||
super(text, icon);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addChangeListenerSelectColor() {
|
|
||||||
if ((GUIUtil.getUITheme() != UITheme.Themes.LIGHT) ||
|
|
||||||
(UIManager.getColor("Button.selectForeground") == null) ||
|
|
||||||
(UIManager.getColor("Button.foreground") == null))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Fixes the issue of the background of the button not being blue when selected on macOS
|
|
||||||
putClientProperty("JButton.buttonType", "segmented-only");
|
|
||||||
|
|
||||||
addChangeListener(new ChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void stateChanged(ChangeEvent e) {
|
|
||||||
if (getModel().isArmed()) {
|
|
||||||
setForeground(UIManager.getColor("Button.selectForeground"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setForeground(UIManager.getColor("Button.foreground"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Need to add this, otherwise the foreground can remain in the selectForeground state when the button is clicked
|
|
||||||
addFocusListener(new FocusAdapter() {
|
|
||||||
@Override
|
|
||||||
public void focusLost(FocusEvent e) {
|
|
||||||
setForeground(UIManager.getColor("Button.foreground"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,101 +0,0 @@
|
|||||||
package info.openrocket.swing.gui.widgets;
|
|
||||||
|
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
|
||||||
import info.openrocket.swing.gui.theme.UITheme;
|
|
||||||
|
|
||||||
import javax.swing.JToggleButton;
|
|
||||||
import javax.swing.Action;
|
|
||||||
import javax.swing.Icon;
|
|
||||||
import javax.swing.UIManager;
|
|
||||||
import java.beans.PropertyChangeEvent;
|
|
||||||
import java.beans.PropertyChangeListener;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class is a replacement for the standard JToggleButton. Its purpose is to be able
|
|
||||||
* to control the foreground color for when the button is (de)selected.
|
|
||||||
*
|
|
||||||
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
|
||||||
*/
|
|
||||||
public class SelectColorToggleButton extends JToggleButton {
|
|
||||||
|
|
||||||
public SelectColorToggleButton(Action a) {
|
|
||||||
super(a);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton(String text) {
|
|
||||||
super(text);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton() {
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton(Icon icon) {
|
|
||||||
super(icon);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton(Icon icon, boolean selected) {
|
|
||||||
super(icon, selected);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton(String text, boolean selected) {
|
|
||||||
super(text, selected);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton(String text, Icon icon) {
|
|
||||||
super(text, icon);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectColorToggleButton(String text, Icon icon, boolean selected) {
|
|
||||||
super(text, icon, selected);
|
|
||||||
addChangeListenerSelectColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method sets the foreground color of the button. If the button is selected, then the selectForeground is used.
|
|
||||||
* If the frame that the button is in goes out of focus or if the button is unselected, then the foreground is used.
|
|
||||||
*
|
|
||||||
* This is to fix an issue on OSX devices where the foreground color would be black on blue (hardly readable)
|
|
||||||
*/
|
|
||||||
private void addChangeListenerSelectColor() {
|
|
||||||
if ((GUIUtil.getUITheme() != UITheme.Themes.LIGHT) ||
|
|
||||||
(UIManager.getColor("ToggleButton.selectForeground") == null) ||
|
|
||||||
(UIManager.getColor("ToggleButton.foreground") == null))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Fixes the issue of the background of the button not being blue when selected on macOS
|
|
||||||
putClientProperty("JButton.buttonType", "segmented-only");
|
|
||||||
|
|
||||||
// Case: frame goes out of focus
|
|
||||||
addPropertyChangeListener("Frame.active", new PropertyChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
|
||||||
if (isSelected() && (boolean)evt.getNewValue()) {
|
|
||||||
setForeground(UIManager.getColor("ToggleButton.selectForeground"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setForeground(UIManager.getColor("ToggleButton.foreground"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Case: button is clicked
|
|
||||||
addPropertyChangeListener("ancestor", new PropertyChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
|
||||||
if (isSelected()) {
|
|
||||||
setForeground(UIManager.getColor("ToggleButton.selectForeground"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setForeground(UIManager.getColor("ToggleButton.foreground"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,7 +17,6 @@ import net.miginfocom.swing.MigLayout;
|
|||||||
import info.openrocket.core.document.Simulation;
|
import info.openrocket.core.document.Simulation;
|
||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.core.l10n.Translator;
|
import info.openrocket.core.l10n.Translator;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
@ -49,7 +48,7 @@ public abstract class AbstractSwingSimulationExtensionConfigurator<E extends Sim
|
|||||||
|
|
||||||
panel.add(getConfigurationComponent((E) extension, simulation, sub), "grow, wrap para");
|
panel.add(getConfigurationComponent((E) extension, simulation, sub), "grow, wrap para");
|
||||||
|
|
||||||
JButton close = new SelectColorButton(trans.get("button.close"));
|
JButton close = new JButton(trans.get("button.close"));
|
||||||
close.addActionListener(new ActionListener() {
|
close.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -23,7 +23,6 @@ import info.openrocket.swing.gui.components.StyledLabel.Style;
|
|||||||
import info.openrocket.swing.gui.util.GUIUtil;
|
import info.openrocket.swing.gui.util.GUIUtil;
|
||||||
import info.openrocket.core.plugin.Plugin;
|
import info.openrocket.core.plugin.Plugin;
|
||||||
import info.openrocket.swing.simulation.extension.AbstractSwingSimulationExtensionConfigurator;
|
import info.openrocket.swing.simulation.extension.AbstractSwingSimulationExtensionConfigurator;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
|
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
|
||||||
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
|
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
|
||||||
@ -102,7 +101,7 @@ public class ScriptingConfigurator extends AbstractSwingSimulationExtensionConfi
|
|||||||
|
|
||||||
panel.add(new JPanel(), "growx");
|
panel.add(new JPanel(), "growx");
|
||||||
|
|
||||||
JButton button = new SelectColorButton(trans.get("SimulationExtension.scripting.text.trusted.clear"));
|
JButton button = new JButton(trans.get("SimulationExtension.scripting.text.trusted.clear"));
|
||||||
button.setToolTipText(trans.get("SimulationExtension.scripting.text.trusted.clear.ttip"));
|
button.setToolTipText(trans.get("SimulationExtension.scripting.text.trusted.clear.ttip"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,7 +45,6 @@ import info.openrocket.core.preset.loader.MaterialHolder;
|
|||||||
import info.openrocket.core.preset.xml.OpenRocketComponentDTO;
|
import info.openrocket.core.preset.xml.OpenRocketComponentDTO;
|
||||||
import info.openrocket.core.preset.xml.OpenRocketComponentSaver;
|
import info.openrocket.core.preset.xml.OpenRocketComponentSaver;
|
||||||
import info.openrocket.core.startup.Application;
|
import info.openrocket.core.startup.Application;
|
||||||
import info.openrocket.swing.gui.widgets.SelectColorButton;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -207,7 +206,7 @@ public class ComponentPresetEditor extends JPanel implements PresetResultListene
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
JButton addBtn = new SelectColorButton("Add");
|
JButton addBtn = new JButton("Add");
|
||||||
addBtn.addMouseListener(new MouseAdapter() {
|
addBtn.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent arg0) {
|
public void mouseClicked(MouseEvent arg0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user