Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
cSpringEditor.java
....@@ -8,7 +8,6 @@
88
99 class cSpringEditor extends ObjEditor implements ItemListener, ChangeListener, ObjectUI, ActionListener
1010 {
11
-
1211 cSpringEditor(cSpring inBP, GroupEditor callee)
1312 {
1413 super(inBP, callee);
....@@ -53,17 +52,19 @@
5352 {
5453 super.SetupUI2(oe);
5554
55
+ firstrowPanel = new cGridBag();
56
+
5657 //// oe.ctrlPanel.add(animate = new JCheckBox("Live", spring.live), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
5758 //// ObjEditor.aConstraints.gridx += 1;
58
- freezeButton = AddButton(oe, "Freeze");
59
+ freezeButton = AddButton(firstrowPanel, "Freeze");
5960 // oe.ctrlPanel.add(freezeButton = new cButton("Freeze"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6061 // ObjEditor.aConstraints.gridx += 1;
6162 //// oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6263 //// ObjEditor.aConstraints.gridx += 1;
63
- avoiderButton = AddButton(oe, "Avoid");
64
+ avoiderButton = AddButton(firstrowPanel, "Avoid");
6465 // oe.ctrlPanel.add(avoiderButton = new cButton("Avoid"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6566 // ObjEditor.aConstraints.gridx += 1;
66
- autofreeze = AddCheckBox(oe, "Blow", spring.IsAutoFreeze());
67
+ autofreeze = AddCheckBox(firstrowPanel, "Blow", spring.IsAutoFreeze());
6768 // oe.ctrlPanel.add(autofreeze = new JCheckBox("Blow", spring.IsAutoFreeze()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6869 // ObjEditor.aConstraints.gridx += 1;
6970 // Return();
....@@ -71,17 +72,20 @@
7172 // ObjEditor.aConstraints.gridx = 0;
7273 //// oe.ctrlPanel.add(resetButton = new cButton("Reset"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7374 //// ObjEditor.aConstraints.gridx += 1;
74
- fastnormals = AddCheckBox(oe, "Fast", spring.IsFastNormals());
75
+ fastnormals = AddCheckBox(firstrowPanel, "Fast", spring.IsFastNormals());
7576 // oe.ctrlPanel.add(fastnormals = new JCheckBox("Fast", spring.IsFastNormals()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7677 // ObjEditor.aConstraints.gridx += 1;
77
- springs = AddCheckBox(oe, "Show", spring.showsprings);
78
+ springs = AddCheckBox(firstrowPanel, "Show", spring.showsprings);
7879 // oe.ctrlPanel.add(springs = new JCheckBox("Springs", spring.showsprings), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7980 // ObjEditor.aConstraints.gridx += 1;
80
- info = AddCheckBox(oe, "Info", spring.ShowInfo());
81
+ info = AddCheckBox(firstrowPanel, "Info", spring.ShowInfo());
8182 // oe.ctrlPanel.add(info = new JCheckBox("Info", spring.ShowInfo()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
82
- Return();
83
+ oe.ctrlPanel.add(firstrowPanel);
84
+ oe.ctrlPanel.Return();
8385 // ObjEditor.aConstraints.gridy += 1;
8486 // ObjEditor.aConstraints.gridx = 0;
87
+
88
+ stiffnessPanel = AddSlider(oe.ctrlPanel, "Stiffness:", 0, 20.0, Math.log(spring.K+1), 1);
8589
8690 // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
8791 // ObjEditor.aConstraints.gridwidth = 1;
....@@ -96,8 +100,9 @@
96100 // ObjEditor.aConstraints.gridwidth = 1;
97101 // //ObjEditor.aConstraints.fill = 0;
98102 // ObjEditor.aConstraints.gridx -= 1;
99
- stiffnessField = AddSlider(oe.ctrlPanel, "Stiffness:", 0, 20.0, Math.log(spring.K+1), 1);
100
- Return();
103
+ stiffnessField = (cNumberSlider)stiffnessPanel.getComponent(1);
104
+ oe.ctrlPanel.Return();
105
+ massPanel = AddSlider(oe.ctrlPanel, "Mass:", 0, 20.0, Math.log(spring.M+1), 1);
101106
102107 // oe.ctrlPanel.add(massLabel = new JLabel("Mass"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
103108 // massLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -109,8 +114,9 @@
109114 // ObjEditor.aConstraints.gridwidth = 1;
110115 // //ObjEditor.aConstraints.fill = 0;
111116 // ObjEditor.aConstraints.gridx -= 1;
112
- massField = AddSlider(oe.ctrlPanel, "Mass:", 0, 20.0, Math.log(spring.M+1), 1);
113
- Return();
117
+ massField = (cNumberSlider)massPanel.getComponent(1);
118
+ oe.ctrlPanel.Return();
119
+ gravityPanel = AddSlider(oe.ctrlPanel, "Gravity:", 0, 20.0, Math.log(spring.G.acceleration+1), 1);
114120
115121 // oe.ctrlPanel.add(gravityLabel = new JLabel("Gravity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
116122 // gravityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -122,8 +128,9 @@
122128 // ObjEditor.aConstraints.gridwidth = 1;
123129 // //ObjEditor.aConstraints.fill = 0;
124130 // ObjEditor.aConstraints.gridx -= 1;
125
- gravityField = AddSlider(oe.ctrlPanel, "Gravity:", 0, 20.0, Math.log(spring.G.acceleration+1), 1);
126
- Return();
131
+ gravityField = (cNumberSlider)gravityPanel.getComponent(1);
132
+ oe.ctrlPanel.Return();
133
+ normalPanel = AddSlider(oe.ctrlPanel, "Normal:", 0, 20.0, Math.log(spring.normalpush+1), 1);
127134
128135 // oe.ctrlPanel.add(normalLabel = new JLabel("Normal"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
129136 // normalLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -135,8 +142,9 @@
135142 // ObjEditor.aConstraints.gridwidth = 1;
136143 // //ObjEditor.aConstraints.fill = 0;
137144 // ObjEditor.aConstraints.gridx -= 1;
138
- normalField = AddSlider(oe.ctrlPanel, "Normal:", 0, 20.0, Math.log(spring.normalpush+1), 1);
139
- Return();
145
+ normalField = (cNumberSlider)normalPanel.getComponent(1);
146
+ oe.ctrlPanel.Return();
147
+ restlengthPanel = AddSlider(oe.ctrlPanel, "Restlength:", 0, 2.0, spring.restlengthFactor, 1);
140148
141149 /**/
142150 // oe.ctrlPanel.add(thicknessLabel = new JLabel("Restlength"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
....@@ -149,8 +157,9 @@
149157 // ObjEditor.aConstraints.gridwidth = 1;
150158 // //ObjEditor.aConstraints.fill = 0;
151159 // ObjEditor.aConstraints.gridx -= 1;
152
- restlengthField = AddSlider(oe.ctrlPanel, "Restlength:", 0, 2.0, spring.restlengthFactor, 1);
153
- Return();
160
+ restlengthField = (cNumberSlider)restlengthPanel.getComponent(1);
161
+ oe.ctrlPanel.Return();
162
+ distortionPanel = AddSlider(oe.ctrlPanel, "Distortion:", 0, 2.0, spring.distortion, 1);
154163
155164 // oe.ctrlPanel.add(distortionLabel = new JLabel("Distortion"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
156165 // distortionLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -162,9 +171,10 @@
162171 // ObjEditor.aConstraints.gridwidth = 1;
163172 // //ObjEditor.aConstraints.fill = 0;
164173 // ObjEditor.aConstraints.gridx -= 1;
165
- distortionField = AddSlider(oe.ctrlPanel, "Distortion:", 0, 2.0, spring.distortion, 1);
166
- Return();
174
+ distortionField = (cNumberSlider)distortionPanel.getComponent(1);
175
+ oe.ctrlPanel.Return();
167176 /**/
177
+ limitPanel = AddSlider(oe.ctrlPanel, "Limit:", 0, 20.0, Math.log(spring.limit+1), 1);
168178
169179 // oe.ctrlPanel.add(limitLabel = new JLabel("Limit"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
170180 // limitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -176,8 +186,9 @@
176186 // ObjEditor.aConstraints.gridwidth = 1;
177187 // //ObjEditor.aConstraints.fill = 0;
178188 // ObjEditor.aConstraints.gridx -= 1;
179
- limitField = AddSlider(oe.ctrlPanel, "Limit:", 0, 20.0, Math.log(spring.limit+1), 1);
180
- Return();
189
+ limitField = (cNumberSlider)limitPanel.getComponent(1);
190
+ oe.ctrlPanel.Return();
191
+ viscosityPanel = AddSlider(oe.ctrlPanel, "Viscosity:", 0, 20.0, Math.log(spring.W.wind+1), 1);
181192
182193 // oe.ctrlPanel.add(viscosityLabel = new JLabel("Viscosity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
183194 // viscosityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -189,8 +200,9 @@
189200 // ObjEditor.aConstraints.gridwidth = 1;
190201 // //ObjEditor.aConstraints.fill = 0;
191202 // ObjEditor.aConstraints.gridx -= 1;
192
- viscosityField = AddSlider(oe.ctrlPanel, "Viscosity:", 0, 20.0, Math.log(spring.W.wind+1), 1);
193
- Return();
203
+ viscosityField = (cNumberSlider)viscosityPanel.getComponent(1);
204
+ oe.ctrlPanel.Return();
205
+ fluidspeedPanel = AddSlider(oe.ctrlPanel, "Speed:", 0, 20.0, Math.log(spring.W.speed+1), 1);
194206
195207 // oe.ctrlPanel.add(fluidspeedLabel = new JLabel("Speed"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
196208 // fluidspeedLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -202,8 +214,9 @@
202214 // ObjEditor.aConstraints.gridwidth = 1;
203215 // //ObjEditor.aConstraints.fill = 0;
204216 // ObjEditor.aConstraints.gridx -= 1;
205
- fluidspeedField = AddSlider(oe.ctrlPanel, "Speed:", 0, 20.0, Math.log(spring.W.speed+1), 1);
206
- Return();
217
+ fluidspeedField = (cNumberSlider)fluidspeedPanel.getComponent(1);
218
+ oe.ctrlPanel.Return();
219
+ liftPanel = AddSlider(oe.ctrlPanel, "Lift:", 0, 1.0, spring.W.lift, 1);
207220
208221 // oe.ctrlPanel.add(liftLabel = new JLabel("Lift"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
209222 // liftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -215,8 +228,9 @@
215228 // ObjEditor.aConstraints.gridwidth = 1;
216229 // //ObjEditor.aConstraints.fill = 0;
217230 // ObjEditor.aConstraints.gridx -= 1;
218
- liftField = AddSlider(oe.ctrlPanel, "Lift:", 0, 1.0, spring.W.lift, 1);
219
- Return();
231
+ liftField = (cNumberSlider)liftPanel.getComponent(1);
232
+ oe.ctrlPanel.Return();
233
+ frictionPanel = AddSlider(oe.ctrlPanel, "Friction:", 0, 1.0, spring.friction, 1);
220234
221235 // oe.ctrlPanel.add(frictionLabel = new JLabel("Friction"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
222236 // frictionLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -228,8 +242,9 @@
228242 // ObjEditor.aConstraints.gridwidth = 1;
229243 // //ObjEditor.aConstraints.fill = 0;
230244 // ObjEditor.aConstraints.gridx -= 1;
231
- frictionField = AddSlider(oe.ctrlPanel, "Friction:", 0, 1.0, spring.friction, 1);
232
- Return();
245
+ frictionField = (cNumberSlider)frictionPanel.getComponent(1);
246
+ oe.ctrlPanel.Return();
247
+ timestepPanel = AddSlider(oe.ctrlPanel, "Timestep:", 0, 1.0, spring.timestep, 1);
233248
234249 // oe.ctrlPanel.add(timestepLabel = new JLabel("Timestep"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
235250 // timestepLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -241,8 +256,9 @@
241256 // ObjEditor.aConstraints.gridwidth = 1;
242257 // //ObjEditor.aConstraints.fill = 0;
243258 // ObjEditor.aConstraints.gridx -= 1;
244
- timestepField = AddSlider(oe.ctrlPanel, "Timestep:", 0, 1.0, spring.timestep, 1);
245
- Return();
259
+ timestepField = (cNumberSlider)timestepPanel.getComponent(1);
260
+ oe.ctrlPanel.Return();
261
+ poseslownessPanel = AddSlider(oe.ctrlPanel, "Slowness:", 0, 100.0, spring.slowness, 1);
246262
247263 // oe.ctrlPanel.add(poseslownessLabel = new JLabel("Slowness"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
248264 // timestepLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -254,8 +270,9 @@
254270 // ObjEditor.aConstraints.gridwidth = 1;
255271 // //ObjEditor.aConstraints.fill = 0;
256272 // ObjEditor.aConstraints.gridx -= 1;
257
- poseslownessField = AddSlider(oe.ctrlPanel, "Slowness:", 0, 100.0, spring.slowness, 1);
258
- Return();
273
+ poseslownessField = (cNumberSlider)poseslownessPanel.getComponent(1);
274
+ oe.ctrlPanel.Return();
275
+ dampingPanel = AddSlider(oe.ctrlPanel, "Damping:", 0, 20.0, -Math.log(spring.damping)*10, 1);
259276
260277 // oe.ctrlPanel.add(dampingLabel = new JLabel("Damping"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
261278 // dampingLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -267,8 +284,9 @@
267284 // ObjEditor.aConstraints.gridwidth = 1;
268285 // //ObjEditor.aConstraints.fill = 0;
269286 // ObjEditor.aConstraints.gridx -= 1;
270
- dampingField = AddSlider(oe.ctrlPanel, "Damping:", 0, 20.0, -Math.log(spring.damping)*10, 1);
271
- Return();
287
+ dampingField = (cNumberSlider)dampingPanel.getComponent(1);
288
+ oe.ctrlPanel.Return();
289
+ solidityPanel = AddSlider(oe.ctrlPanel, "Solidity:", 0, 20.0, Math.log(spring.solidity+1), 1);
272290
273291 // oe.ctrlPanel.add(solidityLabel = new JLabel("Solidity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
274292 // solidityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -280,8 +298,8 @@
280298 // ObjEditor.aConstraints.gridwidth = 1;
281299 // //ObjEditor.aConstraints.fill = 0;
282300 // ObjEditor.aConstraints.gridx -= 1;
283
- solidityField = AddSlider(oe.ctrlPanel, "Solidity:", 0, 20.0, Math.log(spring.solidity+1), 1);
284
- Return();
301
+ solidityField = (cNumberSlider)solidityPanel.getComponent(1);
302
+ oe.ctrlPanel.Return();
285303
286304 //System.out.println("K = " + spring.K + "; G = " + spring.G.acceleration + "; H = " + spring.H + "; V = " + spring.W.wind);
287305
....@@ -316,52 +334,61 @@
316334 // solidityField.setFloat(Math.log(spring.solidity+1));
317335 // solidityField.addChangeListener(this);
318336
337
+ secondrowPanel = new cGridBag();
338
+
319339 // ObjEditor.aConstraints.gridwidth = 1;
320340 // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
321341 // oe.ctrlPanel.add(revertButton = new cButton("Revert"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
322342 // ObjEditor.aConstraints.gridx += 1;
323
- revertButton = AddButton(oe, "Revert");
343
+ revertButton = AddButton(secondrowPanel, "Revert");
324344 // oe.ctrlPanel.add(epsequal = new JCheckBox("Eps", spring.IsEpsEqual()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
325345 // ObjEditor.aConstraints.gridx += 1;
326
- epsequal = AddCheckBox(oe, "Eps", spring.IsEpsEqual());
346
+ epsequal = AddCheckBox(secondrowPanel, "Eps", spring.IsEpsEqual());
327347 // oe.ctrlPanel.add(linkUV = new JCheckBox("link UV", spring.IsLinkUV()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
328348 // ObjEditor.aConstraints.gridy += 1;
329349 // ObjEditor.aConstraints.gridx = 0;
330
- linkUV = AddCheckBox(oe, "UV", spring.IsLinkUV());
350
+ linkUV = AddCheckBox(secondrowPanel, "UV", spring.IsLinkUV());
331351 // oe.ctrlPanel.add(poseCB = new JCheckBox("Change:", spring.IsPoseMesh()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
332352 // ObjEditor.aConstraints.gridx += 1;
333
- poseCB = AddCheckBox(oe, "Loop", spring.IsPoseMesh());
353
+ poseCB = AddCheckBox(secondrowPanel, "Loop", spring.IsPoseMesh());
334354 // oe.ctrlPanel.add(poseButton = new cButton("Pose"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
335355 // ObjEditor.aConstraints.gridy += 1;
336356 // ObjEditor.aConstraints.gridx = 0;
337
- poseButton = AddButton(oe, "Pose");
338
- Return();
339
-
340
- poseField = AddSlider(oe.ctrlPanel, "Pose:", 0, spring.posegroup==null?0:spring.posegroup.size()-1, spring.poseid);
341
- Return();
357
+ poseButton = AddButton(secondrowPanel, "Pose");
342358
359
+ oe.ctrlPanel.add(secondrowPanel);
360
+ oe.ctrlPanel.Return();
361
+
362
+ posePanel = AddSlider(oe.ctrlPanel, "Pose:", 0, spring.posegroup==null?0:spring.posegroup.size()-1, spring.poseid);
363
+
364
+ poseField = (cNumberSlider)posePanel.getComponent(1);
365
+ oe.ctrlPanel.Return();
366
+
367
+ thirdrowPanel = new cGridBag();
368
+
343369 // oe.ctrlPanel.add(solid = new JCheckBox("Solid", spring.IsSolid()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
344370 // ObjEditor.aConstraints.gridx += 1;
345
- solid = AddCheckBox(oe, "3D", spring.IsSolid());
371
+ solid = AddCheckBox(thirdrowPanel, "3D", spring.IsSolid());
346372 // oe.ctrlPanel.add(soft = new JCheckBox("Soft", spring.IsSoft()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
347373 // ObjEditor.aConstraints.gridy += 1;
348374 // ObjEditor.aConstraints.gridx = 0;
349
- soft = AddCheckBox(oe, "Soft", spring.IsSoft());
375
+ soft = AddCheckBox(thirdrowPanel, "Soft", spring.IsSoft());
350376 // oe.ctrlPanel.add(fold = new JCheckBox("Fold", spring.IsFold()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
351377 // ObjEditor.aConstraints.gridx += 1;
352
- fold = AddCheckBox(oe, "Fold", spring.IsFold());
378
+ fold = AddCheckBox(thirdrowPanel, "Fold", spring.IsFold());
353379 // oe.ctrlPanel.add(unfold = new JCheckBox("Unfold", spring.IsUnfold()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
354380 // ObjEditor.aConstraints.gridx += 1;
355
- unfold = AddCheckBox(oe, "Unf", spring.IsUnfold());
381
+ unfold = AddCheckBox(thirdrowPanel, "Unf", spring.IsUnfold());
356382 // oe.ctrlPanel.add(normalizeCounts = new JCheckBox("Counts", spring.IsNormalize()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
357383 // ObjEditor.aConstraints.gridx += 1;
358384 // ObjEditor.aConstraints.gridy += 1;
359385 // ObjEditor.aConstraints.gridx = 0;
360
- normalizeCounts = AddCheckBox(oe, "Cnt", spring.IsNormalize());
386
+ normalizeCounts = AddCheckBox(thirdrowPanel, "Cnt", spring.IsNormalize());
361387 // Invariants?... oe.ctrlPanel.add(updatehandles = new JCheckBox("Update handles", spring.IsUpdateHandles()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
362388 // ObjEditor.aConstraints.gridx += 1;
363389
364
- Return();
390
+ oe.ctrlPanel.add(thirdrowPanel);
391
+ oe.ctrlPanel.Return();
365392 // oe.ctrlPanel.add(freezeButton = new cButton(" Freeze "), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
366393 // ObjEditor.aConstraints.gridx += 1;
367394 // oe.ctrlPanel.add(stepButton = new cButton(" Step "), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
....@@ -595,21 +622,40 @@
595622 {
596623 ObjEditor oe = objEditor;
597624
598
- Remove(stiffnessField);
599
- Remove(massField);
600
- Remove(gravityField);
601
- Remove(normalField);
602
- Remove(limitField);
603
- Remove(restlengthField);
604
- Remove(distortionField);
605
- Remove(viscosityField);
606
- Remove(fluidspeedField);
607
- Remove(liftField);
608
- Remove(frictionField);
609
- Remove(timestepField);
610
- Remove(poseslownessField);
611
- Remove(dampingField);
612
- Remove(solidityField);
625
+// Remove(stiffnessField);
626
+// Remove(massField);
627
+// Remove(gravityField);
628
+// Remove(normalField);
629
+// Remove(limitField);
630
+// Remove(restlengthField);
631
+// Remove(distortionField);
632
+// Remove(viscosityField);
633
+// Remove(fluidspeedField);
634
+// Remove(liftField);
635
+// Remove(frictionField);
636
+// Remove(timestepField);
637
+// Remove(poseslownessField);
638
+// Remove(dampingField);
639
+// Remove(solidityField);
640
+ objEditor.ctrlPanel.remove(firstrowPanel);
641
+ objEditor.ctrlPanel.remove(secondrowPanel);
642
+ objEditor.ctrlPanel.remove(thirdrowPanel);
643
+ objEditor.ctrlPanel.remove(stiffnessPanel);
644
+ objEditor.ctrlPanel.remove(massPanel);
645
+ objEditor.ctrlPanel.remove(gravityPanel);
646
+ objEditor.ctrlPanel.remove(normalPanel);
647
+ objEditor.ctrlPanel.remove(limitPanel);
648
+ objEditor.ctrlPanel.remove(restlengthPanel);
649
+ objEditor.ctrlPanel.remove(distortionPanel);
650
+ objEditor.ctrlPanel.remove(viscosityPanel);
651
+ objEditor.ctrlPanel.remove(fluidspeedPanel);
652
+ objEditor.ctrlPanel.remove(liftPanel);
653
+ objEditor.ctrlPanel.remove(frictionPanel);
654
+ objEditor.ctrlPanel.remove(timestepPanel);
655
+ objEditor.ctrlPanel.remove(poseslownessPanel);
656
+ objEditor.ctrlPanel.remove(dampingPanel);
657
+ objEditor.ctrlPanel.remove(solidityPanel);
658
+ objEditor.ctrlPanel.remove(posePanel);
613659 // stiffnessField.removeChangeListener(this);
614660 // massField.removeChangeListener(this);
615661 // gravityField.removeChangeListener(this);
....@@ -754,10 +800,8 @@
754800 cNumberSlider massField;
755801 cNumberSlider gravityField;
756802 cNumberSlider normalField;
757
- cNumberSlider mgravityField;
758803 cNumberSlider fluidspeedField;
759804 cNumberSlider viscosityField;
760
- cNumberSlider floorField;
761805 cNumberSlider limitField;
762806 cNumberSlider restlengthField;
763807 cNumberSlider distortionField;
....@@ -770,6 +814,27 @@
770814
771815 cNumberSlider poseField;
772816
817
+ cGridBag firstrowPanel;
818
+ cGridBag secondrowPanel;
819
+ cGridBag thirdrowPanel;
820
+
821
+ cGridBag stiffnessPanel;
822
+ cGridBag massPanel;
823
+ cGridBag gravityPanel;
824
+ cGridBag normalPanel;
825
+ cGridBag fluidspeedPanel;
826
+ cGridBag viscosityPanel;
827
+ cGridBag limitPanel;
828
+ cGridBag restlengthPanel;
829
+ cGridBag distortionPanel;
830
+ cGridBag dampingPanel;
831
+ cGridBag frictionPanel;
832
+ cGridBag liftPanel;
833
+ cGridBag poseslownessPanel;
834
+ cGridBag solidityPanel;
835
+ cGridBag timestepPanel;
836
+ cGridBag posePanel;
837
+
773838 // JCheckBox animate;
774839 JCheckBox thick;
775840 JCheckBox single;