Fix fin set sliders
This commit is contained in:
		
							parent
							
								
									8a7f28e03c
								
							
						
					
					
						commit
						615607fee3
					
				@ -66,7 +66,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
 | 
			
		||||
		order.add(((SpinnerEditor) spin.getEditor()).getTextField());
 | 
			
		||||
		
 | 
			
		||||
		panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(-Math.PI, Math.PI)), "w 100lp, wrap");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(-Math.PI, Math.PI)), "w 150lp, wrap");
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		////  Fin cant
 | 
			
		||||
@ -85,7 +85,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
 | 
			
		||||
		
 | 
			
		||||
		panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)),
 | 
			
		||||
				"w 100lp, wrap");
 | 
			
		||||
				"w 150lp, wrap");
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
@ -100,7 +100,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
 | 
			
		||||
		order.add(((SpinnerEditor) spin.getEditor()).getTextField());
 | 
			
		||||
		
 | 
			
		||||
		panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(0, 0.05, 0.2)), "w 100lp, wrap");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(0, 0.05, 0.2)), "w 150lp, wrap");
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		////  Height
 | 
			
		||||
@ -114,7 +114,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
 | 
			
		||||
		order.add(((SpinnerEditor) spin.getEditor()).getTextField());
 | 
			
		||||
		
 | 
			
		||||
		panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(0, 0.05, 0.2)), "w 100lp, wrap");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(0, 0.05, 0.2)), "w 150lp, wrap");
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		////  Position
 | 
			
		||||
@ -146,7 +146,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
 | 
			
		||||
		panel.add(new BasicSlider(axialOffsetModel.getSliderModel(
 | 
			
		||||
				new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
 | 
			
		||||
				new DoubleModel(component.getParent(), "Length"))),
 | 
			
		||||
				"w 100lp, wrap");
 | 
			
		||||
				"w 150lp, wrap");
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
		//// Right portion
 | 
			
		||||
@ -178,7 +178,7 @@ public class EllipticalFinSetConfig extends FinSetConfig {
 | 
			
		||||
		order.add(((SpinnerEditor) spin.getEditor()).getTextField());
 | 
			
		||||
		
 | 
			
		||||
		panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(0, 0.01)), "w 100lp, wrap 30lp");
 | 
			
		||||
		panel.add(new BasicSlider(m.getSliderModel(0, 0.01)), "w 150lp, wrap 30lp");
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
@ -149,7 +149,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
 | 
			
		||||
	
 | 
			
		||||
	private JPanel finTabPanel() {
 | 
			
		||||
		JPanel panel = new JPanel(
 | 
			
		||||
				new MigLayout("align 50% 20%, fillx, gap rel unrel, ins 20lp 10% 20lp 10%",
 | 
			
		||||
				new MigLayout("gap rel unrel, ins 25lp",
 | 
			
		||||
						"[150lp::][65lp::][30lp::][200lp::]", ""));
 | 
			
		||||
		//		JPanel panel = new JPanel(new MigLayout("fillx, align 20% 20%, gap rel unrel",
 | 
			
		||||
		//				"[40lp][80lp::][30lp::][100lp::]",""));
 | 
			
		||||
@ -181,7 +181,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
 | 
			
		||||
		label = new JLabel(trans.get("FinSetConfig.lbl.Tablength"));
 | 
			
		||||
		//// The length of the fin tab.
 | 
			
		||||
		label.setToolTipText(trans.get("FinSetConfig.ttip.Tablength"));
 | 
			
		||||
		panel.add(label, "gapleft para, gapright 40lp, growx 1");
 | 
			
		||||
		panel.add(label);
 | 
			
		||||
		
 | 
			
		||||
		final DoubleModel tabLength = new DoubleModel(component, "TabLength", UnitGroup.UNITS_LENGTH, 0);
 | 
			
		||||
		
 | 
			
		||||
@ -199,7 +199,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
 | 
			
		||||
		label = new JLabel(trans.get("FinSetConfig.lbl.Tabheight"));
 | 
			
		||||
		//// The span-wise height of the fin tab.
 | 
			
		||||
		label.setToolTipText(trans.get("FinSetConfig.ttip.Tabheight"));
 | 
			
		||||
		panel.add(label, "gapleft para");
 | 
			
		||||
		panel.add(label);
 | 
			
		||||
		
 | 
			
		||||
		final DoubleModel tabHeightModel = new DoubleModel(component, "TabHeight", UnitGroup.UNITS_LENGTH, 0, ((FinSet)component).getMaxTabHeight());
 | 
			
		||||
		component.addChangeListener( tabHeightModel );
 | 
			
		||||
@ -216,7 +216,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
 | 
			
		||||
		label = new JLabel(trans.get("FinSetConfig.lbl.Tabposition"));
 | 
			
		||||
		//// The position of the fin tab.
 | 
			
		||||
		label.setToolTipText(trans.get("FinSetConfig.ttip.Tabposition"));
 | 
			
		||||
		panel.add(label, "gapleft para");
 | 
			
		||||
		panel.add(label);
 | 
			
		||||
		
 | 
			
		||||
		final DoubleModel tabOffset = new DoubleModel(component, "TabOffset", UnitGroup.UNITS_LENGTH);
 | 
			
		||||
		component.addChangeListener( tabOffset);
 | 
			
		||||
@ -568,7 +568,7 @@ public abstract class FinSetConfig extends RocketComponentConfig {
 | 
			
		||||
	    filletPanel.add(us, "growx");
 | 
			
		||||
	    us.setToolTipText(tip);
 | 
			
		||||
	    BasicSlider bs =new BasicSlider(m.getSliderModel(0, 10));
 | 
			
		||||
	    filletPanel.add(bs, "w 100lp, wrap para");
 | 
			
		||||
	    filletPanel.add(bs, "w 150lp, wrap para");
 | 
			
		||||
	    bs.setToolTipText(tip);
 | 
			
		||||
 | 
			
		||||
		// Fillet Material:
 | 
			
		||||
 | 
			
		||||
@ -117,8 +117,6 @@ public class FreeformFinSetConfig extends FinSetConfig {
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	private JPanel generalPane() {
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		JPanel mainPanel = new JPanel(new MigLayout("fill"));
 | 
			
		||||
		
 | 
			
		||||
		JPanel panel = new JPanel(new MigLayout("fill, gap rel unrel", "[][65lp::][30lp::]", ""));
 | 
			
		||||
@ -145,7 +143,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) spin.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(m.getSliderModel(-Math.PI, Math.PI)), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(m.getSliderModel(-Math.PI, Math.PI)), "w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -163,7 +161,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) cantAngleSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(cantAngleModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(cantAngleModel.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)), "w 100lp, wrap 40lp");
 | 
			
		||||
			panel.add(new BasicSlider(cantAngleModel.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)), "w 150lp, wrap 40lp");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -187,7 +185,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) axialOffsetSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(axialOffsetModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(axialOffsetModel.getSliderModel(new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE), new DoubleModel(component.getParent(), "Length"))), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(axialOffsetModel.getSliderModel(new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE), new DoubleModel(component.getParent(), "Length"))), "w 150lp, wrap");
 | 
			
		||||
 | 
			
		||||
			axialMethodCombo.addActionListener(new ActionListener() {
 | 
			
		||||
				@Override
 | 
			
		||||
@ -223,7 +221,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) spin.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(m), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(m.getSliderModel(0, 0.01)), "w 100lp, wrap 30lp");
 | 
			
		||||
			panel.add(new BasicSlider(m.getSliderModel(0, 0.01)), "w 150lp, wrap 30lp");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{ //// Material
 | 
			
		||||
 | 
			
		||||
@ -73,7 +73,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) baseRotationSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(baseRotationModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(baseRotationModel.getSliderModel(-Math.PI, Math.PI)), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(baseRotationModel.getSliderModel(-Math.PI, Math.PI)), "w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{////  Fin cant:
 | 
			
		||||
@ -91,7 +91,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(cantModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(cantModel.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)),
 | 
			
		||||
					"w 100lp, wrap");
 | 
			
		||||
					"w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{////  Root chord:
 | 
			
		||||
