Added message properties and prefs for showing warning dialogs.
Restored auto-open last design preference.
This commit is contained in:
parent
f5786d8d90
commit
e8167ac159
@ -259,6 +259,9 @@ pref.dlg.tab.Simulation = Simulation
|
|||||||
pref.dlg.tab.Launch = Launch
|
pref.dlg.tab.Launch = Launch
|
||||||
pref.dlg.tab.Miscellaneousoptions = Miscellaneous options
|
pref.dlg.tab.Miscellaneousoptions = Miscellaneous options
|
||||||
|
|
||||||
|
pref.dlg.lbl.RockSimWarning = Show warning when saving in RockSim format
|
||||||
|
pref.dlg.lbl.FileExtensionWarning = Show warning when saving with unusual file name extension
|
||||||
|
|
||||||
pref.dlg.tab.Graphics = Graphics
|
pref.dlg.tab.Graphics = Graphics
|
||||||
pref.dlg.lbl.DecalEditor = Graphics Editor
|
pref.dlg.lbl.DecalEditor = Graphics Editor
|
||||||
pref.dlg.opengl.lbl.title = 3D Graphics
|
pref.dlg.opengl.lbl.title = 3D Graphics
|
||||||
@ -1134,6 +1137,15 @@ FinsetCfg.ttip.Finfillets1 = <HTML>Adds the predicted mass of fin fillets to the
|
|||||||
FinsetCfg.ttip.Finfillets2 = Assumes the fillet is concave and tangent to the body tube and fin.<br>
|
FinsetCfg.ttip.Finfillets2 = Assumes the fillet is concave and tangent to the body tube and fin.<br>
|
||||||
FinsetCfg.ttip.Finfillets3 = Zero radius will give no fillet.
|
FinsetCfg.ttip.Finfillets3 = Zero radius will give no fillet.
|
||||||
|
|
||||||
|
! Save RKT Warning Dialog
|
||||||
|
SaveRktWarningDialog.txt1="The RockSim file format does not support all features of OpenRocket."
|
||||||
|
SaveRktWarningDialog.txt2="Do you want to save in RockSim .RKT format or OpenRocket .ORK format?"
|
||||||
|
SaveRktWarningDialog.btn.rkt="Save as RKT"
|
||||||
|
SaveRktWarningDialog.btn.ork="Save as ORK"
|
||||||
|
|
||||||
|
! SaveExtensionWarningDialog
|
||||||
|
SaveExtensionWarningDialog.txt="The file format {} usually has the extension {}"
|
||||||
|
|
||||||
! StorageOptionChooser
|
! StorageOptionChooser
|
||||||
StorageOptChooser.lbl.Simdatatostore = Simulated data to store:
|
StorageOptChooser.lbl.Simdatatostore = Simulated data to store:
|
||||||
StorageOptChooser.rdbut.Allsimdata = All simulated data
|
StorageOptChooser.rdbut.Allsimdata = All simulated data
|
||||||
|
@ -61,6 +61,8 @@ public abstract class Preferences implements ChangeSource {
|
|||||||
// Node names
|
// Node names
|
||||||
public static final String PREFERRED_THRUST_CURVE_MOTOR_NODE = "preferredThrustCurveMotors";
|
public static final String PREFERRED_THRUST_CURVE_MOTOR_NODE = "preferredThrustCurveMotors";
|
||||||
private static final String AUTO_OPEN_LAST_DESIGN = "AUTO_OPEN_LAST_DESIGN";
|
private static final String AUTO_OPEN_LAST_DESIGN = "AUTO_OPEN_LAST_DESIGN";
|
||||||
|
private static final String SHOW_ROCKSIM_FORMAT_WARNING = "SHOW_ROCKSIM_FORMAT_WARNING";
|
||||||
|
private static final String SHOW_FILE_EXTENSION_WARNING = "SHOW_FILE_EXTENSION_WARNING";
|
||||||
|
|
||||||
//Preferences related to 3D graphics
|
//Preferences related to 3D graphics
|
||||||
public static final String OPENGL_ENABLED = "OpenGL_Is_Enabled";
|
public static final String OPENGL_ENABLED = "OpenGL_Is_Enabled";
|
||||||
@ -162,6 +164,22 @@ public abstract class Preferences implements ChangeSource {
|
|||||||
this.putBoolean(LAUNCH_INTO_WIND, check);
|
this.putBoolean(LAUNCH_INTO_WIND, check);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final boolean getShowRockSimFormatWarning() {
|
||||||
|
return this.getBoolean(SHOW_ROCKSIM_FORMAT_WARNING, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void setShowRockSimFormatWarning(boolean check) {
|
||||||
|
this.putBoolean(SHOW_ROCKSIM_FORMAT_WARNING, check);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final boolean getShowFileExtensionWarning() {
|
||||||
|
return this.getBoolean(SHOW_FILE_EXTENSION_WARNING, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void setShowFileExtensionWarning(boolean check) {
|
||||||
|
this.putBoolean(SHOW_FILE_EXTENSION_WARNING, check);
|
||||||
|
}
|
||||||
|
|
||||||
public final double getDefaultMach() {
|
public final double getDefaultMach() {
|
||||||
return Application.getPreferences().getChoice(Preferences.DEFAULT_MACH_NUMBER, 0.9, 0.3);
|
return Application.getPreferences().getChoice(Preferences.DEFAULT_MACH_NUMBER, 0.9, 0.3);
|
||||||
}
|
}
|
||||||
@ -736,12 +754,14 @@ public abstract class Preferences implements ChangeSource {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private static final HashMap<Class<?>, String> DEFAULT_LINE_STYLES = new HashMap<Class<?>, String>();
|
private static final HashMap<Class<?>, String> DEFAULT_LINE_STYLES = new HashMap<Class<?>, String>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DEFAULT_LINE_STYLES.put(RocketComponent.class, LineStyle.SOLID.name());
|
DEFAULT_LINE_STYLES.put(RocketComponent.class, LineStyle.SOLID.name());
|
||||||
DEFAULT_LINE_STYLES.put(MassObject.class, LineStyle.DASHED.name());
|
DEFAULT_LINE_STYLES.put(MassObject.class, LineStyle.DASHED.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final HashMap<Class<?>, String> DEFAULT_COLORS = new HashMap<Class<?>, String>();
|
private static final HashMap<Class<?>, String> DEFAULT_COLORS = new HashMap<Class<?>, String>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DEFAULT_COLORS.put(BodyComponent.class, "0,0,240");
|
DEFAULT_COLORS.put(BodyComponent.class, "0,0,240");
|
||||||
DEFAULT_COLORS.put(TubeFinSet.class, "0,0,200");
|
DEFAULT_COLORS.put(TubeFinSet.class, "0,0,200");
|
||||||
|
@ -208,6 +208,40 @@ public class GeneralPreferencesPanel extends PreferencesPanel {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(button, "right, wrap");
|
this.add(button, "right, wrap");
|
||||||
|
|
||||||
|
//// Open most recent file on startup
|
||||||
|
final JCheckBox openRecentOnStartupBox = new JCheckBox(trans.get("pref.dlg.but.openlast"));
|
||||||
|
openRecentOnStartupBox.setSelected(preferences.isAutoOpenLastDesignOnStartupEnabled());
|
||||||
|
openRecentOnStartupBox.addActionListener( new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
preferences.setAutoOpenLastDesignOnStartup(openRecentOnStartupBox.isSelected());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(openRecentOnStartupBox,"spanx, wrap");
|
||||||
|
|
||||||
|
//// Save RockSim Format warning dialog
|
||||||
|
final JCheckBox rocksimWarningDialogBox = new JCheckBox(trans.get("pref.dlg.lbl.RockSimWarning"));
|
||||||
|
rocksimWarningDialogBox.setSelected(preferences.getShowRockSimFormatWarning());
|
||||||
|
rocksimWarningDialogBox.addActionListener( new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
preferences.setShowRockSimFormatWarning(rocksimWarningDialogBox.isSelected());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(rocksimWarningDialogBox,"spanx, wrap");
|
||||||
|
|
||||||
|
//// Extension Format warning dialog
|
||||||
|
final JCheckBox extensionWarningDialoBox = new JCheckBox(trans.get("pref.dlg.lbl.FileExtensionWarning"));
|
||||||
|
extensionWarningDialoBox.setSelected(preferences.getShowFileExtensionWarning());
|
||||||
|
extensionWarningDialoBox.addActionListener( new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
preferences.setShowFileExtensionWarning(extensionWarningDialoBox.isSelected());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(extensionWarningDialoBox,"spanx, wrap");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user