Normand Briere
2019-06-23 8088590686a45e71278f9a52bb9cc37943dc0c37
ObjEditor.java
....@@ -19,6 +19,8 @@
1919 import //weka.core.
2020 matrix.Matrix;
2121
22
+import grafeme.ui.*;
23
+
2224 class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI,
2325 ActionListener, ChangeListener,
2426 InputMethodListener,
....@@ -28,7 +30,14 @@
2830 iSendInfo
2931 //KeyListener
3032 {
33
+ boolean timeline;
34
+ boolean wasFullScreen;
3135
36
+ GroupEditor callee;
37
+ JFrame frame;
38
+
39
+ static ObjEditor theFrame;
40
+
3241 // SCRIPT
3342
3443 transient JFrame textpanel = null;
....@@ -119,51 +128,62 @@
119128 void keyPressed(int key, int modifiers)
120129 {
121130 System.out.println("KEY PRESSED");
122
- CameraPane.theRenderer.keyPressed(key, modifiers);
131
+ Globals.theRenderer.keyPressed(key, modifiers);
123132 }
124133 */
125134
126135 static GridBagConstraints aConstraints;
127136 static GridBagConstraints aWindowConstraints;
128
- GroupEditor callee;
129
- JFrame frame;
137
+
130138 static int GRIDWIDTH = 100; // 4;
131139
132140 public void closeUI()
133141 {
134142 //new Exception().printStackTrace();
135
- System.out.println("this = " + this);
136
- System.out.println("objEditor = " + objEditor);
143
+// System.out.println("this = " + this);
144
+// System.out.println("objEditor = " + objEditor);
137145 //nameField.removeActionListener(this);
138
- objEditor.ctrlPanel.remove(nameField);
146
+// objEditor.ctrlPanel.remove(nameField);
147
+
148
+ objEditor.ctrlPanel.remove(namePanel);
139149
140150 if (!GroupEditor.allparams)
141151 return;
142152
143
- objEditor.ctrlPanel.remove(liveCB);
144
- objEditor.ctrlPanel.remove(hideCB);
145
- objEditor.ctrlPanel.remove(markCB);
146
-
147
- objEditor.ctrlPanel.remove(randomCB);
148
- objEditor.ctrlPanel.remove(speedupCB);
149
- objEditor.ctrlPanel.remove(rewindCB);
150
-
151
- objEditor.ctrlPanel.remove(resetButton);
152
- objEditor.ctrlPanel.remove(stepButton);
153
-// objEditor.ctrlPanel.remove(stepAllButton);
154
-// objEditor.ctrlPanel.remove(resetAllButton);
155
- objEditor.ctrlPanel.remove(link2masterCB);
156
- //objEditor.ctrlPanel.remove(flipVCB);
157
- //objEditor.ctrlPanel.remove(texresMenu);
158
- objEditor.ctrlPanel.remove(slowerButton);
159
- objEditor.ctrlPanel.remove(fasterButton);
160
- objEditor.ctrlPanel.remove(remarkButton);
153
+// objEditor.ctrlPanel.remove(liveCB);
154
+// objEditor.ctrlPanel.remove(hideCB);
155
+// objEditor.ctrlPanel.remove(markCB);
156
+//
157
+// objEditor.ctrlPanel.remove(randomCB);
158
+// objEditor.ctrlPanel.remove(speedupCB);
159
+// objEditor.ctrlPanel.remove(rewindCB);
160
+//
161
+// objEditor.ctrlPanel.remove(resetButton);
162
+// objEditor.ctrlPanel.remove(stepButton);
163
+//// objEditor.ctrlPanel.remove(stepAllButton);
164
+//// objEditor.ctrlPanel.remove(resetAllButton);
165
+// objEditor.ctrlPanel.remove(link2masterCB);
166
+// //objEditor.ctrlPanel.remove(flipVCB);
167
+// //objEditor.ctrlPanel.remove(texresMenu);
168
+// objEditor.ctrlPanel.remove(slowerButton);
169
+// objEditor.ctrlPanel.remove(fasterButton);
170
+// objEditor.ctrlPanel.remove(remarkButton);
171
+
172
+ objEditor.ctrlPanel.remove(setupPanel);
173
+ objEditor.ctrlPanel.remove(setupPanel2);
174
+ objEditor.ctrlPanel.remove(commandsPanel);
175
+ objEditor.ctrlPanel.remove(pushPanel);
176
+ //objEditor.ctrlPanel.remove(fillPanel);
177
+
178
+ //Remove(normalpushField);
161179 }
162180
163181 public ObjEditor GetEditor()
164182 {
165183 return objEditor; //.GetEditor();
166184 }
185
+
186
+ // Sometimes myself, sometimes my callee's.
167187 ObjEditor objEditor;
168188
169189 /*
....@@ -226,6 +246,7 @@
226246 //localCopy.parent = null;
227247
228248 frame = new JFrame();
249
+ frame.setUndecorated(true);
229250 objEditor = this;
230251 this.callee = callee;
231252
....@@ -238,7 +259,7 @@
238259 //if (!isDisplayable())
239260 //setUndecorated(true);
240261
241
- System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow());
262
+ //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow());
242263 client = inClient;
243264 copy = localCopy;
244265 copy.editWindow = this;
....@@ -259,24 +280,40 @@
259280 void SetupMenu()
260281 {
261282 frame.setMenuBar(menuBar = new MenuBar());
262
- menuBar.add(windowMenu = new Menu("File"));
263
- windowMenu.add(loadItem = new MenuItem("Load..."));
264
- windowMenu.add("-");
265
- windowMenu.add(saveItem = new MenuItem("Save"));
266
- windowMenu.add(saveAsItem = new MenuItem("Save As..."));
283
+ menuBar.add(fileMenu = new Menu("File"));
284
+ fileMenu.add(newItem = new MenuItem("New"));
285
+ fileMenu.add(loadItem = new MenuItem("Open..."));
286
+
287
+ //oe.menuBar.add(menu = new Menu("Include"));
288
+ Menu menu = new Menu("Import");
289
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
290
+ importOBJItem.addActionListener(this);
291
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
292
+ import3DSItem.addActionListener(this);
293
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
294
+ importVRMLX3DItem.addActionListener(this);
295
+ menu.add("-");
296
+ importGFDItem = menu.add(new MenuItem("Grafreed file..."));
297
+ importGFDItem.addActionListener(this);
298
+ fileMenu.add(menu);
299
+ fileMenu.add("-");
300
+
301
+ fileMenu.add(saveItem = new MenuItem("Save"));
302
+ fileMenu.add(saveAsItem = new MenuItem("Save As..."));
267303 //windowMenu.add(povItem = new MenuItem("Emit POV-Ray..."));
268
- windowMenu.add("-");
269
- windowMenu.add(exportAsItem = new MenuItem("Export Selection..."));
270
- windowMenu.add(reexportItem = new MenuItem("Re-export"));
271
- windowMenu.add("-");
304
+ fileMenu.add("-");
305
+ fileMenu.add(exportAsItem = new MenuItem("Export Selection..."));
306
+ fileMenu.add(reexportItem = new MenuItem("Re-export"));
307
+ fileMenu.add("-");
272308 if (client.parent != null)
273309 {
274
- windowMenu.add(closeItem = new MenuItem("Close"));
310
+ fileMenu.add(closeItem = new MenuItem("Close"));
275311 } else
276312 {
277
- windowMenu.add(closeItem = new MenuItem("Exit"));
313
+ fileMenu.add(closeItem = new MenuItem("Exit"));
278314 }
279315
316
+ newItem.addActionListener(this);
280317 loadItem.addActionListener(this);
281318 saveItem.addActionListener(this);
282319 saveAsItem.addActionListener(this);
....@@ -285,77 +322,26 @@
285322 //povItem.addActionListener(this);
286323 closeItem.addActionListener(this);
287324
288
- menuBar.add(cameraMenu = new Menu("View"));
289
- //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
290
- //zBufferItem.addActionListener(this);
291
- //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
292
- //normalLensItem.addActionListener(this);
293
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
294
- revertCameraItem.addActionListener(this);
295
- cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen"));
296
- toggleFullItem.addItemListener(this);
297
- toggleFullItem.setState(CameraPane.FULLSCREEN);
298
- cameraMenu.add("-");
299
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
300
- toggleTextureItem.addItemListener(this);
301
- toggleTextureItem.setState(CameraPane.textureon);
302
- cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
303
- toggleLiveItem.addItemListener(this);
304
- toggleLiveItem.setState(CameraPane.isLIVE());
305
- cameraMenu.add(stepItem = new MenuItem("Step"));
306
- stepItem.addActionListener(this);
307
-// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
308
-// toggleDLItem.addItemListener(this);
309
-// toggleDLItem.setState(false);
310
- cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
311
- toggleRenderItem.addItemListener(this);
312
- toggleRenderItem.setState(!CameraPane.frozen);
313
- cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
314
- toggleDebugItem.addItemListener(this);
315
- toggleDebugItem.setState(CameraPane.DEBUG);
316
- cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
317
- toggleFrustumItem.addItemListener(this);
318
- toggleFrustumItem.setState(CameraPane.FRUSTUM);
319
- cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
320
- toggleFootContactItem.addItemListener(this);
321
- toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
322
- cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random"));
323
- toggleRandomItem.addItemListener(this);
324
- toggleRandomItem.setState(CameraPane.RANDOM);
325
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
326
- toggleHandleItem.addItemListener(this);
327
- toggleHandleItem.setState(CameraPane.HANDLES);
328
- cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
329
- togglePaintItem.addItemListener(this);
330
- togglePaintItem.setState(CameraPane.PAINTMODE);
331
-// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
332
-// toggleRootItem.addItemListener(this);
333
-// toggleRootItem.setState(false);
334
-// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
335
-// animationItem.addItemListener(this);
336
-// animationItem.setState(CameraPane.ANIMATION);
337
- cameraMenu.add("-");
338
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
339
- editCameraItem.addActionListener(this);
340
-
341325 objectPanel = new JTabbedPane();
342326 toolbarPanel = new JPanel();
343327 toolbarPanel.setName("Toolbar");
344
- treePanel = new JPanel();
328
+ treePanel = new cGridBag();
345329 treePanel.setName("Tree");
346
- ctrlPanel = new JPanel(); // new GridBagLayout());
330
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
347331 ctrlPanel.setName("Edit");
348
- materialPanel = new JPanel();
332
+ materialPanel = new cGridBag().setVertical(true);
349333 materialPanel.setName("Material");
350334 /*JTextPane*/
351335 infoarea = createTextPane();
336
+ doc = infoarea.getStyledDocument();
337
+
352338 infoarea.setEditable(true);
353339 SetText();
354340 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
355341 // infoarea.setOpaque(false);
356342 // //infoarea.setForeground(textcolor);
357
- infoarea.setLineWrap(true);
358
- infoarea.setWrapStyleWord(true);
343
+// TEXTAREA infoarea.setLineWrap(true);
344
+// TEXTAREA infoarea.setWrapStyleWord(true);
359345 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
360346 infoPanel.setPreferredSize(new Dimension(50, 200));
361347 infoPanel.setName("Info");
....@@ -366,16 +352,16 @@
366352 mainPanel.setName("Main");
367353 mainPanel.setContinuousLayout(true);
368354 mainPanel.setOneTouchExpandable(true);
369
- mainPanel.setDividerLocation(1.0);
370355 mainPanel.setDividerSize(9);
371
- mainPanel.setResizeWeight(0);
356
+ mainPanel.setDividerLocation(0.5); //1.0);
357
+ mainPanel.setResizeWeight(0.5);
372358
373359 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
374360 //mainPanel.setLayout(new GridBagLayout());
375361 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
376
- treePanel.setLayout(new GridBagLayout());
377
- ctrlPanel.setLayout(new GridBagLayout());
378
- materialPanel.setLayout(new GridBagLayout());
362
+// treePanel.setLayout(new GridBagLayout());
363
+ //ctrlPanel.setLayout(new GridBagLayout());
364
+ //materialPanel.setLayout(new GridBagLayout());
379365
380366 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
381367 GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0);
....@@ -414,7 +400,7 @@
414400 static String newline = "\n";
415401 protected static final String buttonString = "JButton";
416402 StyledDocument doc;
417
- JTextArea infoarea;
403
+ JTextPane infoarea;
418404
419405 void ClearInfo()
420406 {
....@@ -437,10 +423,10 @@
437423 e.printStackTrace();
438424 }
439425
440
- String selection = infoarea.getText();
441
- java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
442
- java.awt.datatransfer.Clipboard clipboard =
443
- Toolkit.getDefaultToolkit().getSystemClipboard();
426
+// String selection = infoarea.getText();
427
+// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
428
+// java.awt.datatransfer.Clipboard clipboard =
429
+// Toolkit.getDefaultToolkit().getSystemClipboard();
444430 //clipboard.setContents(data, data);
445431 }
446432
....@@ -463,13 +449,13 @@
463449 //SendInfo("Name:", "bold");
464450 if (sel.GetTextures() != null || debug)
465451 {
466
- si.SendInfo(sel.toString(), "bold");
452
+ si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold");
467453 //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular");
468454 if (sel.Size() > 0)
469455 {
470456 si.SendInfo("#children = " + sel.Size(), "regular");
471457 }
472
- si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular");
458
+ si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular");
473459 if (debug)
474460 {
475461 try
....@@ -481,7 +467,10 @@
481467 }
482468
483469 if (full)
484
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
470
+ {
471
+ si.SendInfo(" BBox min: " + minima, "regular");
472
+ si.SendInfo(" BBox max: " + maxima, "regular");
473
+ }
485474
486475 if (sel.bRep != null)
487476 {
....@@ -508,7 +497,7 @@
508497 }
509498 if (sel.support != null)
510499 {
511
- si.SendInfo(" support: " + sel.support, "regular");
500
+ si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular");
512501 }
513502 if (sel.scriptnode != null)
514503 {
....@@ -579,6 +568,9 @@
579568 {
580569 CameraPane.pointflow = (PointFlow) sel;
581570 }
571
+
572
+ si.SendInfo("_____________________", "regular");
573
+ si.SendInfo("", "regular");
582574 }
583575 }
584576
....@@ -594,52 +586,138 @@
594586 }
595587 }
596588
597
- private JTextArea createTextPane()
598
- {
599
- String[] initString =
600
- {
601
- "This is an editable JTextPane, ", //regular
602
- "another ", //italic
603
- "styled ", //bold
604
- "text ", //small
605
- "component, ", //large
606
- "which supports embedded components..." + newline,//regular
607
- " " + newline, //button
608
- "...and embedded icons..." + newline, //regular
609
- " ", //icon
610
- newline + "JTextPane is a subclass of JEditorPane that "
611
- + "uses a StyledEditorKit and StyledDocument, and provides "
612
- + "cover methods for interacting with those objects."
613
- };
589
+static GraphicsDevice device = GraphicsEnvironment
590
+ .getLocalGraphicsEnvironment().getScreenDevices()[0];
614591
615
- String[] initStyles =
592
+ Rectangle keeprect;
593
+ cRadio radio;
594
+
595
+cButton keepButton;
596
+ cButton twoButton; // Full 3D
597
+ cButton sixButton;
598
+ cButton threeButton;
599
+ cButton sevenButton;
600
+ cButton fourButton; // full panel
601
+ cButton oneButton; // full XYZ
602
+ //cButton currentLayout;
603
+
604
+ boolean maximized;
605
+
606
+ void Minimize()
616607 {
617
- "regular", "italic", "bold", "small", "large",
618
- "regular", "button", "regular", "icon",
619
- "regular"
620
- };
621
-
622
- JTextPane textPane = new JTextPane();
623
- textPane.setEditable(true);
624
- /*StyledDocument*/ doc = textPane.getStyledDocument();
625
- addStylesToDocument(doc);
626
-
627
- try
608
+ frame.setState(Frame.ICONIFIED);
609
+ }
610
+
611
+ void Maximize()
628612 {
629
- for (int j = 0; j < 2; j++)
613
+ if (maximized)
630614 {
631
- for (int i = 0; i < initString.length; i++)
632
- {
633
- doc.insertString(doc.getLength(), initString[i],
634
- doc.getStyle(initStyles[i]));
635
- }
615
+ frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
636616 }
637
- } catch (BadLocationException ble)
617
+ else
618
+ {
619
+ keeprect = frame.getBounds();
620
+ Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
621
+ Dimension rect2 = frame.getToolkit().getScreenSize();
622
+ frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height);
623
+// frame.setState(Frame.MAXIMIZED_BOTH);
624
+ }
625
+
626
+ maximized ^= true;
627
+ }
628
+
629
+ void ToggleFullScreen()
638630 {
639
- System.err.println("Couldn't insert initial text into text pane.");
631
+ if (CameraPane.FULLSCREEN)
632
+ {
633
+ device.setFullScreenWindow(null);
634
+ //frame.setVisible(false);
635
+// frame.removeNotify();
636
+// frame.setUndecorated(false);
637
+// frame.addNotify();
638
+ //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
639
+
640
+// X frame.getContentPane().remove(/*"Center",*/bigThree);
641
+// X framePanel.add(bigThree);
642
+// X frame.getContentPane().add(/*"Center",*/framePanel);
643
+ framePanel.setDividerLocation(1);
644
+
645
+ //frame.setVisible(true);
646
+ radio.layout = keepButton;
647
+ //theFrame = null;
648
+ keepButton = null;
649
+ radio.layout.doClick();
650
+
651
+ } else
652
+ {
653
+ keepButton = radio.layout;
654
+ //keeprect = frame.getBounds();
655
+// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
656
+// frame.getToolkit().getScreenSize().height);
657
+ //frame.setVisible(false);
658
+ device.setFullScreenWindow(frame);
659
+// frame.removeNotify();
660
+// frame.setUndecorated(true);
661
+// frame.addNotify();
662
+// X frame.getContentPane().remove(/*"Center",*/framePanel);
663
+// X framePanel.remove(bigThree);
664
+// X frame.getContentPane().add(/*"Center",*/bigThree);
665
+ framePanel.setDividerLocation(0);
666
+
667
+ radio.layout = twoButton;
668
+ radio.layout.doClick();
669
+ //frame.setVisible(true);
670
+ }
671
+
672
+ cameraView.ToggleFullScreen();
640673 }
641674
642
- return new JTextArea(); // textPane;
675
+ private JTextPane createTextPane()
676
+ {
677
+// TEXTAREA String[] initString =
678
+// {
679
+// "This is an editable JTextPane, ", //regular
680
+// "another ", //italic
681
+// "styled ", //bold
682
+// "text ", //small
683
+// "component, ", //large
684
+// "which supports embedded components..." + newline,//regular
685
+// " " + newline, //button
686
+// "...and embedded icons..." + newline, //regular
687
+// " ", //icon
688
+// newline + "JTextPane is a subclass of JEditorPane that "
689
+// + "uses a StyledEditorKit and StyledDocument, and provides "
690
+// + "cover methods for interacting with those objects."
691
+// };
692
+//
693
+// String[] initStyles =
694
+// {
695
+// "regular", "italic", "bold", "small", "large",
696
+// "regular", "button", "regular", "icon",
697
+// "regular"
698
+// };
699
+//
700
+// JTextPane textPane = new JTextPane();
701
+// textPane.setEditable(true);
702
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
703
+// addStylesToDocument(doc);
704
+//
705
+// try
706
+// {
707
+// for (int j = 0; j < 2; j++)
708
+// {
709
+// for (int i = 0; i < initString.length; i++)
710
+// {
711
+// doc.insertString(doc.getLength(), initString[i],
712
+// doc.getStyle(initStyles[i]));
713
+// }
714
+// }
715
+// } catch (BadLocationException ble)
716
+// {
717
+// System.err.println("Couldn't insert initial text into text pane.");
718
+// }
719
+
720
+ return new JTextPane(); // textPane;
643721 }
644722
645723 protected void addStylesToDocument(StyledDocument doc)
....@@ -692,7 +770,7 @@
692770 protected static ImageIcon createImageIcon(String path,
693771 String description)
694772 {
695
- java.net.URL imgURL = GrafreeD.class.getResource(path);
773
+ java.net.URL imgURL = Grafreed.class.getResource(path);
696774 if (imgURL != null)
697775 {
698776 return new ImageIcon(imgURL, description);
....@@ -724,6 +802,7 @@
724802 // NumberSlider vDivsField;
725803 // JCheckBox endcaps;
726804 JCheckBox liveCB;
805
+ JCheckBox selectCB;
727806 JCheckBox hideCB;
728807 JCheckBox link2masterCB;
729808 JCheckBox markCB;
....@@ -739,115 +818,84 @@
739818 JButton slowerButton;
740819 JButton fasterButton;
741820 JButton remarkButton;
821
+
822
+ cGridBag namePanel;
823
+ cGridBag setupPanel;
824
+ cGridBag setupPanel2;
825
+ cGridBag commandsPanel;
826
+ cGridBag pushPanel;
827
+ cGridBag fillPanel;
742828
743
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
829
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
744830 {
745831 JCheckBox cb;
746832
747
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
748
- oe.aConstraints.gridwidth = 1; // 3;
749
-// oe.aConstraints.weightx = 1;
750
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
751
- oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
833
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
752834 cb.addItemListener(this);
753
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
754
- oe.aConstraints.gridwidth = 1;
755
- oe.aConstraints.gridx += 1;
756835
757836 return cb;
758837 }
759838
760
- cButton AddButton(ObjEditor oe, String label)
839
+ cButton AddButton(cGridBag panel, String label)
761840 {
762841 cButton cb;
763842
764
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
765
- oe.aConstraints.gridwidth = 1;
766
-// oe.aConstraints.weightx = 1;
767
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
768
- oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
843
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
769844 cb.addActionListener(this);
770
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
771
- oe.aConstraints.gridwidth = 1;
772
- oe.aConstraints.gridx += 1;
773845
774846 return cb;
775847 }
776848
777
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
849
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
778850 {
779851 JComboBox combo;
780852
781
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
782
- oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
783
- oe.aConstraints.gridx += 1;
853
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
784854 combo.addActionListener(this);
785855
786856 return combo;
787857 }
788858
789
- NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow)
859
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
790860 {
791
- NumberSlider combo;
861
+ cGridBag control = new cGridBag();
862
+
863
+ cNumberSlider combo;
792864
793865 JLabel jlabel = new JLabel(label);
794
-
795
- aConstraints.fill = GridBagConstraints.VERTICAL;
796866 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
797
- aConstraints.gridwidth = 2;
798
- ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
799
- aConstraints.gridx += 1;
800
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
801
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
802
- ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
803
- aConstraints.gridx += 1;
804
- aConstraints.gridwidth = 1;
805
-
867
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
868
+ control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
806869 combo.setFloat(current);
807
-
808
- combo.label = jlabel;
809
-
810
- combo.addChangeListener(this);
811
-
812
- return combo;
870
+
871
+ panel.add(control);
872
+
873
+ return control;
813874 }
814875
815
- NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current)
876
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
816877 {
817
- NumberSlider combo;
878
+ cGridBag control = new cGridBag();
879
+
880
+ cNumberSlider combo;
818881
819882 JLabel jlabel = new JLabel(label);
820
-
821
- aConstraints.fill = GridBagConstraints.VERTICAL;
822883 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
823
- aConstraints.gridwidth = 2;
824
- ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
825
- aConstraints.gridx += 1;
826
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
827
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
828
- ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
829
- aConstraints.gridx += 1;
830
- aConstraints.gridwidth = 1;
831
-
884
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
885
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
832886 combo.setInteger(current);
833887
834
- combo.label = jlabel;
835
-
836
- combo.addChangeListener(this);
837
-
838
- return combo;
888
+ panel.add(control);
889
+
890
+ return control;
839891 }
840892
841
- JTextArea AddText(JPanel ctrlPanel, String name)
893
+ JTextArea AddText(cGridBag ctrlPanel, String name)
842894 {
843895 JTextArea text;
844896
845
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
846
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
847
- ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
897
+ ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
848898 text.addCaretListener(this);
849
- aConstraints.gridx += 1;
850
- aConstraints.gridwidth = 1;
851899
852900 return text;
853901 }
....@@ -877,9 +925,16 @@
877925 objEditor.ctrlPanel.remove(j);
878926 }
879927
928
+ void Remove(cNumberSlider j)
929
+ {
930
+ j.removeChangeListener(this);
931
+ //objEditor.ctrlPanel.remove(j.label);
932
+ objEditor.ctrlPanel.remove(j);
933
+ }
934
+
880935 /*
881936 */
882
- void Return() // ObjEditor oe)
937
+ void Return0() // ObjEditor oe)
883938 {
884939 aConstraints.gridy += 1;
885940 aConstraints.gridx = 0;
....@@ -934,35 +989,77 @@
934989
935990 void SetupUI2(ObjEditor oe)
936991 {
937
-// oe.aConstraints.weightx = 0;
938
-// oe.aConstraints.weighty = 0;
939
-// oe.aConstraints.gridx = 0;
940
-// oe.aConstraints.gridy = 0;
941
- SetupName(oe);
992
+ //SetupName(oe);
993
+
994
+ namePanel = new cGridBag();
995
+
996
+ nameField = AddText(namePanel, copy.GetName());
997
+ namePanel.add(nameField);
998
+ oe.ctrlPanel.add(namePanel);
999
+
1000
+ oe.ctrlPanel.Return();
9421001
9431002 if (!GroupEditor.allparams)
9441003 return;
9451004
946
- liveCB = AddCheckBox(oe, "Live", copy.live);
947
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
948
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
1005
+ setupPanel = new cGridBag().setVertical(false);
1006
+
1007
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
1008
+ liveCB.setToolTipText("Animate object");
1009
+ selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1010
+ selectCB.setToolTipText("Make object selectable");
9491011 // Return();
950
- markCB = AddCheckBox(oe, "Mark", copy.marked);
951
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
952
- randomCB = AddCheckBox(oe, "Rand", copy.random);
953
- Return();
954
- resetButton = AddButton(oe, "Reset");
955
- stepButton = AddButton(oe, "Step");
1012
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
1013
+ hideCB.setToolTipText("Hide object");
1014
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
1015
+ markCB.setToolTipText("Set the animation target transform");
1016
+
1017
+ setupPanel2 = new cGridBag().setVertical(false);
1018
+
1019
+ rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
1020
+ rewindCB.setToolTipText("Rewind animation");
1021
+
1022
+ randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);
1023
+ randomCB.setToolTipText("Randomly Rewind or Go back and forth");
1024
+
1025
+ if (Globals.ADVANCED)
1026
+ {
1027
+ link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master);
1028
+ link2masterCB.setToolTipText("Attach to support");
1029
+ speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup);
1030
+ speedupCB.setToolTipText("Option motion capture");
1031
+ }
1032
+
1033
+ oe.ctrlPanel.add(setupPanel);
1034
+ oe.ctrlPanel.Return();
1035
+ oe.ctrlPanel.add(setupPanel2);
1036
+ oe.ctrlPanel.Return();
1037
+
1038
+ commandsPanel = new cGridBag().setVertical(false);
1039
+
1040
+ resetButton = AddButton(commandsPanel, "Reset");
1041
+ resetButton.setToolTipText("Jump to frame zero");
1042
+ stepButton = AddButton(commandsPanel, "Step");
1043
+ stepButton.setToolTipText("Step one frame");
9561044 // resetAllButton = AddButton(oe, "Reset All");
9571045 // stepAllButton = AddButton(oe, "Step All");
958
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
9591046 // Return();
960
- slowerButton = AddButton(oe, "Slow");
961
- fasterButton = AddButton(oe, "Fast");
962
- remarkButton = AddButton(oe, "Rem");
1047
+ slowerButton = AddButton(commandsPanel, "Slow");
1048
+ slowerButton.setToolTipText("Decrease animation speed");
1049
+ fasterButton = AddButton(commandsPanel, "Fast");
1050
+ fasterButton.setToolTipText("Increase animation speed");
1051
+ remarkButton = AddButton(commandsPanel, "Remark");
1052
+ remarkButton.setToolTipText("Set the current transform as the target");
9631053
964
- Return();
1054
+ oe.ctrlPanel.add(commandsPanel);
1055
+ oe.ctrlPanel.Return();
9651056
1057
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
1058
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
1059
+ //Return();
1060
+
1061
+ oe.ctrlPanel.Return();
1062
+
9661063 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
9671064 // ObjEditor.aConstraints.gridx += 1;
9681065
....@@ -1056,7 +1153,7 @@
10561153 oe.aConstraints.gridwidth = 1;
10571154 /**/
10581155 nameField = AddText(oe.ctrlPanel, copy.GetName());
1059
- Return();
1156
+ oe.ctrlPanel.Return();
10601157
10611158 //ctrlPanel.add(textureButton = new Button("Texture..."));
10621159 //textureButton.setEnabled(false);
....@@ -1158,11 +1255,28 @@
11581255 //JPanel worldPanel =
11591256 // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true);
11601257 //worldPanel.setName("World");
1161
- /*JPanel*/ cameraPanel =
1162
- new JPanel(new BorderLayout());
1163
- cameraPanel.add(cameraView);
1164
- //new timeflow.app.TimeflowApp().TimeFlowWindow(cameraPanel, frame);
1258
+ centralPanel = new cGridBag();
1259
+ centralPanel.preferredWidth = 20;
1260
+
1261
+ if (Globals.ADVANCED)
1262
+ {
1263
+ timelinePanel = new JPanel(new BorderLayout());
1264
+ timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
11651265
1266
+ cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel);
1267
+ cameraPanel.setContinuousLayout(true);
1268
+ cameraPanel.setOneTouchExpandable(true);
1269
+// cameraPanel.setDividerLocation(0.9);
1270
+// cameraPanel.setDividerSize(9);
1271
+ cameraPanel.setResizeWeight(1.0);
1272
+
1273
+ }
1274
+
1275
+ centralPanel.add(cameraView);
1276
+ centralPanel.setFocusable(true);
1277
+ //frame.setJMenuBar(timelineMenubar);
1278
+ //centralPanel.add(timelinePanel);
1279
+
11661280 //topView.camera = ;
11671281 //frontView.camera = new Camera(2);
11681282 //sideView.camera = new Camera(3);
....@@ -1178,12 +1292,13 @@
11781292 //frontView.object = copy;
11791293 //sideView.object = copy;
11801294
1181
- XYZPanel = new JPanel();
1182
- XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
1295
+ XYZPanel = new cGridBag().setVertical(true);
1296
+ //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
11831297
1184
- XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1185
- XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll);
1186
- XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll);
1298
+ XYZPanel.preferredWidth = 5;
1299
+ XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1300
+ XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
1301
+ XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
11871302
11881303 /*
11891304 gridPanel = new JPanel(); //new BorderLayout());
....@@ -1192,7 +1307,7 @@
11921307 gridPanel.add(cameraView);
11931308 gridPanel.add(XYZPanel);
11941309 */
1195
- gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout());
1310
+ gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout());
11961311 gridPanel.setContinuousLayout(true);
11971312 gridPanel.setOneTouchExpandable(true);
11981313 gridPanel.setDividerLocation(1.0);
....@@ -1221,10 +1336,11 @@
12211336 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12221337 //tmp.setName("Edit");
12231338 objectPanel.add(materialPanel);
1224
- JPanel north = new JPanel(new BorderLayout());
1225
- north.setName("Edit");
1226
- north.add(ctrlPanel, BorderLayout.NORTH);
1227
- objectPanel.add(north);
1339
+// JPanel north = new JPanel(new BorderLayout());
1340
+// north.setName("Edit");
1341
+// north.add(ctrlPanel, BorderLayout.NORTH);
1342
+// objectPanel.add(north);
1343
+ objectPanel.add(ctrlPanel);
12281344 objectPanel.add(infoPanel);
12291345
12301346 /*
....@@ -1245,16 +1361,23 @@
12451361 scrollpane.setWheelScrollingEnabled(true);
12461362 scrollpane.addMouseWheelListener(this); // Default not fast enough
12471363
1248
- /*JTabbedPane*/ scenePanel = new JTabbedPane();
1249
- scenePanel.add(scrollpane);
1364
+ /*JTabbedPane*/ scenePanel = new cGridBag();
1365
+ scenePanel.preferredWidth = 6;
1366
+
1367
+ JTabbedPane tabbedPane = new JTabbedPane();
1368
+ tabbedPane.add(scrollpane);
12501369
1251
- scenePanel.add(FSPane = new cFileSystemPane(this));
1370
+ tabbedPane.add(FSPane = new cFileSystemPane(this));
12521371
1253
- optionsPanel = new JPanel(new GridBagLayout());
1372
+ optionsPanel = new cGridBag().setVertical(true);
12541373
12551374 optionsPanel.setName("Options");
1256
- scenePanel.add(optionsPanel);
1257
-
1375
+
1376
+ AddOptions(optionsPanel); //, aConstraints);
1377
+
1378
+ tabbedPane.add(optionsPanel);
1379
+
1380
+ scenePanel.add(tabbedPane);
12581381
12591382 /*
12601383 cTree jTree = new cTree(null);
....@@ -1288,6 +1411,7 @@
12881411 //bigPanel.setSize(new Dimension(10,10));
12891412 //bigPanel.add(ctrlPanel);
12901413 //bigPanel.add(gridPanel);
1414
+ /**
12911415 bigThree = new JPanel();
12921416 //big.setLayout(new FlowLayout(FlowLayout.LEFT));
12931417 bigThree.setLayout(new GridBagLayout()); //1,3,5,5));
....@@ -1304,14 +1428,20 @@
13041428 // aConstraints.gridheight = 3;
13051429 aWindowConstraints.gridx = 1;
13061430 aWindowConstraints.fill = GridBagConstraints.BOTH;
1307
- bigThree.add(cameraPanel, aWindowConstraints);
1431
+ bigThree.add(centralPanel, aWindowConstraints);
13081432 aWindowConstraints.weightx = 0;
13091433 aWindowConstraints.gridx = 4;
13101434 aWindowConstraints.gridwidth = 1;
13111435 // aConstraints.gridheight = 3;
13121436 aWindowConstraints.fill = GridBagConstraints.VERTICAL;
13131437 bigThree.add(XYZPanel, aWindowConstraints);
1438
+ /**/
13141439
1440
+ bigThree = new cGridBag();
1441
+ bigThree.addComponent(scenePanel);
1442
+ bigThree.addComponent(centralPanel);
1443
+ bigThree.addComponent(XYZPanel);
1444
+
13151445 // // SIDE EFFECT!!!
13161446 // aConstraints.gridx = 0;
13171447 // aConstraints.gridy = 0;
....@@ -1332,14 +1462,17 @@
13321462 //worldPane.add(bigPanel);
13331463 //worldPane.add(worldPanel);
13341464 /**/
1335
- frame.getContentPane().add(/*"Center",*/framePanel);
1465
+ //frame.getContentPane().add(/*"Center",*/framePanel);
1466
+ frame.add(/*"Center",*/framePanel);
13361467 //frame.getContentPane().add(/*"Center",*/ worldPane);
13371468
13381469 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
13391470
1340
- frame.setSize(1024, 768);
1341
- frame.show();
1471
+ frame.setSize(1280, 860);
1472
+ frame.setVisible(true);
13421473
1474
+ cameraView.requestFocusInWindow();
1475
+
13431476 gridPanel.setDividerLocation(1.0);
13441477
13451478 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
....@@ -1353,6 +1486,10 @@
13531486 });
13541487 }
13551488
1489
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
1490
+ {
1491
+ }
1492
+
13561493 JTree GetTree()
13571494 {
13581495 return objEditor.jTree;
....@@ -1364,260 +1501,173 @@
13641501 ctrlPanel.removeAll();
13651502 }
13661503
1367
- void SetupMaterial(JPanel ctrlPanel)
1504
+ void SetupMaterial(cGridBag panel)
13681505 {
1369
- aConstraints.weighty = 0;
1370
- //aConstraints.weightx = 1;
1371
- /*
1506
+ /*
13721507 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
13731508 materialLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1374
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1375
- aConstraints.gridx += 1;
13761509 */
13771510
1378
- aConstraints.gridwidth = 1;
1379
- ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints);
1380
- aConstraints.gridx += 1;
1381
- aConstraints.weighty = 0;
1382
- aConstraints.gridwidth = 1;
1511
+ cGridBag editBar = new cGridBag().setVertical(false);
1512
+
1513
+ editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints);
1514
+ createMaterialButton.setToolTipText("Create material");
13831515
13841516 /*
13851517 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
1386
- aConstraints.gridx += 1;
1387
- aConstraints.weighty = 0;
1388
- aConstraints.gridwidth = 1;
13891518 */
13901519
1391
- ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints);
1392
- aConstraints.gridx += 1;
1520
+ editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints);
1521
+ clearMaterialButton.setToolTipText("Clear material");
1522
+
1523
+ if (Globals.ADVANCED)
1524
+ {
1525
+ editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints);
1526
+ editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1527
+ editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1528
+ }
13931529
1394
- ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints);
1395
-
1396
- aConstraints.gridx += 1;
1397
-
1398
- ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints);
1399
-
1400
- aConstraints.gridx += 1;
1401
-
1402
- ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints);
1403
-
1404
- aConstraints.gridx = 0;
1405
- aConstraints.gridy += 1;
1406
- aConstraints.weighty = 0;
1407
- aConstraints.gridwidth = 1;
1530
+ editBar.preferredHeight = 15;
1531
+
1532
+ panel.add(editBar);
1533
+
14081534 /**/
14091535 //aConstraints.weighty = 0;
14101536 ////aConstraints.weightx = 1;
14111537 //aConstraints.weighty = 1;
14121538 aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
14131539 //aConstraints.gridx += 1;
1414
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1415
- aConstraints.weighty = 0;
1416
- aConstraints.gridx = 0;
1417
- aConstraints.gridy += 1;
1418
- aConstraints.gridwidth = 1;
1540
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14191541
1420
- ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints);
1421
- colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1422
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1423
- aConstraints.gridx += 1;
1424
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1425
- //aConstraints.weightx = 0;
1426
- ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1427
- aConstraints.gridx = 0;
1428
- aConstraints.gridy += 1;
1429
- aConstraints.gridwidth = 1;
1542
+ cGridBag colorSection = new cGridBag().setVertical(true);
1543
+
1544
+ cGridBag color = new cGridBag();
1545
+ color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
1546
+ colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1547
+ color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1548
+ //colorField.preferredWidth = 200;
1549
+ colorSection.add(color);
14301550
1431
- ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints);
1432
- modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1433
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1434
- aConstraints.gridx += 1;
1435
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1436
- ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1437
- aConstraints.gridx = 0;
1438
- aConstraints.gridy += 1;
1439
- aConstraints.gridwidth = 1;
1551
+ cGridBag modulation = new cGridBag();
1552
+ modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints);
1553
+ modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1554
+ modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1555
+ colorSection.add(modulation);
14401556
1441
- ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints);
1442
- textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1443
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1444
- aConstraints.gridx += 1;
1445
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1446
- ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1447
- aConstraints.gridx = 0;
1448
- aConstraints.gridy += 1;
1449
- aConstraints.gridwidth = 1;
1557
+ cGridBag texture = new cGridBag();
1558
+ texture.add(textureLabel = new JLabel("Texture")); // , aConstraints);
1559
+ textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1560
+ texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1561
+ colorSection.add(texture);
14501562
1451
- ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints);
1452
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1453
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1454
- aConstraints.gridx += 1;
1455
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1456
- ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1457
- aConstraints.gridx = 0;
1458
- aConstraints.gridy += 1;
1459
- aConstraints.gridwidth = 1;
1563
+ cGridBag anisoU = new cGridBag();
1564
+ anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1565
+ anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1566
+ anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1567
+ colorSection.add(anisoU);
14601568
1461
- ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints);
1462
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1463
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1464
- aConstraints.gridx += 1;
1465
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1466
- ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1467
- aConstraints.gridx = 0;
1468
- aConstraints.gridy += 1;
1469
- aConstraints.gridwidth = 1;
1569
+ cGridBag anisoV = new cGridBag();
1570
+ anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1571
+ anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1572
+ anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1573
+ colorSection.add(anisoV);
14701574
1471
- ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints);
1472
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1473
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1474
- aConstraints.gridx += 1;
1475
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1476
- ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints);
1477
- aConstraints.gridx = 0;
1478
- aConstraints.gridy += 1;
1479
- aConstraints.gridwidth = 1;
1575
+ cGridBag shadowbias = new cGridBag();
1576
+ shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1577
+ shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1578
+ shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1579
+ colorSection.add(shadowbias);
14801580
1481
- //aConstraints.weighty = 1;
1482
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1483
- //aConstraints.gridx += 1;
1484
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1485
- aConstraints.weighty = 0;
1486
- aConstraints.gridx = 0;
1487
- aConstraints.gridy += 1;
1488
- aConstraints.gridwidth = 1;
1581
+ panel.add(new JSeparator());
1582
+
1583
+ panel.add(colorSection);
1584
+
1585
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1586
+
1587
+ cGridBag diffuseSection = new cGridBag().setVertical(true);
1588
+
1589
+ cGridBag diffuse = new cGridBag();
1590
+ diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints);
1591
+ diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1592
+ diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1593
+ diffuseSection.add(diffuse);
14891594
1490
- ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints);
1491
- diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1492
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1493
- aConstraints.gridx += 1;
1494
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1495
- ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints);
1496
- aConstraints.gridx = 0;
1497
- aConstraints.gridy += 1;
1498
- aConstraints.gridwidth = 1;
1595
+ cGridBag diffuseness = new cGridBag();
1596
+ diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints);
1597
+ diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1598
+ diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1599
+ diffuseSection.add(diffuseness);
14991600
1500
- ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints);
1501
- diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1502
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1503
- aConstraints.gridx += 1;
1504
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1505
- ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints);
1506
- aConstraints.gridx = 0;
1507
- aConstraints.gridy += 1;
1508
- aConstraints.gridwidth = 1;
1601
+ cGridBag selfshadow = new cGridBag();
1602
+ selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints);
1603
+ selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1604
+ selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1605
+ diffuseSection.add(selfshadow);
15091606
1510
- ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints);
1511
- selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1512
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1513
- aConstraints.gridx += 1;
1514
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1515
- ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints);
1516
- aConstraints.gridx = 0;
1517
- aConstraints.gridy += 1;
1518
- aConstraints.gridwidth = 1;
1607
+ cGridBag sheen = new cGridBag();
1608
+ sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints);
1609
+ sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1610
+ sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1611
+ diffuseSection.add(sheen);
15191612
1520
- ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints);
1521
- sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1522
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1523
- aConstraints.gridx += 1;
1524
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1525
- ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints);
1526
- aConstraints.gridx = 0;
1527
- aConstraints.gridy += 1;
1528
- aConstraints.gridwidth = 1;
1613
+ cGridBag subsurface = new cGridBag();
1614
+ subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints);
1615
+ subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1616
+ subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1617
+ diffuseSection.add(subsurface);
15291618
1530
- ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints);
1531
- subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1532
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1533
- aConstraints.gridx += 1;
1534
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1535
- ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1536
- aConstraints.gridx = 0;
1537
- aConstraints.gridy += 1;
1538
- aConstraints.gridwidth = 1;
1619
+ cGridBag shadow = new cGridBag();
1620
+ shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints);
1621
+ shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1622
+ shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1623
+ diffuseSection.add(shadow);
15391624
1540
- ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints);
1541
- shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1542
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1543
- aConstraints.gridx += 1;
1544
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1545
- ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints);
1546
- aConstraints.gridx = 0;
1547
- aConstraints.gridy += 1;
1548
- aConstraints.gridwidth = 1;
1625
+ cGridBag fakedepth = new cGridBag();
1626
+ fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints);
1627
+ fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1628
+ fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1629
+ diffuseSection.add(fakedepth);
15491630
1550
- ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints);
1551
- fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1552
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1553
- aConstraints.gridx += 1;
1554
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1555
- ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints);
1556
- aConstraints.gridx = 0;
1557
- aConstraints.gridy += 1;
1558
- aConstraints.gridwidth = 1;
1631
+ panel.add(new JSeparator());
1632
+
1633
+ panel.add(diffuseSection);
1634
+
1635
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1636
+
1637
+ cGridBag specularSection = new cGridBag().setVertical(true);
15591638
1560
- //aConstraints.weighty = 1;
1561
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1562
- //aConstraints.gridx += 1;
1563
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1564
- aConstraints.weighty = 0;
1565
- aConstraints.gridx = 0;
1566
- aConstraints.gridy += 1;
1567
- aConstraints.gridwidth = 1;
1639
+ cGridBag specular = new cGridBag();
1640
+ specular.add(specularLabel = new JLabel("Specular")); // , aConstraints);
1641
+ specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1642
+ specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1643
+ specularSection.add(specular);
15681644
1569
- ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints);
1570
- specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1571
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1572
- aConstraints.gridx += 1;
1573
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1574
- ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints);
1575
- aConstraints.gridx = 0;
1576
- aConstraints.gridy += 1;
1577
- aConstraints.gridwidth = 1;
1645
+ cGridBag lightarea = new cGridBag();
1646
+ lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints);
1647
+ lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1648
+ lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1649
+ specularSection.add(lightarea);
15781650
1579
- ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints);
1580
- lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1581
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1582
- aConstraints.gridx += 1;
1583
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1584
- ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints);
1585
- aConstraints.gridx = 0;
1586
- aConstraints.gridy += 1;
1587
- aConstraints.gridwidth = 1;
1651
+ cGridBag shininess = new cGridBag();
1652
+ shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints);
1653
+ shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1654
+ shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1655
+ specularSection.add(shininess);
15881656
1589
- ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints);
1590
- shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1591
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1592
- aConstraints.gridx += 1;
1593
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1594
- ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints);
1595
- aConstraints.gridx = 0;
1596
- aConstraints.gridy += 1;
1597
- aConstraints.gridwidth = 1;
1657
+ cGridBag metalness = new cGridBag();
1658
+ metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints);
1659
+ metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1660
+ metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1661
+ specularSection.add(metalness);
15981662
1599
- ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints);
1600
- metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1601
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1602
- aConstraints.gridx += 1;
1603
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1604
- ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1605
- aConstraints.gridx = 0;
1606
- aConstraints.gridy += 1;
1607
- aConstraints.gridwidth = 1;
1663
+ cGridBag velvet = new cGridBag();
1664
+ velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints);
1665
+ velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1666
+ velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1667
+ specularSection.add(velvet);
16081668
1609
- ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints);
1610
- velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1611
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1612
- aConstraints.gridx += 1;
1613
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1614
- ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints);
1615
- aConstraints.gridx = 0;
1616
- aConstraints.gridy += 1;
1617
- aConstraints.gridwidth = 1;
1618
-
1619
- shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1);
1620
- Return();
1669
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
1670
+ //Return();
16211671 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
16221672 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16231673 // aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -1628,130 +1678,93 @@
16281678 // aConstraints.gridy += 1;
16291679 // aConstraints.gridwidth = 1;
16301680
1631
- //aConstraints.weighty = 1;
1632
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1633
- //aConstraints.gridx += 1;
1634
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1635
- aConstraints.weighty = 0;
1636
- aConstraints.gridx = 0;
1637
- aConstraints.gridy += 1;
1638
- aConstraints.gridwidth = 1;
16391681
1640
- ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints);
1641
- cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1642
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1643
- aConstraints.gridx += 1;
1644
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1645
- ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints);
1646
- aConstraints.gridx = 0;
1647
- aConstraints.gridy += 1;
1648
- aConstraints.gridwidth = 1;
1682
+ panel.add(new JSeparator());
1683
+
1684
+ panel.add(specularSection);
1685
+
1686
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1687
+
1688
+ cGridBag globalSection = new cGridBag().setVertical(true);
16491689
1650
- ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints);
1651
- ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1652
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1653
- aConstraints.gridx += 1;
1654
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1655
- ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints);
1656
- aConstraints.gridx = 0;
1657
- aConstraints.gridy += 1;
1658
- aConstraints.gridwidth = 1;
1690
+ cGridBag camera = new cGridBag();
1691
+ camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
1692
+ cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1693
+ camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1694
+ globalSection.add(camera);
16591695
1660
- ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints);
1661
- backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1662
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1663
- aConstraints.gridx += 1;
1664
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1665
- ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints);
1666
- aConstraints.gridx = 0;
1667
- aConstraints.gridy += 1;
1668
- aConstraints.gridwidth = 1;
1696
+ cGridBag ambient = new cGridBag();
1697
+ ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
1698
+ ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1699
+ ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1700
+ globalSection.add(ambient);
16691701
1670
- ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints);
1671
- opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1672
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1673
- aConstraints.gridx += 1;
1674
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1675
- ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints);
1676
- aConstraints.gridx = 0;
1677
- aConstraints.gridy += 1;
1678
- aConstraints.gridwidth = 1;
1679
- aConstraints.weighty = 0;
1702
+ cGridBag backlit = new cGridBag();
1703
+ backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
1704
+ backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1705
+ backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1706
+ globalSection.add(backlit);
16801707
1681
- ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints);
1682
- bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1683
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1684
- aConstraints.gridx += 1;
1685
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1686
- ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints);
1687
- aConstraints.gridx = 0;
1688
- aConstraints.gridy += 1;
1689
- aConstraints.gridwidth = 1;
1708
+ cGridBag opacity = new cGridBag();
1709
+ opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
1710
+ opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1711
+ opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1712
+ globalSection.add(opacity);
16901713
1691
- ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints);
1692
- noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1693
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1694
- aConstraints.gridx += 1;
1695
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1696
- ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints);
1697
- aConstraints.gridx = 0;
1698
- aConstraints.gridy += 1;
1699
- aConstraints.gridwidth = 1;
1714
+ panel.add(new JSeparator());
1715
+
1716
+ panel.add(globalSection);
1717
+
1718
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1719
+
1720
+ cGridBag textureSection = new cGridBag().setVertical(true);
17001721
1701
- ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints);
1702
- powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1703
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1704
- aConstraints.gridx += 1;
1705
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1706
- ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints);
1707
- aConstraints.gridx = 0;
1708
- aConstraints.gridy += 1;
1709
- aConstraints.gridwidth = 1;
1722
+ cGridBag bump = new cGridBag();
1723
+ bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints);
1724
+ bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1725
+ bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
1726
+ textureSection.add(bump);
17101727
1711
- ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints);
1712
- borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1713
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1714
- aConstraints.gridx += 1;
1715
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1716
- ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints);
1717
- aConstraints.gridx = 0;
1718
- aConstraints.gridy += 1;
1719
- aConstraints.gridwidth = 1;
1728
+ cGridBag noise = new cGridBag();
1729
+ noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints);
1730
+ noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1731
+ noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints);
1732
+ textureSection.add(noise);
17201733
1721
- ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints);
1722
- fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1723
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1724
- aConstraints.gridx += 1;
1725
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1726
- ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints);
1727
- aConstraints.gridx = 0;
1728
- aConstraints.gridy += 1;
1729
- aConstraints.gridwidth = 1;
1734
+ cGridBag power = new cGridBag();
1735
+ power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints);
1736
+ powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1737
+ power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints);
1738
+ textureSection.add(power);
17301739
1731
- ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints);
1732
- opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1733
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1734
- aConstraints.gridx += 1;
1735
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1736
- ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints);
1737
- aConstraints.gridx = 0;
1738
- aConstraints.gridy += 1;
1739
- aConstraints.gridwidth = 1;
1740
+ cGridBag borderfade = new cGridBag();
1741
+ borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints);
1742
+ borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1743
+ borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
1744
+ textureSection.add(borderfade);
17401745
1741
- //aConstraints.weighty = 1;
1742
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1743
- //aConstraints.gridx += 1;
1744
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1745
- aConstraints.weighty = 0;
1746
+ cGridBag fog = new cGridBag();
1747
+ fog.add(fogLabel = new JLabel("Punch")); // , aConstraints);
1748
+ fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1749
+ fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints);
1750
+ textureSection.add(fog);
17461751
1747
- aConstraints.gridx = 0;
1748
- aConstraints.gridy = 0;
1749
- aConstraints.gridwidth = 1;
1752
+ cGridBag opacityPower = new cGridBag();
1753
+ opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints);
1754
+ opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1755
+ opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
1756
+ textureSection.add(opacityPower);
1757
+
1758
+ panel.add(new JSeparator());
1759
+
1760
+ panel.add(textureSection);
1761
+
1762
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
17501763
17511764 SetMaterial(copy); // .GetMaterial());
17521765
1753
- colorField.addChangeListener(this);
1754
- modulationField.addChangeListener(this);
1766
+ //colorField.addChangeListener(this);
1767
+// modulationField.addChangeListener(this);
17551768 metalnessField.addChangeListener(this);
17561769 diffuseField.addChangeListener(this);
17571770 specularField.addChangeListener(this);
....@@ -1781,12 +1794,15 @@
17811794 opacityPowerField.addChangeListener(this);
17821795 /**/
17831796
1784
- resetSlidersButton.addActionListener(this);
17851797 clearMaterialButton.addActionListener(this);
17861798 createMaterialButton.addActionListener(this);
1787
-
1788
- propagateToggle.addItemListener(this);
1789
- multiplyToggle.addItemListener(this);
1799
+
1800
+ if (Globals.ADVANCED)
1801
+ {
1802
+ resetSlidersButton.addActionListener(this);
1803
+ propagateToggle.addItemListener(this);
1804
+ multiplyToggle.addItemListener(this);
1805
+ }
17901806 }
17911807
17921808 void DropFile(java.io.File[] files, boolean textures)
....@@ -1957,7 +1973,7 @@
19571973
19581974 //? flashIt = false;
19591975 CameraPane pane = (CameraPane) cameraView;
1960
- pane.clickStart(location.x, location.y, 0);
1976
+ pane.clickStart(location.x, location.y, 0, 0);
19611977 pane.clickEnd(location.x, location.y, 0, true);
19621978
19631979 if (group.selection.size() == 1)
....@@ -2006,6 +2022,7 @@
20062022 e2.printStackTrace();
20072023 }
20082024 }
2025
+
20092026 LoadJMEThread loadThread;
20102027
20112028 class LoadJMEThread extends Thread
....@@ -2063,6 +2080,7 @@
20632080 //LoadFile0(filename, converter);
20642081 }
20652082 }
2083
+
20662084 LoadOBJThread loadObjThread;
20672085
20682086 class LoadOBJThread extends Thread
....@@ -2141,19 +2159,19 @@
21412159
21422160 void LoadObjFile(String fullname)
21432161 {
2144
- /*
2162
+ System.out.println("Loading " + fullname);
2163
+ /**/
21452164 //lastFilename = fullname;
21462165 if(loadObjThread == null)
21472166 {
2148
- loadObjThread = new LoadOBJThread();
2149
- loadObjThread.start();
2167
+ loadObjThread = new LoadOBJThread();
2168
+ loadObjThread.start();
21502169 }
21512170
21522171 loadObjThread.add(fullname);
2153
- */
2172
+ /**/
21542173
2155
- System.out.println("Loading " + fullname);
2156
- makeSomething(new FileObject(fullname, true), true);
2174
+ //makeSomething(new FileObject(fullname, true), true);
21572175 }
21582176
21592177 void LoadGFDFile(String fullname)
....@@ -2414,11 +2432,11 @@
24142432
24152433 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
24162434 {
2417
- if (GrafreeD.standAlone)
2435
+ if (Grafreed.standAlone)
24182436 {
24192437 /**/
24202438 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
2421
- browser.show();
2439
+ browser.setVisible(true);
24222440 String filename = browser.getFile();
24232441 if (filename != null && filename.length() > 0)
24242442 {
....@@ -2563,6 +2581,7 @@
25632581 }
25642582 if (input == null)
25652583 {
2584
+ new Exception().printStackTrace();
25662585 System.exit(0);
25672586 }
25682587
....@@ -2777,7 +2796,8 @@
27772796 return;
27782797 }
27792798
2780
- multiplyToggle.setSelected(mat.multiply);
2799
+ if (multiplyToggle != null)
2800
+ multiplyToggle.setSelected(mat.multiply);
27812801
27822802 assert (object.projectedVertices != null);
27832803
....@@ -2959,25 +2979,42 @@
29592979 // june 2013 copy.HardTouch();
29602980 cameraView.repaint();
29612981 return;
2962
- } else if (event.getSource() == toggleFullItem)
2982
+ } else if (event.getSource() == toggleTimelineItem)
29632983 {
2964
- if (CameraPane.FULLSCREEN)
2984
+ timeline ^= true;
2985
+
2986
+ if (timeline)
29652987 {
2966
- frame.getContentPane().remove(/*"Center",*/bigThree);
2967
- framePanel.add(bigThree);
2968
- frame.getContentPane().add(/*"Center",*/framePanel);
2969
- } else
2970
- {
2971
- frame.getContentPane().remove(/*"Center",*/framePanel);
2972
- frame.getContentPane().add(/*"Center",*/bigThree);
2988
+ centralPanel.remove(cameraView);
2989
+ cameraPanel.add(cameraView);
2990
+ centralPanel.add(cameraPanel);
2991
+ frame.setJMenuBar(timelineMenubar);
2992
+ wasFullScreen = CameraPane.FULLSCREEN;
2993
+ if (!CameraPane.FULLSCREEN)
2994
+ ToggleFullScreen();
2995
+ toggleFullScreenItem.setEnabled(false);
29732996 }
2997
+ else
2998
+ {
2999
+ centralPanel.remove(cameraPanel);
3000
+ centralPanel.add(cameraView);
3001
+ frame.setJMenuBar(null);
3002
+ if (!wasFullScreen)
3003
+ ToggleFullScreen();
3004
+ toggleFullScreenItem.setEnabled(true);
3005
+ }
3006
+
29743007 frame.validate();
2975
- cameraView.ToggleFullScreen();
3008
+ return;
3009
+ } else if (event.getSource() == toggleFullScreenItem)
3010
+ {
3011
+ ToggleFullScreen();
3012
+ frame.validate();
29763013
29773014 return;
2978
- } else if (event.getSource() == toggleRandomItem)
3015
+ } else if (event.getSource() == toggleSwitchItem)
29793016 {
2980
- cameraView.ToggleRandom();
3017
+ cameraView.ToggleSwitch();
29813018 cameraView.repaint();
29823019 return;
29833020 } else if (event.getSource() == toggleHandleItem)
....@@ -3006,6 +3043,10 @@
30063043 {
30073044 copy.live ^= true;
30083045 return;
3046
+ } else if (event.getSource() == selectCB)
3047
+ {
3048
+ copy.dontselect ^= true;
3049
+ return;
30093050 } else if (event.getSource() == hideCB)
30103051 {
30113052 copy.hide ^= true;
....@@ -3020,6 +3061,7 @@
30203061 if (event.getSource() == randomCB)
30213062 {
30223063 copy.random ^= true;
3064
+ objEditor.refreshContents();
30233065 return;
30243066 }
30253067 if (event.getSource() == speedupCB)
....@@ -3043,8 +3085,9 @@
30433085
30443086 public void actionPerformed(ActionEvent event)
30453087 {
3088
+ Object source = event.getSource();
30463089 // SCRIPT DIALOG
3047
- if (event.getSource() == okbutton)
3090
+ if (source == okbutton)
30483091 {
30493092 textpanel.setVisible(false);
30503093 textpanel.remove(textarea);
....@@ -3056,7 +3099,7 @@
30563099 textarea = null;
30573100 textpanel = null;
30583101 }
3059
- if (event.getSource() == cancelbutton)
3102
+ if (source == cancelbutton)
30603103 {
30613104 textpanel.setVisible(false);
30623105 textpanel.remove(textarea);
....@@ -3068,49 +3111,50 @@
30683111 //applySelf();
30693112 //client.refreshEditWindow();
30703113 //refreshContents();
3071
- if (event.getSource() == nameField)
3114
+ if (source == nameField)
30723115 {
30733116 //System.out.println("ObjEditor " + event);
30743117 applySelf0(true);
30753118 //parent.applySelf();
30763119 objEditor.refreshContents();
3077
- } else if (event.getSource() == resetButton)
3120
+ } else if (source == resetButton)
30783121 {
30793122 CameraPane.fullreset = true;
30803123 copy.Reset(); // ResetMeshes();
30813124 copy.Touch();
30823125 objEditor.refreshContents();
3083
- } else if (event.getSource() == stepItem)
3126
+ } else if (source == stepItem)
30843127 {
3085
- cameraView.ONESTEP = true;
3128
+ //cameraView.ONESTEP = true;
3129
+ Globals.ONESTEP = true;
30863130 cameraView.repaint();
30873131 return;
3088
- } else if (event.getSource() == stepButton)
3132
+ } else if (source == stepButton)
30893133 {
30903134 copy.Step();
30913135 copy.Touch();
30923136 objEditor.refreshContents();
3093
- } else if (event.getSource() == slowerButton)
3137
+ } else if (source == slowerButton)
30943138 {
30953139 copy.Slower();
30963140 copy.Touch();
30973141 objEditor.refreshContents();
3098
- } else if (event.getSource() == fasterButton)
3142
+ } else if (source == fasterButton)
30993143 {
31003144 copy.Faster();
31013145 copy.Touch();
31023146 objEditor.refreshContents();
3103
- } else if (event.getSource() == remarkButton)
3147
+ } else if (source == remarkButton)
31043148 {
31053149 copy.Remark();
31063150 copy.Touch();
31073151 objEditor.refreshContents();
3108
- } else if (event.getSource() == stepAllButton)
3152
+ } else if (source == stepAllButton)
31093153 {
31103154 copy.StepAll();
31113155 copy.Touch();
31123156 objEditor.refreshContents();
3113
- } else if (event.getSource() == resetAllButton)
3157
+ } else if (source == resetAllButton)
31143158 {
31153159 //CameraPane.fullreset = true;
31163160 copy.ResetAll(); // ResetMeshes();
....@@ -3143,53 +3187,75 @@
31433187 // Close();
31443188 // }
31453189 // else
3146
- if (event.getSource() == resetSlidersButton)
3190
+ if (source == resetSlidersButton)
31473191 {
31483192 ResetSliders();
3149
- } else if (event.getSource() == clearMaterialButton)
3193
+ } else if (source == clearMaterialButton)
31503194 {
31513195 ClearMaterial();
3152
- } else if (event.getSource() == createMaterialButton)
3196
+ } else if (source == createMaterialButton)
31533197 {
31543198 CreateMaterial();
3155
- } else if (event.getSource() == clearPanelButton)
3199
+ } else if (source == clearPanelButton)
31563200 {
31573201 copy.ClearUI();
31583202 refreshContents(true);
3159
- } /*
3160
- }
3161
-
3162
- public boolean action(Event event, Object arg)
3163
- {
3164
- */ else if (event.getSource() == closeItem)
3203
+ } else if (source == importGFDItem)
3204
+ {
3205
+ ImportGFD();
3206
+ } else
3207
+ if (source == importVRMLX3DItem)
3208
+ {
3209
+ ImportVRMLX3D();
3210
+ } else
3211
+ if (source == import3DSItem)
3212
+ {
3213
+ objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
3214
+ } else
3215
+ if (source == importOBJItem)
3216
+ {
3217
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
3218
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
3219
+ browser.setVisible(true);
3220
+ String filename = browser.getFile();
3221
+ if (filename != null && filename.length() > 0)
3222
+ {
3223
+ String fullname = browser.getDirectory() + filename;
3224
+ makeSomething(ReadOBJ(fullname), true);
3225
+ }
3226
+ } else
3227
+ if (source == closeItem)
31653228 {
31663229 Close();
31673230 //return true;
3168
- } else if (event.getSource() == loadItem)
3231
+ } else if (source == loadItem)
31693232 {
31703233 load();
31713234 //return true;
3172
- } else if (event.getSource() == saveItem)
3235
+ } else if (source == newItem)
3236
+ {
3237
+ New();
3238
+ } else if (source == saveItem)
31733239 {
31743240 save();
31753241 //return true;
3176
- } else if (event.getSource() == saveAsItem)
3242
+ } else if (source == saveAsItem)
31773243 {
31783244 saveAs();
31793245 //return true;
3180
- } else if (event.getSource() == reexportItem)
3246
+ } else if (source == reexportItem)
31813247 {
31823248 reexport();
31833249 //return true;
3184
- } else if (event.getSource() == exportAsItem)
3250
+ } else if (source == exportAsItem)
31853251 {
31863252 export();
31873253 //return true;
3188
- } else if (event.getSource() == povItem)
3254
+ } else if (source == povItem)
31893255 {
31903256 generatePOV();
31913257 //return true;
3192
- } else if (event.getSource() == zBufferItem)
3258
+ } else if (source == zBufferItem)
31933259 {
31943260 try
31953261 {
....@@ -3211,21 +3277,8 @@
32113277 cameraView.repaint();
32123278 //return true;
32133279 }
3214
- */ else if (event.getSource() == editCameraItem)
3215
- {
3216
- cameraView.ProtectCamera();
3217
- cameraView.repaint();
3218
- return;
3219
- } else if (event.getSource() == revertCameraItem)
3220
- {
3221
- cameraView.RevertCamera();
3222
- cameraView.repaint();
3223
- return;
3224
- } else if (event.getSource() == textureButton)
3225
- {
3226
- return; // true;
3227
- } else // combos...
3228
- if (event.getSource() == texresMenu)
3280
+ */ else // combos...
3281
+ if (source == texresMenu)
32293282 {
32303283 System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex());
32313284 copy.texres = texresMenu.getSelectedIndex();
....@@ -3237,27 +3290,283 @@
32373290 }
32383291 }
32393292
3240
- void ToggleAnimation()
3293
+ void New()
32413294 {
3242
- if (!CameraPane.ANIMATION)
3295
+ while (copy.Size() > 1)
32433296 {
3244
- FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3297
+ copy.remove(1);
3298
+ }
3299
+
3300
+ ResetModel();
3301
+ objEditor.refreshContents();
3302
+ }
3303
+
3304
+ static public byte[] Compress(Object3D o)
3305
+ {
3306
+ try
3307
+ {
3308
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3309
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3310
+ ObjectOutputStream out = new ObjectOutputStream(zstream);
3311
+
3312
+ Object3D parent = o.parent;
3313
+ o.parent = null;
3314
+
3315
+ out.writeObject(o);
3316
+
3317
+ o.parent = parent;
3318
+
3319
+ out.flush();
3320
+
3321
+ zstream.close();
3322
+ out.close();
3323
+
3324
+ return baos.toByteArray();
3325
+ } catch (Exception e)
3326
+ {
3327
+ System.err.println(e);
3328
+ return null;
3329
+ }
3330
+ }
3331
+
3332
+ static public Object Uncompress(byte[] bytes)
3333
+ {
3334
+ System.out.println("#bytes = " + bytes.length);
3335
+ try
3336
+ {
3337
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3338
+ java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3339
+ ObjectInputStream in = new ObjectInputStream(istream);
3340
+ Object obj = in.readObject();
3341
+ in.close();
3342
+
3343
+ return obj;
3344
+ } catch (Exception e)
3345
+ {
3346
+ System.err.println(e);
3347
+ return null;
3348
+ }
3349
+ }
3350
+
3351
+ static public Object clone(Object o)
3352
+ {
3353
+ try
3354
+ {
3355
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3356
+ ObjectOutputStream out = new ObjectOutputStream(baos);
3357
+
3358
+ out.writeObject(o);
3359
+
3360
+ out.flush();
3361
+ out.close();
3362
+
3363
+ byte[] bytes = baos.toByteArray();
3364
+
3365
+ System.out.println("clone = " + bytes.length);
3366
+
3367
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3368
+ ObjectInputStream in = new ObjectInputStream(bais);
3369
+ Object obj = in.readObject();
3370
+ in.close();
3371
+
3372
+ return obj;
3373
+ } catch (Exception e)
3374
+ {
3375
+ System.err.println(e);
3376
+ return null;
3377
+ }
3378
+ }
3379
+
3380
+ cRadio GetCurrentTab()
3381
+ {
3382
+ cRadio ab;
3383
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3384
+ {
3385
+ ab = (cRadio)e.nextElement();
3386
+ if(ab.GetObject() == copy)
3387
+ {
3388
+ return ab;
3389
+ }
3390
+ }
3391
+
3392
+ return null;
3393
+ }
3394
+
3395
+ java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();
3396
+
3397
+ public void Save()
3398
+ {
3399
+ cRadio tab = GetCurrentTab();
3400
+
3401
+ boolean temp = CameraPane.SWITCH;
3402
+ CameraPane.SWITCH = false;
3403
+
3404
+ copy.ExtractBigData(hashtable);
3405
+
3406
+ //EditorFrame.m_MainFrame.requestFocusInWindow();
3407
+ tab.graphs[tab.undoindex++] = Compress(copy);
3408
+
3409
+ copy.RestoreBigData(hashtable);
3410
+
3411
+ CameraPane.SWITCH = temp;
3412
+
3413
+ //assert(hashtable.isEmpty());
3414
+
3415
+ for (int i = tab.undoindex; i < tab.graphs.length; i++)
3416
+ {
3417
+ tab.graphs[i] = null;
3418
+ }
3419
+
3420
+ // test save
3421
+ if (false)
3422
+ {
3423
+ try
3424
+ {
3425
+ FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
3426
+ ObjectOutputStream p = new ObjectOutputStream(ostream);
3427
+
3428
+ p.writeObject(copy);
3429
+
3430
+ p.flush();
3431
+
3432
+ ostream.close();
3433
+ } catch (Exception e)
3434
+ {
3435
+ e.printStackTrace();
3436
+ }
3437
+ }
3438
+ }
3439
+
3440
+ void CopyChanged(Object3D obj)
3441
+ {
3442
+ boolean temp = CameraPane.SWITCH;
3443
+ CameraPane.SWITCH = false;
3444
+
3445
+ copy.ExtractBigData(hashtable);
3446
+
3447
+ copy.clear();
3448
+
3449
+ for (int i=0; i<obj.Size(); i++)
3450
+ {
3451
+ copy.add(obj.get(i));
3452
+ }
3453
+
3454
+ copy.RestoreBigData(hashtable);
3455
+
3456
+ CameraPane.SWITCH = temp;
3457
+
3458
+ //assert(hashtable.isEmpty());
3459
+
3460
+ copy.Touch();
3461
+
3462
+ ResetModel();
3463
+ copy.HardTouch(); // recompile?
3464
+
3465
+ cRadio ab;
3466
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3467
+ {
3468
+ ab = (cRadio)e.nextElement();
3469
+ Object3D test = copy.GetObject(ab.object.GetUUID());
3470
+ //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());
3471
+ if (test != null)
3472
+ {
3473
+ test.editWindow = ab.object.editWindow;
3474
+ ab.object = test;
3475
+ }
3476
+ }
3477
+
3478
+ refreshContents();
3479
+ }
3480
+
3481
+ public void Undo()
3482
+ {
3483
+ cRadio tab = GetCurrentTab();
3484
+
3485
+ if (tab.undoindex == 0)
3486
+ {
3487
+ java.awt.Toolkit.getDefaultToolkit().beep();
3488
+ return;
3489
+ }
3490
+
3491
+ if (tab.graphs[tab.undoindex] == null)
3492
+ {
3493
+ Save();
3494
+ tab.undoindex -= 1;
3495
+ }
3496
+
3497
+ tab.undoindex -= 1;
3498
+
3499
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3500
+ }
3501
+
3502
+ public void Redo()
3503
+ {
3504
+ cRadio tab = GetCurrentTab();
3505
+
3506
+ if (tab.graphs[tab.undoindex + 1] == null)
3507
+ {
3508
+ java.awt.Toolkit.getDefaultToolkit().beep();
3509
+ return;
3510
+ }
3511
+
3512
+ tab.undoindex += 1;
3513
+
3514
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3515
+ }
3516
+
3517
+ void ImportGFD()
3518
+ {
3519
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
32453520 browser.show();
32463521 String filename = browser.getFile();
32473522 if (filename != null && filename.length() > 0)
32483523 {
3249
- CameraPane.filename = browser.getDirectory() + filename;
3524
+ String fullname = browser.getDirectory() + filename;
3525
+
3526
+ //Object3D readobj =
3527
+ objEditor.ReadGFD(fullname, objEditor);
3528
+ //makeSomething(readobj);
3529
+ }
3530
+ }
3531
+
3532
+ void ImportVRMLX3D()
3533
+ {
3534
+ if (Grafreed.standAlone)
3535
+ {
3536
+ /**/
3537
+ FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
3538
+ browser.show();
3539
+ String filename = browser.getFile();
3540
+ if (filename != null && filename.length() > 0)
3541
+ {
3542
+ String fullname = browser.getDirectory() + filename;
3543
+ LoadVRMLX3D(fullname);
3544
+ }
3545
+ /**/
3546
+ }
3547
+ }
3548
+
3549
+ void ToggleAnimation()
3550
+ {
3551
+ if (!Globals.ANIMATION)
3552
+ {
3553
+ FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3554
+ browser.setVisible(true);
3555
+ String filename = browser.getFile();
3556
+ if (filename != null && filename.length() > 0)
3557
+ {
3558
+ Globals.filename = browser.getDirectory() + filename;
32503559 //CameraPane.framecount = 0;
3251
- CameraPane.imagecount = 0;
3560
+ Globals.imagecount = 0;
32523561
3253
- CameraPane.ANIMATION ^= true;
3562
+ Globals.ANIMATION ^= true;
32543563
3255
- GrafreeD.wav.cursor = 0;
3256
- GrafreeD.wav.loop = 0;
3564
+ Grafreed.wav.cursor = 0;
3565
+ Grafreed.wav.loop = 0;
32573566 }
32583567 } else
32593568 {
3260
- CameraPane.ANIMATION ^= true;
3569
+ Globals.ANIMATION ^= true;
32613570 }
32623571 }
32633572
....@@ -3303,7 +3612,7 @@
33033612 void CreateMaterial()
33043613 {
33053614 //copy.ClearMaterial(); // PATCH
3306
- copy.CreateMaterialS(multiplyToggle.isSelected());
3615
+ copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected());
33073616 if (copy.selection.size() > 0)
33083617 //SetMaterial(copy);
33093618 {
....@@ -3362,11 +3671,11 @@
33623671 {
33633672 copy.ResetBlockLoop(); // temporary problem
33643673
3365
- boolean random = CameraPane.RANDOM;
3366
- CameraPane.RANDOM = false; // parse everything
3674
+ boolean random = CameraPane.SWITCH;
3675
+ CameraPane.SWITCH = false; // parse everything
33673676 copy.ResetDisplayList();
33683677 copy.HardTouch();
3369
- CameraPane.RANDOM = random;
3678
+ CameraPane.SWITCH = random;
33703679 }
33713680
33723681 // public void applySelf()
....@@ -3436,10 +3745,40 @@
34363745 current.fakedepth = (float) fakedepthField.getFloat();
34373746 current.shadowbias = (float) shadowbiasField.getFloat();
34383747
3439
- if (!NumberSlider.frozen)
3748
+ if (!cNumberSlider.frozen)
34403749 {
34413750 //System.out.println("Propagate = " + propagate);
34423751 copy.UpdateMaterial(anchor, current, propagate);
3752
+
3753
+ if (copy.material != null)
3754
+ {
3755
+ cMaterial mat = copy.material;
3756
+
3757
+ colorField.SetToolTipValue((mat.color));
3758
+ modulationField.SetToolTipValue((mat.modulation));
3759
+ metalnessField.SetToolTipValue((mat.metalness));
3760
+ diffuseField.SetToolTipValue((mat.diffuse));
3761
+ specularField.SetToolTipValue((mat.specular));
3762
+ shininessField.SetToolTipValue((mat.shininess));
3763
+ shiftField.SetToolTipValue((mat.shift));
3764
+ ambientField.SetToolTipValue((mat.ambient));
3765
+ lightareaField.SetToolTipValue((mat.lightarea));
3766
+ diffusenessField.SetToolTipValue((mat.factor));
3767
+ velvetField.SetToolTipValue((mat.velvet));
3768
+ sheenField.SetToolTipValue((mat.sheen));
3769
+ subsurfaceField.SetToolTipValue((mat.subsurface));
3770
+ backlitField.SetToolTipValue((mat.bump));
3771
+ anisoField.SetToolTipValue((mat.aniso));
3772
+ anisoVField.SetToolTipValue((mat.anisoV));
3773
+ cameraField.SetToolTipValue((mat.cameralight));
3774
+ selfshadowField.SetToolTipValue((mat.diffuseness));
3775
+ shadowField.SetToolTipValue((mat.shadow));
3776
+ textureField.SetToolTipValue((mat.texture));
3777
+ opacityField.SetToolTipValue((mat.opacity));
3778
+ fakedepthField.SetToolTipValue((mat.fakedepth));
3779
+ shadowbiasField.SetToolTipValue((mat.shadowbias));
3780
+ }
3781
+
34433782 if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null)
34443783 {
34453784 copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000);
....@@ -3484,6 +3823,7 @@
34843823 || e.getSource() == apertureField
34853824 || e.getSource() == shadowblurField)
34863825 {
3826
+ new Exception().printStackTrace();
34873827 System.exit(0);
34883828 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34893829 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -3510,7 +3850,13 @@
35103850 //System.out.println("PARENT = " + parent);
35113851 //if (parent != null)
35123852 // parent.applySelf();
3513
- refreshContents();
3853
+ if (e.getSource() == normalpushField)
3854
+ {
3855
+ objEditor.refreshContents();
3856
+ //Refresh();
3857
+ }
3858
+ else
3859
+ refreshContents();
35143860 // ??? client.refreshEditWindow();
35153861 }
35163862 //else
....@@ -3522,7 +3868,7 @@
35223868 //group.name = nameField.getText();
35233869 //objEditor.applySelf();
35243870
3525
- assert (objEditor == this);
3871
+ // OCT2018: assert (objEditor == this);
35263872 if (copy.selection == null || copy.selection.size() == 0)
35273873 //super.applySelf()
35283874 ; else
....@@ -3546,12 +3892,18 @@
35463892 objEditor.copy = keep;
35473893 }
35483894 }
3895
+
3896
+ if (normalpushField != null)
3897
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
35493898 }
35503899
35513900 void SnapObject()
35523901 {
3553
- Object3D obj = (Object3D)copy.selection.elementAt(0);
3554
- SnapObject(obj);
3902
+ if (copy.selection.size() > 0)
3903
+ {
3904
+ Object3D obj = (Object3D)copy.selection.elementAt(0);
3905
+ SnapObject(obj);
3906
+ }
35553907 }
35563908
35573909 void SnapObject(Object3D obj)
....@@ -3797,7 +4149,7 @@
37974149
37984150 radioPanel.revalidate();
37994151 radioPanel.repaint();
3800
- ctrlPanel.revalidate(); // ? new
4152
+ ctrlPanel.validate(); // ? new
38014153 ctrlPanel.repaint();
38024154 }
38034155 }
....@@ -3806,6 +4158,7 @@
38064158
38074159 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
38084160 {
4161
+ Save();
38094162 //Tween.set(thing, 0).target(1).start(tweenManager);
38104163 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
38114164 // if (thing instanceof GenericJointDemo)
....@@ -4009,6 +4362,7 @@
40094362 }
40104363 }
40114364 }
4365
+
40124366 LoadGFDThread loadGFDThread;
40134367
40144368 void ReadGFD(String fullname, iCallBack cb)
....@@ -4028,8 +4382,10 @@
40284382
40294383 try
40304384 {
4385
+ // Try compressed version first.
40314386 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4032
- java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4387
+ java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream);
4388
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream);
40334389
40344390 readobj = (Object3D) p.readObject();
40354391 istream.close();
....@@ -4037,7 +4393,20 @@
40374393 readobj.ResetDisplayList();
40384394 } catch (Exception e)
40394395 {
4040
- e.printStackTrace();
4396
+ //e.printStackTrace();
4397
+ try
4398
+ {
4399
+ java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4400
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4401
+
4402
+ readobj = (Object3D) p.readObject();
4403
+ istream.close();
4404
+
4405
+ readobj.ResetDisplayList();
4406
+ } catch (Exception e2)
4407
+ {
4408
+ e2.printStackTrace();
4409
+ }
40414410 }
40424411 // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); }
40434412 // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); }
....@@ -4083,6 +4452,12 @@
40834452
40844453 void LoadIt(Object obj)
40854454 {
4455
+ if (obj == null)
4456
+ {
4457
+ // Invalid file
4458
+ return;
4459
+ }
4460
+
40864461 System.out.println("Loaded " + obj);
40874462 //new Exception().printStackTrace();
40884463 Object3D readobj = (Object3D) obj;
....@@ -4092,6 +4467,7 @@
40924467
40934468 if (readobj != null)
40944469 {
4470
+ Save();
40954471 try
40964472 {
40974473 //readobj.deepCopySelf(copy);
....@@ -4154,7 +4530,7 @@
41544530
41554531 void load() // throws ClassNotFoundException
41564532 {
4157
- if (GrafreeD.standAlone)
4533
+ if (Grafreed.standAlone)
41584534 {
41594535 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
41604536 browser.show();
....@@ -4241,11 +4617,13 @@
42414617 try
42424618 {
42434619 FileOutputStream ostream = new FileOutputStream(lastname);
4244
- ObjectOutputStream p = new ObjectOutputStream(ostream);
4620
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4621
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
42454622
42464623 p.writeObject(copy);
42474624 p.flush();
42484625
4626
+ zstream.close();
42494627 ostream.close();
42504628
42514629 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4255,11 +4633,12 @@
42554633 {
42564634 }
42574635 }
4636
+
42584637 String lastname;
42594638
42604639 void saveAs()
42614640 {
4262
- if (GrafreeD.standAlone)
4641
+ if (Grafreed.standAlone)
42634642 {
42644643 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
42654644 browser.setVisible(true);
....@@ -4364,13 +4743,13 @@
43644743 try
43654744 {
43664745 FileOutputStream ostream = new FileOutputStream(filename);
4367
- // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4368
- ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream);
4746
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4747
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
43694748
43704749 Object3D objectparent = obj.parent;
43714750 obj.parent = null;
43724751
4373
- Object3D object = (Object3D) GrafreeD.clone(obj);
4752
+ Object3D object = (Object3D) Grafreed.clone(obj);
43744753
43754754 obj.parent = objectparent;
43764755
....@@ -4382,8 +4761,8 @@
43824761 p.writeObject(object);
43834762 p.flush();
43844763
4764
+ zstream.close();
43854765 ostream.close();
4386
- // zstream.close();
43874766
43884767 // group.selection.get(0).parent = parent;
43894768 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4404,7 +4783,7 @@
44044783 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
44054784 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
44064785 copy.generatePOV(buffer);
4407
- if (GrafreeD.standAlone)
4786
+ if (Grafreed.standAlone)
44084787 {
44094788 FileDialog browser = new FileDialog(frame, "Export POV", 1);
44104789 browser.show();
....@@ -4430,7 +4809,8 @@
44304809 Object3D client;
44314810 Object3D copy;
44324811 MenuBar menuBar;
4433
- Menu windowMenu;
4812
+ Menu fileMenu;
4813
+ MenuItem newItem;
44344814 MenuItem loadItem;
44354815 MenuItem saveItem;
44364816 MenuItem saveAsItem;
....@@ -4438,21 +4818,20 @@
44384818 MenuItem reexportItem;
44394819 MenuItem povItem;
44404820 MenuItem closeItem;
4441
- Menu cameraMenu;
4821
+
44424822 CheckboxMenuItem zBufferItem;
44434823 //MenuItem normalLensItem;
4444
- MenuItem editCameraItem;
4445
- MenuItem revertCameraItem;
4446
- CheckboxMenuItem toggleLiveItem;
44474824 MenuItem stepItem;
4448
- CheckboxMenuItem toggleFullItem;
4825
+ CheckboxMenuItem toggleLiveItem;
4826
+ CheckboxMenuItem toggleFullScreenItem;
4827
+ CheckboxMenuItem toggleTimelineItem;
44494828 CheckboxMenuItem toggleRenderItem;
44504829 CheckboxMenuItem toggleDebugItem;
44514830 CheckboxMenuItem toggleFrustumItem;
44524831 CheckboxMenuItem toggleFootContactItem;
44534832 CheckboxMenuItem toggleDLItem;
44544833 CheckboxMenuItem toggleTextureItem;
4455
- CheckboxMenuItem toggleRandomItem;
4834
+ CheckboxMenuItem toggleSwitchItem;
44564835 CheckboxMenuItem toggleRootItem;
44574836 CheckboxMenuItem animationItem;
44584837 CheckboxMenuItem toggleHandleItem;
....@@ -4460,23 +4839,26 @@
44604839 JSplitPane mainPanel;
44614840 JScrollPane scrollpane;
44624841 JPanel toolbarPanel;
4463
- JPanel treePanel;
4842
+ cGridBag treePanel;
44644843 JPanel radioPanel;
44654844 ButtonGroup buttonGroup;
4466
- JPanel ctrlPanel;
4467
- JPanel materialPanel;
4845
+ cGridBag ctrlPanel;
4846
+ cGridBag materialPanel;
44684847 JScrollPane infoPanel;
4469
- JPanel optionsPanel;
4848
+ cGridBag optionsPanel;
44704849 JTabbedPane objectPanel;
4471
- JPanel XYZPanel;
4850
+ cGridBag XYZPanel;
44724851 JSplitPane gridPanel;
44734852 JSplitPane bigPanel;
4474
- JPanel bigThree;
4475
- JTabbedPane scenePanel;
4476
- JPanel cameraPanel;
4853
+ cGridBag bigThree;
4854
+ cGridBag scenePanel;
4855
+ cGridBag centralPanel;
4856
+ JSplitPane cameraPanel;
4857
+ JPanel timelinePanel;
4858
+ JMenuBar timelineMenubar;
44774859 JSplitPane framePanel;
44784860 JTextArea/*Field*/ nameField;
4479
- cButton textureButton;
4861
+ //cButton textureButton;
44804862 cButton okButton;
44814863 cButton applyButton;
44824864 cButton cancelButton;
....@@ -4523,65 +4905,72 @@
45234905 // MATERIAL
45244906 JLabel materialLabel;
45254907 JLabel colorLabel;
4526
- NumberSlider colorField;
4908
+ cNumberSlider colorField;
45274909 JLabel modulationLabel;
4528
- NumberSlider modulationField;
4910
+ cNumberSlider modulationField;
45294911 JLabel metalnessLabel;
4530
- NumberSlider metalnessField;
4912
+ cNumberSlider metalnessField;
45314913 JLabel diffuseLabel;
4532
- NumberSlider diffuseField;
4914
+ cNumberSlider diffuseField;
45334915 JLabel specularLabel;
4534
- NumberSlider specularField;
4916
+ cNumberSlider specularField;
45354917 JLabel shininessLabel;
4536
- NumberSlider shininessField;
4918
+ cNumberSlider shininessField;
45374919 JLabel shiftLabel;
4538
- NumberSlider shiftField;
4920
+ cNumberSlider shiftField;
45394921 JLabel ambientLabel;
4540
- NumberSlider ambientField;
4922
+ cNumberSlider ambientField;
45414923 JLabel lightareaLabel;
4542
- NumberSlider lightareaField;
4924
+ cNumberSlider lightareaField;
45434925 JLabel diffusenessLabel;
4544
- NumberSlider diffusenessField;
4926
+ cNumberSlider diffusenessField;
45454927 JLabel velvetLabel;
4546
- NumberSlider velvetField;
4928
+ cNumberSlider velvetField;
45474929 JLabel sheenLabel;
4548
- NumberSlider sheenField;
4930
+ cNumberSlider sheenField;
45494931 JLabel subsurfaceLabel;
4550
- NumberSlider subsurfaceField;
4932
+ cNumberSlider subsurfaceField;
45514933 //JLabel bumpLabel;
45524934 //NumberSlider bumpField;
45534935 JLabel backlitLabel;
4554
- NumberSlider backlitField;
4936
+ cNumberSlider backlitField;
45554937 JLabel anisoLabel;
4556
- NumberSlider anisoField;
4938
+ cNumberSlider anisoField;
45574939 JLabel anisoVLabel;
4558
- NumberSlider anisoVField;
4940
+ cNumberSlider anisoVField;
45594941 JLabel cameraLabel;
4560
- NumberSlider cameraField;
4942
+ cNumberSlider cameraField;
45614943 JLabel selfshadowLabel;
4562
- NumberSlider selfshadowField;
4944
+ cNumberSlider selfshadowField;
45634945 JLabel shadowLabel;
4564
- NumberSlider shadowField;
4946
+ cNumberSlider shadowField;
45654947 JLabel textureLabel;
4566
- NumberSlider textureField;
4948
+ cNumberSlider textureField;
45674949 JLabel opacityLabel;
4568
- NumberSlider opacityField;
4950
+ cNumberSlider opacityField;
45694951 JLabel fakedepthLabel;
4570
- NumberSlider fakedepthField;
4952
+ cNumberSlider fakedepthField;
45714953 JLabel shadowbiasLabel;
4572
- NumberSlider shadowbiasField;
4954
+ cNumberSlider shadowbiasField;
45734955 JLabel bumpLabel;
4574
- NumberSlider bumpField;
4956
+ cNumberSlider bumpField;
45754957 JLabel noiseLabel;
4576
- NumberSlider noiseField;
4958
+ cNumberSlider noiseField;
45774959 JLabel powerLabel;
4578
- NumberSlider powerField;
4960
+ cNumberSlider powerField;
45794961 JLabel borderfadeLabel;
4580
- NumberSlider borderfadeField;
4962
+ cNumberSlider borderfadeField;
45814963 JLabel fogLabel;
4582
- NumberSlider fogField;
4964
+ cNumberSlider fogField;
45834965 JLabel opacityPowerLabel;
4584
- NumberSlider opacityPowerField;
4966
+ cNumberSlider opacityPowerField;
45854967 JTree jTree;
45864968 //ObjectUI parent;
4969
+
4970
+ cNumberSlider normalpushField;
4971
+
4972
+ private MenuItem importGFDItem;
4973
+ private MenuItem importVRMLX3DItem;
4974
+ private MenuItem import3DSItem;
4975
+ private MenuItem importOBJItem;
45874976 }