@ -105,7 +105,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) rootChordSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(rootChordModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(rootChordModel.getSliderModel(0, 0.05, 0.2)), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(rootChordModel.getSliderModel(0, 0.05, 0.2)), "w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{////  Tip chord:
 | 
			
		||||
@ -119,7 +119,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) tipChordSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(tipChordModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(tipChordModel.getSliderModel(0, 0.05, 0.2)), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(tipChordModel.getSliderModel(0, 0.05, 0.2)), "w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{////  Height:
 | 
			
		||||
@ -133,7 +133,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) heightSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(heightModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(heightModel.getSliderModel(0, 0.05, 0.2)), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(heightModel.getSliderModel(0, 0.05, 0.2)), "w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{////  Sweep length:
 | 
			
		||||
@ -151,7 +151,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			// sweep slider from -1.1*TipChord to 1.1*RootChord
 | 
			
		||||
			DoubleModel tc = new DoubleModel(component, "TipChord", -1.1, UnitGroup.UNITS_LENGTH);
 | 
			
		||||
			DoubleModel rc = new DoubleModel(component, "RootChord", 1.1, UnitGroup.UNITS_LENGTH);
 | 
			
		||||
			panel.add(new BasicSlider(sweepDistanceModel.getSliderModel(tc, rc)), "w 100lp, wrap");
 | 
			
		||||
			panel.add(new BasicSlider(sweepDistanceModel.getSliderModel(tc, rc)), "w 150lp, wrap");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{////  Sweep angle:
 | 
			
		||||
@ -168,7 +168,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(sweepAngleModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(sweepAngleModel.getSliderModel(-Math.PI / 4, Math.PI / 4)),
 | 
			
		||||
					"w 100lp, wrap paragraph");
 | 
			
		||||
					"w 150lp, wrap paragraph");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		{//// Position relative to:
 | 
			
		||||
@ -200,7 +200,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			panel.add(new BasicSlider(axialOffsetModel.getSliderModel(
 | 
			
		||||
					new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE),
 | 
			
		||||
					new DoubleModel(component.getParent(), "Length"))),
 | 
			
		||||
					"w 100lp, wrap para");
 | 
			
		||||
					"w 150lp, wrap para");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			mainPanel.add(panel, "aligny 20%");
 | 
			
		||||
@ -231,7 +231,7 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
 | 
			
		||||
			order.add(((SpinnerEditor) thicknessSpinner.getEditor()).getTextField());
 | 
			
		||||
 | 
			
		||||
			panel.add(new UnitSelector(thicknessModel), "growx");
 | 
			
		||||
			panel.add(new BasicSlider(thicknessModel.getSliderModel(0, 0.01)), "w 100lp, wrap para");
 | 
			
		||||
			panel.add(new BasicSlider(thicknessModel.getSliderModel(0, 0.01)), "w 150lp, wrap para");
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user