Updated GUI with axial stage position elements
This commit is contained in:
parent
2cd5fe6306
commit
4f716b40af
@ -823,15 +823,12 @@ RocketCompCfg.lbl.Componentname = Component name:
|
|||||||
RocketCompCfg.ttip.Thecomponentname = The component name.
|
RocketCompCfg.ttip.Thecomponentname = The component name.
|
||||||
RocketCompCfg.tab.Override = Override
|
RocketCompCfg.tab.Override = Override
|
||||||
RocketCompCfg.tab.MassandCGoverride = Mass and CG override options
|
RocketCompCfg.tab.MassandCGoverride = Mass and CG override options
|
||||||
RocketCompCfg.tab.Pod = Pod
|
|
||||||
RocketCompCfg.tab.PodComment = Options for locating ExteriorComponents outside the Rocket
|
|
||||||
RocketCompCfg.tab.Parallel = Parallel
|
RocketCompCfg.tab.Parallel = Parallel
|
||||||
RocketCompCfg.tab.ParallelComment = Options for locating Stages parallel to other stages
|
RocketCompCfg.tab.ParallelComment = Options for locating stages parallel to other stages
|
||||||
RocketCompCfg.outside.stage = Make this Stage Parallel
|
RocketCompCfg.outside.stage = Make this Stage Parallel
|
||||||
RocketCompCfg.outside.pod = Move this Component Outside
|
RocketCompCfg.outside.radius = Radial Distance
|
||||||
RocketCompCfg.outside.radius = Radial Distance (meters)
|
RocketCompCfg.outside.angle = Angle
|
||||||
RocketCompCfg.outside.angle = Angle (Radians)
|
RocketCompCfg.outside.rotation = Rotation
|
||||||
RocketCompCfg.outside.rotation = Rotation (Radians)
|
|
||||||
RocketCompCfg.tab.Figure = Figure
|
RocketCompCfg.tab.Figure = Figure
|
||||||
RocketCompCfg.tab.Figstyleopt = Figure style options
|
RocketCompCfg.tab.Figstyleopt = Figure style options
|
||||||
RocketCompCfg.tab.Comment = Comment
|
RocketCompCfg.tab.Comment = Comment
|
||||||
|
@ -1000,11 +1000,22 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
|||||||
mutex.lock("toRelative");
|
mutex.lock("toRelative");
|
||||||
try {
|
try {
|
||||||
double absoluteX = Double.NaN;
|
double absoluteX = Double.NaN;
|
||||||
|
double relativeY = 0;
|
||||||
|
double relativeZ = 0;
|
||||||
RocketComponent search = dest;
|
RocketComponent search = dest;
|
||||||
Coordinate[] array = new Coordinate[1];
|
Coordinate[] array = new Coordinate[1];
|
||||||
array[0] = c;
|
array[0] = c;
|
||||||
|
|
||||||
RocketComponent component = this;
|
RocketComponent component = this;
|
||||||
|
if (component instanceof OutsideComponent) {
|
||||||
|
OutsideComponent ext = (OutsideComponent) component;
|
||||||
|
double phi = ext.getAngularPosition();
|
||||||
|
double r = ext.getRadialPosition();
|
||||||
|
relativeY = r * Math.cos(phi);
|
||||||
|
relativeZ = r * Math.sin(phi);
|
||||||
|
array[0].setY(relativeY);
|
||||||
|
array[0].setZ(relativeZ);
|
||||||
|
}
|
||||||
while ((component != search) && (component.parent != null)) {
|
while ((component != search) && (component.parent != null)) {
|
||||||
|
|
||||||
array = component.shiftCoordinates(array);
|
array = component.shiftCoordinates(array);
|
||||||
@ -1012,21 +1023,21 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
|||||||
switch (component.relativePosition) {
|
switch (component.relativePosition) {
|
||||||
case TOP:
|
case TOP:
|
||||||
for (int i = 0; i < array.length; i++) {
|
for (int i = 0; i < array.length; i++) {
|
||||||
array[i] = array[i].add(component.position, 0, 0);
|
array[i] = array[i].add(component.position, relativeY, relativeZ);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MIDDLE:
|
case MIDDLE:
|
||||||
for (int i = 0; i < array.length; i++) {
|
for (int i = 0; i < array.length; i++) {
|
||||||
array[i] = array[i].add(component.position +
|
array[i] = array[i].add(component.position +
|
||||||
(component.parent.length - component.length) / 2, 0, 0);
|
(component.parent.length - component.length) / 2, relativeY, relativeZ);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BOTTOM:
|
case BOTTOM:
|
||||||
for (int i = 0; i < array.length; i++) {
|
for (int i = 0; i < array.length; i++) {
|
||||||
array[i] = array[i].add(component.position +
|
array[i] = array[i].add(component.position +
|
||||||
(component.parent.length - component.length), 0, 0);
|
(component.parent.length - component.length), relativeY, relativeZ);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1038,17 +1049,18 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
|||||||
RocketComponent comp = component.parent.children.get(index);
|
RocketComponent comp = component.parent.children.get(index);
|
||||||
double componentLength = comp.getTotalLength();
|
double componentLength = comp.getTotalLength();
|
||||||
for (int i = 0; i < array.length; i++) {
|
for (int i = 0; i < array.length; i++) {
|
||||||
array[i] = array[i].add(componentLength, 0, 0);
|
array[i] = array[i].add(componentLength, relativeY, relativeZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < array.length; i++) {
|
for (int i = 0; i < array.length; i++) {
|
||||||
array[i] = array[i].add(component.position + component.parent.length, 0, 0);
|
array[i] = array[i].add(component.position + component.parent.length, relativeY, relativeZ);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ABSOLUTE:
|
case ABSOLUTE:
|
||||||
search = null; // Requires back-search if dest!=null
|
search = null; // Requires back-search if dest!=null
|
||||||
if (Double.isNaN(absoluteX)) {
|
if (Double.isNaN(absoluteX)) {
|
||||||
|
// TODO: requires debugging if thsi component is an External Pods or stage
|
||||||
absoluteX = component.position;
|
absoluteX = component.position;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1063,6 +1075,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
|||||||
|
|
||||||
if (!Double.isNaN(absoluteX)) {
|
if (!Double.isNaN(absoluteX)) {
|
||||||
for (int i = 0; i < array.length; i++) {
|
for (int i = 0; i < array.length; i++) {
|
||||||
|
// TODO: requires debugging if thsi component is an External Pods or stage
|
||||||
array[i] = array[i].setX(absoluteX + c.x);
|
array[i] = array[i].setX(absoluteX + c.x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,6 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
private double position_radial_m = 0;
|
private double position_radial_m = 0;
|
||||||
private double rotation_rad = 0;
|
private double rotation_rad = 0;
|
||||||
|
|
||||||
// ParallelStagingConfiguration parallelConfiguration = null;
|
|
||||||
|
|
||||||
public Stage() {
|
public Stage() {
|
||||||
this.separationConfigurations = new FlightConfigurationImpl<StageSeparationConfiguration>(this, ComponentChangeEvent.EVENT_CHANGE, new StageSeparationConfiguration());
|
this.separationConfigurations = new FlightConfigurationImpl<StageSeparationConfiguration>(this, ComponentChangeEvent.EVENT_CHANGE, new StageSeparationConfiguration());
|
||||||
}
|
}
|
||||||
@ -31,11 +29,6 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
return separationConfigurations;
|
return separationConfigurations;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public ParallelStagingConfiguration getParallelStageConfiguration() {
|
|
||||||
// return parallelConfiguration;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowsChildren() {
|
public boolean allowsChildren() {
|
||||||
return true;
|
return true;
|
||||||
@ -54,8 +47,6 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
return BodyComponent.class.isAssignableFrom(type);
|
return BodyComponent.class.isAssignableFrom(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cloneFlightConfiguration(String oldConfigId, String newConfigId) {
|
public void cloneFlightConfiguration(String oldConfigId, String newConfigId) {
|
||||||
separationConfigurations.cloneFlightConfiguration(oldConfigId, newConfigId);
|
separationConfigurations.cloneFlightConfiguration(oldConfigId, newConfigId);
|
||||||
@ -74,7 +65,6 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
return this.outside;
|
return this.outside;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isInline() {
|
public boolean isInline() {
|
||||||
return !this.outside;
|
return !this.outside;
|
||||||
}
|
}
|
||||||
@ -82,6 +72,9 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
@Override
|
@Override
|
||||||
public void setOutside(final boolean _outside) {
|
public void setOutside(final boolean _outside) {
|
||||||
this.outside = _outside;
|
this.outside = _outside;
|
||||||
|
if (this.outside) {
|
||||||
|
fireComponentChangeEvent(ComponentChangeEvent.AERODYNAMIC_CHANGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -95,6 +88,9 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
@Override
|
@Override
|
||||||
public void setAngularPosition(final double angle_rad) {
|
public void setAngularPosition(final double angle_rad) {
|
||||||
this.position_angular_rad = angle_rad;
|
this.position_angular_rad = angle_rad;
|
||||||
|
if (this.outside) {
|
||||||
|
fireComponentChangeEvent(ComponentChangeEvent.AERODYNAMIC_CHANGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -108,6 +104,10 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
@Override
|
@Override
|
||||||
public void setRadialPosition(final double radius) {
|
public void setRadialPosition(final double radius) {
|
||||||
this.position_radial_m = radius;
|
this.position_radial_m = radius;
|
||||||
|
if (this.outside) {
|
||||||
|
fireComponentChangeEvent(ComponentChangeEvent.AERODYNAMIC_CHANGE);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -121,6 +121,30 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
@Override
|
@Override
|
||||||
public void setRotation(final double rotation) {
|
public void setRotation(final double rotation) {
|
||||||
this.rotation_rad = rotation;
|
this.rotation_rad = rotation;
|
||||||
|
if (this.outside) {
|
||||||
|
fireComponentChangeEvent(ComponentChangeEvent.AERODYNAMIC_CHANGE);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RocketComponent.Position getRelativePositionMethod() {
|
||||||
|
return this.relativePosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setRelativePosition(final Position position) {
|
||||||
|
super.setRelativePosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAxialPosition() {
|
||||||
|
return super.getPositionValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAxialPosition(final double _pos) {
|
||||||
|
super.setPositionValue(_pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package net.sf.openrocket.gui.configdialog;
|
|||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
|
|
||||||
|
import javax.swing.ComboBoxModel;
|
||||||
import javax.swing.JCheckBox;
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
@ -19,7 +20,9 @@ import net.sf.openrocket.gui.SpinnerEditor;
|
|||||||
import net.sf.openrocket.gui.adaptors.BooleanModel;
|
import net.sf.openrocket.gui.adaptors.BooleanModel;
|
||||||
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
||||||
import net.sf.openrocket.gui.adaptors.EnumModel;
|
import net.sf.openrocket.gui.adaptors.EnumModel;
|
||||||
|
import net.sf.openrocket.gui.components.BasicSlider;
|
||||||
import net.sf.openrocket.gui.components.StyledLabel;
|
import net.sf.openrocket.gui.components.StyledLabel;
|
||||||
|
import net.sf.openrocket.gui.components.UnitSelector;
|
||||||
import net.sf.openrocket.gui.components.StyledLabel.Style;
|
import net.sf.openrocket.gui.components.StyledLabel.Style;
|
||||||
import net.sf.openrocket.l10n.Translator;
|
import net.sf.openrocket.l10n.Translator;
|
||||||
import net.sf.openrocket.rocketcomponent.OutsideComponent;
|
import net.sf.openrocket.rocketcomponent.OutsideComponent;
|
||||||
@ -28,12 +31,11 @@ import net.sf.openrocket.rocketcomponent.Stage;
|
|||||||
import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration;
|
import net.sf.openrocket.rocketcomponent.StageSeparationConfiguration;
|
||||||
import net.sf.openrocket.startup.Application;
|
import net.sf.openrocket.startup.Application;
|
||||||
import net.sf.openrocket.unit.UnitGroup;
|
import net.sf.openrocket.unit.UnitGroup;
|
||||||
|
import net.sf.openrocket.util.ChangeSource;
|
||||||
|
|
||||||
public class StageConfig extends RocketComponentConfig {
|
public class StageConfig extends RocketComponentConfig {
|
||||||
private static final Translator trans = Application.getTranslator();
|
private static final Translator trans = Application.getTranslator();
|
||||||
|
|
||||||
private BooleanModel parallelEnabledModel = null;
|
|
||||||
private JPanel parallelEnabledPanel = null;
|
|
||||||
|
|
||||||
public StageConfig(OpenRocketDocument document, RocketComponent component) {
|
public StageConfig(OpenRocketDocument document, RocketComponent component) {
|
||||||
super(document, component);
|
super(document, component);
|
||||||
@ -54,51 +56,84 @@ public class StageConfig extends RocketComponentConfig {
|
|||||||
private JPanel parallelTab( final Stage stage ){
|
private JPanel parallelTab( final Stage stage ){
|
||||||
// enable parallel staging
|
// enable parallel staging
|
||||||
JPanel motherPanel = new JPanel( new MigLayout("fill"));
|
JPanel motherPanel = new JPanel( new MigLayout("fill"));
|
||||||
parallelEnabledModel = new BooleanModel( component, "Outside");
|
BooleanModel parallelEnabledModel = new BooleanModel( component, "Outside");
|
||||||
parallelEnabledModel.setValue( stage.getOutside());
|
parallelEnabledModel.setValue( stage.getOutside());
|
||||||
JCheckBox parallelEnabled = new JCheckBox( parallelEnabledModel);
|
JCheckBox parallelEnabled = new JCheckBox( parallelEnabledModel);
|
||||||
parallelEnabled.setText(trans.get("RocketCompCfg.outside.stage"));
|
parallelEnabled.setText(trans.get("RocketCompCfg.outside.stage"));
|
||||||
motherPanel.add(parallelEnabled, "wrap");
|
motherPanel.add(parallelEnabled, "wrap");
|
||||||
|
|
||||||
JPanel enabledPanel = new JPanel( new MigLayout("fill"));
|
motherPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "spanx 3, growx, wrap");
|
||||||
this.parallelEnabledPanel = enabledPanel;
|
|
||||||
|
|
||||||
enabledPanel.add(new JSeparator(SwingConstants.HORIZONTAL), "growx,wrap");
|
|
||||||
|
|
||||||
// set radial distance
|
// set radial distance
|
||||||
enabledPanel.add(new JLabel(trans.get("RocketCompCfg.outside.radius")), "align left");
|
JLabel radiusLabel = new JLabel(trans.get("RocketCompCfg.outside.radius"));
|
||||||
DoubleModel radiusModel = new DoubleModel( stage, "RadialPosition", 0.0);
|
motherPanel.add( radiusLabel , "align left");
|
||||||
radiusModel.setCurrentUnit( UnitGroup.UNITS_DISTANCE.getSIUnit() );
|
parallelEnabledModel.addEnableComponent( radiusLabel, true);
|
||||||
|
DoubleModel radiusModel = new DoubleModel( stage, "RadialPosition", UnitGroup.UNITS_LENGTH, 0);
|
||||||
|
//radiusModel.setCurrentUnit( UnitGroup.UNITS_LENGTH.getUnit("cm"));
|
||||||
JSpinner radiusSpinner = new JSpinner( radiusModel.getSpinnerModel());
|
JSpinner radiusSpinner = new JSpinner( radiusModel.getSpinnerModel());
|
||||||
radiusSpinner.setEditor(new SpinnerEditor(radiusSpinner ));
|
radiusSpinner.setEditor(new SpinnerEditor(radiusSpinner ));
|
||||||
enabledPanel.add(radiusSpinner , "growx, wrap, align right");
|
motherPanel.add(radiusSpinner , "growx 1, align right");
|
||||||
|
parallelEnabledModel.addEnableComponent( radiusSpinner, true);
|
||||||
// set angle around the primary stage
|
UnitSelector radiusUnitSelector = new UnitSelector(radiusModel);
|
||||||
enabledPanel.add(new JLabel(trans.get("RocketCompCfg.outside.angle")), "align left");
|
motherPanel.add(radiusUnitSelector, "growx 1, wrap");
|
||||||
DoubleModel angleModel = new DoubleModel( stage, "AngularPosition", 0.0, Math.PI*2);
|
parallelEnabledModel.addEnableComponent( radiusUnitSelector , true);
|
||||||
|
|
||||||
|
// set location angle around the primary stage
|
||||||
|
JLabel angleLabel = new JLabel(trans.get("RocketCompCfg.outside.angle"));
|
||||||
|
motherPanel.add( angleLabel, "align left");
|
||||||
|
parallelEnabledModel.addEnableComponent( angleLabel, true);
|
||||||
|
DoubleModel angleModel = new DoubleModel( stage, "AngularPosition", 1.0, UnitGroup.UNITS_ANGLE, 0.0, Math.PI*2);
|
||||||
angleModel.setCurrentUnit( UnitGroup.UNITS_ANGLE.getUnit("rad"));
|
angleModel.setCurrentUnit( UnitGroup.UNITS_ANGLE.getUnit("rad"));
|
||||||
JSpinner angleSpinner = new JSpinner(angleModel.getSpinnerModel());
|
JSpinner angleSpinner = new JSpinner(angleModel.getSpinnerModel());
|
||||||
angleSpinner.setEditor(new SpinnerEditor(angleSpinner));
|
angleSpinner.setEditor(new SpinnerEditor(angleSpinner));
|
||||||
enabledPanel.add(angleSpinner, "growx, wrap");
|
motherPanel.add(angleSpinner, "growx 1");
|
||||||
|
parallelEnabledModel.addEnableComponent( angleSpinner, true);
|
||||||
|
UnitSelector angleUnitSelector = new UnitSelector(angleModel);
|
||||||
|
motherPanel.add( angleUnitSelector, "growx 1, wrap");
|
||||||
|
parallelEnabledModel.addEnableComponent( angleUnitSelector , true);
|
||||||
|
|
||||||
enabledPanel.add(new JLabel(trans.get("RocketCompCfg.outside.rotation")), "align left");
|
// set rotation angle of the stage. Does not affect the location
|
||||||
DoubleModel rotationModel = new DoubleModel( stage, "Rotation", 0.0, Math.PI*2);
|
JLabel rotationLabel = new JLabel(trans.get("RocketCompCfg.outside.rotation"));
|
||||||
|
motherPanel.add( rotationLabel, "align left");
|
||||||
|
parallelEnabledModel.addEnableComponent( rotationLabel, true);
|
||||||
|
DoubleModel rotationModel = new DoubleModel( stage, "Rotation", 1.0, UnitGroup.UNITS_ANGLE, 0.0, Math.PI*2);
|
||||||
rotationModel.setCurrentUnit( UnitGroup.UNITS_ANGLE.getUnit("rad") );
|
rotationModel.setCurrentUnit( UnitGroup.UNITS_ANGLE.getUnit("rad") );
|
||||||
JSpinner rotationSpinner = new JSpinner(rotationModel.getSpinnerModel());
|
JSpinner rotationSpinner = new JSpinner(rotationModel.getSpinnerModel());
|
||||||
rotationSpinner.setEditor(new SpinnerEditor(rotationSpinner));
|
rotationSpinner.setEditor(new SpinnerEditor(rotationSpinner));
|
||||||
enabledPanel.add(rotationSpinner, "growx, wrap");
|
motherPanel.add(rotationSpinner, "growx 1");
|
||||||
|
parallelEnabledModel.addEnableComponent( rotationSpinner, true);
|
||||||
|
UnitSelector rotationUnitSelector = new UnitSelector( rotationModel);
|
||||||
parallelEnabled.addChangeListener(new ChangeListener() {
|
motherPanel.add( rotationUnitSelector, "growx 1, wrap");
|
||||||
@Override
|
parallelEnabledModel.addEnableComponent( rotationUnitSelector , true);
|
||||||
public void stateChanged(ChangeEvent e) {
|
|
||||||
setDeepEnabled( parallelEnabledPanel, parallelEnabledModel.getValue());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
setDeepEnabled( parallelEnabledPanel, parallelEnabledModel.getValue());
|
|
||||||
|
|
||||||
motherPanel.add( enabledPanel , "growx, wrap");
|
// setPositions relative to parent component
|
||||||
|
JLabel positionLabel = new JLabel(trans.get("LaunchLugCfg.lbl.Posrelativeto"));
|
||||||
|
motherPanel.add( positionLabel);
|
||||||
|
parallelEnabledModel.addEnableComponent( positionLabel);
|
||||||
|
|
||||||
|
// EnumModel(ChangeSource source, String valueName, Enum<T>[] values) {
|
||||||
|
ComboBoxModel<RocketComponent.Position> posRelModel = new EnumModel<RocketComponent.Position>(component, "RelativePosition",
|
||||||
|
new RocketComponent.Position[] {
|
||||||
|
RocketComponent.Position.TOP,
|
||||||
|
RocketComponent.Position.MIDDLE,
|
||||||
|
RocketComponent.Position.BOTTOM,
|
||||||
|
RocketComponent.Position.ABSOLUTE
|
||||||
|
});
|
||||||
|
JComboBox<?> combo = new JComboBox<RocketComponent.Position>( posRelModel );
|
||||||
|
motherPanel.add(combo, "spanx, growx, wrap");
|
||||||
|
parallelEnabledModel.addEnableComponent( positionLabel);
|
||||||
|
|
||||||
|
// plus
|
||||||
|
JLabel positionPlusLabel = new JLabel(trans.get("LaunchLugCfg.lbl.plus"));
|
||||||
|
motherPanel.add( positionPlusLabel );
|
||||||
|
parallelEnabledModel.addEnableComponent( positionPlusLabel );
|
||||||
|
|
||||||
|
DoubleModel axialPositionModel = new DoubleModel(component, "AxialPosition", UnitGroup.UNITS_LENGTH);
|
||||||
|
JSpinner axPosSpin= new JSpinner( axialPositionModel.getSpinnerModel());
|
||||||
|
axPosSpin.setEditor(new SpinnerEditor(axPosSpin));
|
||||||
|
motherPanel.add(axPosSpin, "growx");
|
||||||
|
parallelEnabledModel.addEnableComponent( positionPlusLabel );
|
||||||
|
|
||||||
return motherPanel;
|
return motherPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,9 +173,6 @@ public class RocketFigure extends AbstractScaleFigure {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the figure shapes and figure size.
|
* Updates the figure shapes and figure size.
|
||||||
*/
|
*/
|
||||||
@ -195,6 +192,7 @@ public class RocketFigure extends AbstractScaleFigure {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.err.println(" updating the RocketFigure.");
|
||||||
repaint();
|
repaint();
|
||||||
fireChangeEvent();
|
fireChangeEvent();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user