Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
cSpringEditor.java
....@@ -4,9 +4,10 @@
44 import javax.swing.*;
55 import javax.swing.event.*;
66
7
+import grafeme.ui.*;
8
+
79 class cSpringEditor extends ObjEditor implements ItemListener, ChangeListener, ObjectUI, ActionListener
810 {
9
-
1011 cSpringEditor(cSpring inBP, GroupEditor callee)
1112 {
1213 super(inBP, callee);
....@@ -51,17 +52,19 @@
5152 {
5253 super.SetupUI2(oe);
5354
55
+ firstrowPanel = new cGridBag();
56
+
5457 //// oe.ctrlPanel.add(animate = new JCheckBox("Live", spring.live), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
5558 //// ObjEditor.aConstraints.gridx += 1;
56
- freezeButton = AddButton(oe, "Freeze");
59
+ freezeButton = AddButton(firstrowPanel, "Freeze");
5760 // oe.ctrlPanel.add(freezeButton = new cButton("Freeze"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
5861 // ObjEditor.aConstraints.gridx += 1;
5962 //// oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6063 //// ObjEditor.aConstraints.gridx += 1;
61
- avoiderButton = AddButton(oe, "Avoid");
64
+ avoiderButton = AddButton(firstrowPanel, "Avoid");
6265 // oe.ctrlPanel.add(avoiderButton = new cButton("Avoid"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6366 // ObjEditor.aConstraints.gridx += 1;
64
- autofreeze = AddCheckBox(oe, "Blow", spring.IsAutoFreeze());
67
+ autofreeze = AddCheckBox(firstrowPanel, "Blow", spring.IsAutoFreeze());
6568 // oe.ctrlPanel.add(autofreeze = new JCheckBox("Blow", spring.IsAutoFreeze()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
6669 // ObjEditor.aConstraints.gridx += 1;
6770 // Return();
....@@ -69,17 +72,20 @@
6972 // ObjEditor.aConstraints.gridx = 0;
7073 //// oe.ctrlPanel.add(resetButton = new cButton("Reset"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7174 //// ObjEditor.aConstraints.gridx += 1;
72
- fastnormals = AddCheckBox(oe, "Fast", spring.IsFastNormals());
75
+ fastnormals = AddCheckBox(firstrowPanel, "Fast", spring.IsFastNormals());
7376 // oe.ctrlPanel.add(fastnormals = new JCheckBox("Fast", spring.IsFastNormals()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7477 // ObjEditor.aConstraints.gridx += 1;
75
- springs = AddCheckBox(oe, "Show", spring.showsprings);
78
+ springs = AddCheckBox(firstrowPanel, "Show", spring.showsprings);
7679 // oe.ctrlPanel.add(springs = new JCheckBox("Springs", spring.showsprings), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
7780 // ObjEditor.aConstraints.gridx += 1;
78
- info = AddCheckBox(oe, "Info", spring.ShowInfo());
81
+ info = AddCheckBox(firstrowPanel, "Info", spring.ShowInfo());
7982 // oe.ctrlPanel.add(info = new JCheckBox("Info", spring.ShowInfo()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
80
- Return();
83
+ oe.ctrlPanel.add(firstrowPanel);
84
+ oe.ctrlPanel.Return();
8185 // ObjEditor.aConstraints.gridy += 1;
8286 // ObjEditor.aConstraints.gridx = 0;
87
+
88
+ stiffnessPanel = AddSlider(oe.ctrlPanel, "Stiffness:", 0, 20.0, Math.log(spring.K+1), 1);
8389
8490 // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
8591 // ObjEditor.aConstraints.gridwidth = 1;
....@@ -94,8 +100,9 @@
94100 // ObjEditor.aConstraints.gridwidth = 1;
95101 // //ObjEditor.aConstraints.fill = 0;
96102 // ObjEditor.aConstraints.gridx -= 1;
97
- stiffnessField = AddSlider(oe.ctrlPanel, "Stiffness:", 0, 20.0, Math.log(spring.K+1), 1);
98
- 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);
99106
100107 // oe.ctrlPanel.add(massLabel = new JLabel("Mass"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
101108 // massLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -107,8 +114,9 @@
107114 // ObjEditor.aConstraints.gridwidth = 1;
108115 // //ObjEditor.aConstraints.fill = 0;
109116 // ObjEditor.aConstraints.gridx -= 1;
110
- massField = AddSlider(oe.ctrlPanel, "Mass:", 0, 20.0, Math.log(spring.M+1), 1);
111
- 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);
112120
113121 // oe.ctrlPanel.add(gravityLabel = new JLabel("Gravity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
114122 // gravityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -120,8 +128,9 @@
120128 // ObjEditor.aConstraints.gridwidth = 1;
121129 // //ObjEditor.aConstraints.fill = 0;
122130 // ObjEditor.aConstraints.gridx -= 1;
123
- gravityField = AddSlider(oe.ctrlPanel, "Gravity:", 0, 20.0, Math.log(spring.G.acceleration+1), 1);
124
- 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);
125134
126135 // oe.ctrlPanel.add(normalLabel = new JLabel("Normal"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
127136 // normalLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -133,8 +142,9 @@
133142 // ObjEditor.aConstraints.gridwidth = 1;
134143 // //ObjEditor.aConstraints.fill = 0;
135144 // ObjEditor.aConstraints.gridx -= 1;
136
- normalField = AddSlider(oe.ctrlPanel, "Normal:", 0, 20.0, Math.log(spring.normalpush+1), 1);
137
- Return();
145
+ normalField = (cNumberSlider)normalPanel.getComponent(1);
146
+ oe.ctrlPanel.Return();
147
+ restlengthPanel = AddSlider(oe.ctrlPanel, "Restlength:", 0, 2.0, spring.restlengthFactor, 1);
138148
139149 /**/
140150 // oe.ctrlPanel.add(thicknessLabel = new JLabel("Restlength"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
....@@ -147,8 +157,9 @@
147157 // ObjEditor.aConstraints.gridwidth = 1;
148158 // //ObjEditor.aConstraints.fill = 0;
149159 // ObjEditor.aConstraints.gridx -= 1;
150
- restlengthField = AddSlider(oe.ctrlPanel, "Restlength:", 0, 2.0, spring.restlengthFactor, 1);
151
- Return();
160
+ restlengthField = (cNumberSlider)restlengthPanel.getComponent(1);
161
+ oe.ctrlPanel.Return();
162
+ distortionPanel = AddSlider(oe.ctrlPanel, "Distortion:", 0, 2.0, spring.distortion, 1);
152163
153164 // oe.ctrlPanel.add(distortionLabel = new JLabel("Distortion"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
154165 // distortionLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -160,9 +171,10 @@
160171 // ObjEditor.aConstraints.gridwidth = 1;
161172 // //ObjEditor.aConstraints.fill = 0;
162173 // ObjEditor.aConstraints.gridx -= 1;
163
- distortionField = AddSlider(oe.ctrlPanel, "Distortion:", 0, 2.0, spring.distortion, 1);
164
- Return();
174
+ distortionField = (cNumberSlider)distortionPanel.getComponent(1);
175
+ oe.ctrlPanel.Return();
165176 /**/
177
+ limitPanel = AddSlider(oe.ctrlPanel, "Limit:", 0, 20.0, Math.log(spring.limit+1), 1);
166178
167179 // oe.ctrlPanel.add(limitLabel = new JLabel("Limit"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
168180 // limitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -174,8 +186,9 @@
174186 // ObjEditor.aConstraints.gridwidth = 1;
175187 // //ObjEditor.aConstraints.fill = 0;
176188 // ObjEditor.aConstraints.gridx -= 1;
177
- limitField = AddSlider(oe.ctrlPanel, "Limit:", 0, 20.0, Math.log(spring.limit+1), 1);
178
- 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);
179192
180193 // oe.ctrlPanel.add(viscosityLabel = new JLabel("Viscosity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
181194 // viscosityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -187,8 +200,9 @@
187200 // ObjEditor.aConstraints.gridwidth = 1;
188201 // //ObjEditor.aConstraints.fill = 0;
189202 // ObjEditor.aConstraints.gridx -= 1;
190
- viscosityField = AddSlider(oe.ctrlPanel, "Viscosity:", 0, 20.0, Math.log(spring.W.wind+1), 1);
191
- 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);
192206
193207 // oe.ctrlPanel.add(fluidspeedLabel = new JLabel("Speed"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
194208 // fluidspeedLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -200,8 +214,9 @@
200214 // ObjEditor.aConstraints.gridwidth = 1;
201215 // //ObjEditor.aConstraints.fill = 0;
202216 // ObjEditor.aConstraints.gridx -= 1;
203
- fluidspeedField = AddSlider(oe.ctrlPanel, "Speed:", 0, 20.0, Math.log(spring.W.speed+1), 1);
204
- Return();
217
+ fluidspeedField = (cNumberSlider)fluidspeedPanel.getComponent(1);
218
+ oe.ctrlPanel.Return();
219
+ liftPanel = AddSlider(oe.ctrlPanel, "Lift:", 0, 1.0, spring.W.lift, 1);
205220
206221 // oe.ctrlPanel.add(liftLabel = new JLabel("Lift"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
207222 // liftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -213,8 +228,9 @@
213228 // ObjEditor.aConstraints.gridwidth = 1;
214229 // //ObjEditor.aConstraints.fill = 0;
215230 // ObjEditor.aConstraints.gridx -= 1;
216
- liftField = AddSlider(oe.ctrlPanel, "Lift:", 0, 1.0, spring.W.lift, 1);
217
- Return();
231
+ liftField = (cNumberSlider)liftPanel.getComponent(1);
232
+ oe.ctrlPanel.Return();
233
+ frictionPanel = AddSlider(oe.ctrlPanel, "Friction:", 0, 1.0, spring.friction, 1);
218234
219235 // oe.ctrlPanel.add(frictionLabel = new JLabel("Friction"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
220236 // frictionLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -226,8 +242,9 @@
226242 // ObjEditor.aConstraints.gridwidth = 1;
227243 // //ObjEditor.aConstraints.fill = 0;
228244 // ObjEditor.aConstraints.gridx -= 1;
229
- frictionField = AddSlider(oe.ctrlPanel, "Friction:", 0, 1.0, spring.friction, 1);
230
- Return();
245
+ frictionField = (cNumberSlider)frictionPanel.getComponent(1);
246
+ oe.ctrlPanel.Return();
247
+ timestepPanel = AddSlider(oe.ctrlPanel, "Timestep:", 0, 1.0, spring.timestep, 1);
231248
232249 // oe.ctrlPanel.add(timestepLabel = new JLabel("Timestep"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
233250 // timestepLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -239,8 +256,9 @@
239256 // ObjEditor.aConstraints.gridwidth = 1;
240257 // //ObjEditor.aConstraints.fill = 0;
241258 // ObjEditor.aConstraints.gridx -= 1;
242
- timestepField = AddSlider(oe.ctrlPanel, "Timestep:", 0, 1.0, spring.timestep, 1);
243
- Return();
259
+ timestepField = (cNumberSlider)timestepPanel.getComponent(1);
260
+ oe.ctrlPanel.Return();
261
+ poseslownessPanel = AddSlider(oe.ctrlPanel, "Slowness:", 0, 100.0, spring.slowness, 1);
244262
245263 // oe.ctrlPanel.add(poseslownessLabel = new JLabel("Slowness"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
246264 // timestepLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -252,8 +270,9 @@
252270 // ObjEditor.aConstraints.gridwidth = 1;
253271 // //ObjEditor.aConstraints.fill = 0;
254272 // ObjEditor.aConstraints.gridx -= 1;
255
- poseslownessField = AddSlider(oe.ctrlPanel, "Slowness:", 0, 100.0, spring.slowness, 1);
256
- 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);
257276
258277 // oe.ctrlPanel.add(dampingLabel = new JLabel("Damping"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
259278 // dampingLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -265,8 +284,9 @@
265284 // ObjEditor.aConstraints.gridwidth = 1;
266285 // //ObjEditor.aConstraints.fill = 0;
267286 // ObjEditor.aConstraints.gridx -= 1;
268
- dampingField = AddSlider(oe.ctrlPanel, "Damping:", 0, 20.0, -Math.log(spring.damping)*10, 1);
269
- 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);
270290
271291 // oe.ctrlPanel.add(solidityLabel = new JLabel("Solidity"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
272292 // solidityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -278,8 +298,8 @@
278298 // ObjEditor.aConstraints.gridwidth = 1;
279299 // //ObjEditor.aConstraints.fill = 0;
280300 // ObjEditor.aConstraints.gridx -= 1;
281
- solidityField = AddSlider(oe.ctrlPanel, "Solidity:", 0, 20.0, Math.log(spring.solidity+1), 1);
282
- Return();
301
+ solidityField = (cNumberSlider)solidityPanel.getComponent(1);
302
+ oe.ctrlPanel.Return();
283303
284304 //System.out.println("K = " + spring.K + "; G = " + spring.G.acceleration + "; H = " + spring.H + "; V = " + spring.W.wind);
285305
....@@ -314,52 +334,61 @@
314334 // solidityField.setFloat(Math.log(spring.solidity+1));
315335 // solidityField.addChangeListener(this);
316336
337
+ secondrowPanel = new cGridBag();
338
+
317339 // ObjEditor.aConstraints.gridwidth = 1;
318340 // ObjEditor.aConstraints.anchor = GridBagConstraints.WEST;
319341 // oe.ctrlPanel.add(revertButton = new cButton("Revert"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
320342 // ObjEditor.aConstraints.gridx += 1;
321
- revertButton = AddButton(oe, "Revert");
343
+ revertButton = AddButton(secondrowPanel, "Revert");
322344 // oe.ctrlPanel.add(epsequal = new JCheckBox("Eps", spring.IsEpsEqual()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
323345 // ObjEditor.aConstraints.gridx += 1;
324
- epsequal = AddCheckBox(oe, "Eps", spring.IsEpsEqual());
346
+ epsequal = AddCheckBox(secondrowPanel, "Eps", spring.IsEpsEqual());
325347 // oe.ctrlPanel.add(linkUV = new JCheckBox("link UV", spring.IsLinkUV()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
326348 // ObjEditor.aConstraints.gridy += 1;
327349 // ObjEditor.aConstraints.gridx = 0;
328
- linkUV = AddCheckBox(oe, "UV", spring.IsLinkUV());
350
+ linkUV = AddCheckBox(secondrowPanel, "UV", spring.IsLinkUV());
329351 // oe.ctrlPanel.add(poseCB = new JCheckBox("Change:", spring.IsPoseMesh()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
330352 // ObjEditor.aConstraints.gridx += 1;
331
- poseCB = AddCheckBox(oe, "Loop", spring.IsPoseMesh());
353
+ poseCB = AddCheckBox(secondrowPanel, "Loop", spring.IsPoseMesh());
332354 // oe.ctrlPanel.add(poseButton = new cButton("Pose"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
333355 // ObjEditor.aConstraints.gridy += 1;
334356 // ObjEditor.aConstraints.gridx = 0;
335
- poseButton = AddButton(oe, "Pose");
336
- Return();
337
-
338
- poseField = AddSlider(oe.ctrlPanel, "Pose:", 0, spring.posegroup==null?0:spring.posegroup.size()-1, spring.poseid);
339
- Return();
357
+ poseButton = AddButton(secondrowPanel, "Pose");
340358
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
+
341369 // oe.ctrlPanel.add(solid = new JCheckBox("Solid", spring.IsSolid()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
342370 // ObjEditor.aConstraints.gridx += 1;
343
- solid = AddCheckBox(oe, "3D", spring.IsSolid());
371
+ solid = AddCheckBox(thirdrowPanel, "3D", spring.IsSolid());
344372 // oe.ctrlPanel.add(soft = new JCheckBox("Soft", spring.IsSoft()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
345373 // ObjEditor.aConstraints.gridy += 1;
346374 // ObjEditor.aConstraints.gridx = 0;
347
- soft = AddCheckBox(oe, "Soft", spring.IsSoft());
375
+ soft = AddCheckBox(thirdrowPanel, "Soft", spring.IsSoft());
348376 // oe.ctrlPanel.add(fold = new JCheckBox("Fold", spring.IsFold()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
349377 // ObjEditor.aConstraints.gridx += 1;
350
- fold = AddCheckBox(oe, "Fold", spring.IsFold());
378
+ fold = AddCheckBox(thirdrowPanel, "Fold", spring.IsFold());
351379 // oe.ctrlPanel.add(unfold = new JCheckBox("Unfold", spring.IsUnfold()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
352380 // ObjEditor.aConstraints.gridx += 1;
353
- unfold = AddCheckBox(oe, "Unf", spring.IsUnfold());
381
+ unfold = AddCheckBox(thirdrowPanel, "Unf", spring.IsUnfold());
354382 // oe.ctrlPanel.add(normalizeCounts = new JCheckBox("Counts", spring.IsNormalize()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
355383 // ObjEditor.aConstraints.gridx += 1;
356384 // ObjEditor.aConstraints.gridy += 1;
357385 // ObjEditor.aConstraints.gridx = 0;
358
- normalizeCounts = AddCheckBox(oe, "Cnt", spring.IsNormalize());
386
+ normalizeCounts = AddCheckBox(thirdrowPanel, "Cnt", spring.IsNormalize());
359387 // Invariants?... oe.ctrlPanel.add(updatehandles = new JCheckBox("Update handles", spring.IsUpdateHandles()), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
360388 // ObjEditor.aConstraints.gridx += 1;
361389
362
- Return();
390
+ oe.ctrlPanel.add(thirdrowPanel);
391
+ oe.ctrlPanel.Return();
363392 // oe.ctrlPanel.add(freezeButton = new cButton(" Freeze "), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
364393 // ObjEditor.aConstraints.gridx += 1;
365394 // oe.ctrlPanel.add(stepButton = new cButton(" Step "), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
....@@ -593,21 +622,40 @@
593622 {
594623 ObjEditor oe = objEditor;
595624
596
- Remove(stiffnessField);
597
- Remove(massField);
598
- Remove(gravityField);
599
- Remove(normalField);
600
- Remove(limitField);
601
- Remove(restlengthField);
602
- Remove(distortionField);
603
- Remove(viscosityField);
604
- Remove(fluidspeedField);
605
- Remove(liftField);
606
- Remove(frictionField);
607
- Remove(timestepField);
608
- Remove(poseslownessField);
609
- Remove(dampingField);
610
- 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);
611659 // stiffnessField.removeChangeListener(this);
612660 // massField.removeChangeListener(this);
613661 // gravityField.removeChangeListener(this);
....@@ -748,26 +796,45 @@
748796 JLabel liftLabel;
749797 JLabel solidityLabel;
750798
751
- NumberSlider stiffnessField;
752
- NumberSlider massField;
753
- NumberSlider gravityField;
754
- NumberSlider normalField;
755
- NumberSlider mgravityField;
756
- NumberSlider fluidspeedField;
757
- NumberSlider viscosityField;
758
- NumberSlider floorField;
759
- NumberSlider limitField;
760
- NumberSlider restlengthField;
761
- NumberSlider distortionField;
762
- NumberSlider frictionField;
763
- NumberSlider timestepField;
764
- NumberSlider poseslownessField;
765
- NumberSlider dampingField;
766
- NumberSlider liftField;
767
- NumberSlider solidityField;
799
+ cNumberSlider stiffnessField;
800
+ cNumberSlider massField;
801
+ cNumberSlider gravityField;
802
+ cNumberSlider normalField;
803
+ cNumberSlider fluidspeedField;
804
+ cNumberSlider viscosityField;
805
+ cNumberSlider limitField;
806
+ cNumberSlider restlengthField;
807
+ cNumberSlider distortionField;
808
+ cNumberSlider frictionField;
809
+ cNumberSlider timestepField;
810
+ cNumberSlider poseslownessField;
811
+ cNumberSlider dampingField;
812
+ cNumberSlider liftField;
813
+ cNumberSlider solidityField;
768814
769
- NumberSlider poseField;
815
+ cNumberSlider poseField;
770816
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
+
771838 // JCheckBox animate;
772839 JCheckBox thick;
773840 JCheckBox single;