Normand Briere
2019-05-02 c209bbe1cf788c9af3dcffea7667c830170a3f1f
ObjEditor.java
....@@ -138,34 +138,41 @@
138138 public void closeUI()
139139 {
140140 //new Exception().printStackTrace();
141
- System.out.println("this = " + this);
142
- System.out.println("objEditor = " + objEditor);
141
+// System.out.println("this = " + this);
142
+// System.out.println("objEditor = " + objEditor);
143143 //nameField.removeActionListener(this);
144
- objEditor.ctrlPanel.remove(nameField);
144
+// objEditor.ctrlPanel.remove(nameField);
145
+
146
+ objEditor.ctrlPanel.remove(namePanel);
145147
146148 if (!GroupEditor.allparams)
147149 return;
148150
149
- objEditor.ctrlPanel.remove(liveCB);
150
- objEditor.ctrlPanel.remove(hideCB);
151
- objEditor.ctrlPanel.remove(markCB);
152
-
153
- objEditor.ctrlPanel.remove(randomCB);
154
- objEditor.ctrlPanel.remove(speedupCB);
155
- objEditor.ctrlPanel.remove(rewindCB);
156
-
157
- objEditor.ctrlPanel.remove(resetButton);
158
- objEditor.ctrlPanel.remove(stepButton);
159
-// objEditor.ctrlPanel.remove(stepAllButton);
160
-// objEditor.ctrlPanel.remove(resetAllButton);
161
- objEditor.ctrlPanel.remove(link2masterCB);
162
- //objEditor.ctrlPanel.remove(flipVCB);
163
- //objEditor.ctrlPanel.remove(texresMenu);
164
- objEditor.ctrlPanel.remove(slowerButton);
165
- objEditor.ctrlPanel.remove(fasterButton);
166
- objEditor.ctrlPanel.remove(remarkButton);
151
+// objEditor.ctrlPanel.remove(liveCB);
152
+// objEditor.ctrlPanel.remove(hideCB);
153
+// objEditor.ctrlPanel.remove(markCB);
154
+//
155
+// objEditor.ctrlPanel.remove(randomCB);
156
+// objEditor.ctrlPanel.remove(speedupCB);
157
+// objEditor.ctrlPanel.remove(rewindCB);
158
+//
159
+// objEditor.ctrlPanel.remove(resetButton);
160
+// objEditor.ctrlPanel.remove(stepButton);
161
+//// objEditor.ctrlPanel.remove(stepAllButton);
162
+//// objEditor.ctrlPanel.remove(resetAllButton);
163
+// objEditor.ctrlPanel.remove(link2masterCB);
164
+// //objEditor.ctrlPanel.remove(flipVCB);
165
+// //objEditor.ctrlPanel.remove(texresMenu);
166
+// objEditor.ctrlPanel.remove(slowerButton);
167
+// objEditor.ctrlPanel.remove(fasterButton);
168
+// objEditor.ctrlPanel.remove(remarkButton);
167169
168
- Remove(normalpushField);
170
+ objEditor.ctrlPanel.remove(setupPanel);
171
+ objEditor.ctrlPanel.remove(commandsPanel);
172
+ objEditor.ctrlPanel.remove(pushPanel);
173
+ //objEditor.ctrlPanel.remove(fillPanel);
174
+
175
+ //Remove(normalpushField);
169176 }
170177
171178 public ObjEditor GetEditor()
....@@ -302,44 +309,60 @@
302309 //normalLensItem.addActionListener(this);
303310 cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
304311 revertCameraItem.addActionListener(this);
305
- cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
306
- toggleTimelineItem.addItemListener(this);
312
+
307313 cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
308314 toggleFullScreenItem.addItemListener(this);
309315 toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
310316 cameraMenu.add("-");
317
+
311318 cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
312319 toggleTextureItem.addItemListener(this);
313320 toggleTextureItem.setState(CameraPane.textureon);
314
- cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
315
- toggleLiveItem.addItemListener(this);
316
- toggleLiveItem.setState(Globals.isLIVE());
317
- cameraMenu.add(stepItem = new MenuItem("Step"));
318
- stepItem.addActionListener(this);
319
-// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
320
-// toggleDLItem.addItemListener(this);
321
-// toggleDLItem.setState(false);
322
- cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
323
- toggleRenderItem.addItemListener(this);
324
- toggleRenderItem.setState(!CameraPane.frozen);
325
- cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
326
- toggleDebugItem.addItemListener(this);
327
- toggleDebugItem.setState(CameraPane.DEBUG);
328
- cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
329
- toggleFrustumItem.addItemListener(this);
330
- toggleFrustumItem.setState(CameraPane.FRUSTUM);
331
- cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
332
- toggleFootContactItem.addItemListener(this);
333
- toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
334
- cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random"));
335
- toggleRandomItem.addItemListener(this);
336
- toggleRandomItem.setState(CameraPane.RANDOM);
321
+
322
+ if (Globals.ADVANCED)
323
+ {
324
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
325
+ toggleLiveItem.addItemListener(this);
326
+ toggleLiveItem.setState(Globals.isLIVE());
327
+
328
+ cameraMenu.add(stepItem = new MenuItem("Step"));
329
+ stepItem.addActionListener(this);
330
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
331
+ // toggleDLItem.addItemListener(this);
332
+ // toggleDLItem.setState(false);
333
+
334
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
335
+ toggleRenderItem.addItemListener(this);
336
+ toggleRenderItem.setState(!CameraPane.frozen);
337
+
338
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
339
+ toggleDebugItem.addItemListener(this);
340
+ toggleDebugItem.setState(CameraPane.DEBUG);
341
+
342
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
343
+ toggleFrustumItem.addItemListener(this);
344
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
345
+
346
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
347
+ toggleFootContactItem.addItemListener(this);
348
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
349
+
350
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
351
+ toggleTimelineItem.addItemListener(this);
352
+ }
353
+
354
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
355
+ toggleSwitchItem.addItemListener(this);
356
+ toggleSwitchItem.setState(CameraPane.SWITCH);
357
+
337358 cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
338359 toggleHandleItem.addItemListener(this);
339360 toggleHandleItem.setState(CameraPane.HANDLES);
361
+
340362 cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
341363 togglePaintItem.addItemListener(this);
342364 togglePaintItem.setState(CameraPane.PAINTMODE);
365
+
343366 // cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
344367 // toggleRootItem.addItemListener(this);
345368 // toggleRootItem.setState(false);
....@@ -353,21 +376,23 @@
353376 objectPanel = new JTabbedPane();
354377 toolbarPanel = new JPanel();
355378 toolbarPanel.setName("Toolbar");
356
- treePanel = new JPanel();
379
+ treePanel = new cGridBag();
357380 treePanel.setName("Tree");
358
- ctrlPanel = new JPanel(); // new GridBagLayout());
381
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
359382 ctrlPanel.setName("Edit");
360
- materialPanel = new JPanel();
383
+ materialPanel = new cGridBag().setVertical(true);
361384 materialPanel.setName("Material");
362385 /*JTextPane*/
363386 infoarea = createTextPane();
387
+ doc = infoarea.getStyledDocument();
388
+
364389 infoarea.setEditable(true);
365390 SetText();
366391 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
367392 // infoarea.setOpaque(false);
368393 // //infoarea.setForeground(textcolor);
369
- infoarea.setLineWrap(true);
370
- infoarea.setWrapStyleWord(true);
394
+// TEXTAREA infoarea.setLineWrap(true);
395
+// TEXTAREA infoarea.setWrapStyleWord(true);
371396 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
372397 infoPanel.setPreferredSize(new Dimension(50, 200));
373398 infoPanel.setName("Info");
....@@ -378,16 +403,16 @@
378403 mainPanel.setName("Main");
379404 mainPanel.setContinuousLayout(true);
380405 mainPanel.setOneTouchExpandable(true);
381
- mainPanel.setDividerLocation(1.0);
382406 mainPanel.setDividerSize(9);
383
- mainPanel.setResizeWeight(0);
407
+ mainPanel.setDividerLocation(0.5); //1.0);
408
+ mainPanel.setResizeWeight(0.5);
384409
385410 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
386411 //mainPanel.setLayout(new GridBagLayout());
387412 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
388
- treePanel.setLayout(new GridBagLayout());
389
- ctrlPanel.setLayout(new GridBagLayout());
390
- materialPanel.setLayout(new GridBagLayout());
413
+// treePanel.setLayout(new GridBagLayout());
414
+ //ctrlPanel.setLayout(new GridBagLayout());
415
+ //materialPanel.setLayout(new GridBagLayout());
391416
392417 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
393418 GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0);
....@@ -426,7 +451,7 @@
426451 static String newline = "\n";
427452 protected static final String buttonString = "JButton";
428453 StyledDocument doc;
429
- JTextArea infoarea;
454
+ JTextPane infoarea;
430455
431456 void ClearInfo()
432457 {
....@@ -493,7 +518,10 @@
493518 }
494519
495520 if (full)
496
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
521
+ {
522
+ si.SendInfo(" BBox min: " + minima, "regular");
523
+ si.SendInfo(" BBox max: " + maxima, "regular");
524
+ }
497525
498526 if (sel.bRep != null)
499527 {
....@@ -591,6 +619,9 @@
591619 {
592620 CameraPane.pointflow = (PointFlow) sel;
593621 }
622
+
623
+ si.SendInfo("_____________________", "regular");
624
+ si.SendInfo("", "regular");
594625 }
595626 }
596627
....@@ -622,52 +653,52 @@
622653 cameraView.ToggleFullScreen();
623654 }
624655
625
- private JTextArea createTextPane()
656
+ private JTextPane createTextPane()
626657 {
627
- String[] initString =
628
- {
629
- "This is an editable JTextPane, ", //regular
630
- "another ", //italic
631
- "styled ", //bold
632
- "text ", //small
633
- "component, ", //large
634
- "which supports embedded components..." + newline,//regular
635
- " " + newline, //button
636
- "...and embedded icons..." + newline, //regular
637
- " ", //icon
638
- newline + "JTextPane is a subclass of JEditorPane that "
639
- + "uses a StyledEditorKit and StyledDocument, and provides "
640
- + "cover methods for interacting with those objects."
641
- };
658
+// TEXTAREA String[] initString =
659
+// {
660
+// "This is an editable JTextPane, ", //regular
661
+// "another ", //italic
662
+// "styled ", //bold
663
+// "text ", //small
664
+// "component, ", //large
665
+// "which supports embedded components..." + newline,//regular
666
+// " " + newline, //button
667
+// "...and embedded icons..." + newline, //regular
668
+// " ", //icon
669
+// newline + "JTextPane is a subclass of JEditorPane that "
670
+// + "uses a StyledEditorKit and StyledDocument, and provides "
671
+// + "cover methods for interacting with those objects."
672
+// };
673
+//
674
+// String[] initStyles =
675
+// {
676
+// "regular", "italic", "bold", "small", "large",
677
+// "regular", "button", "regular", "icon",
678
+// "regular"
679
+// };
680
+//
681
+// JTextPane textPane = new JTextPane();
682
+// textPane.setEditable(true);
683
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
684
+// addStylesToDocument(doc);
685
+//
686
+// try
687
+// {
688
+// for (int j = 0; j < 2; j++)
689
+// {
690
+// for (int i = 0; i < initString.length; i++)
691
+// {
692
+// doc.insertString(doc.getLength(), initString[i],
693
+// doc.getStyle(initStyles[i]));
694
+// }
695
+// }
696
+// } catch (BadLocationException ble)
697
+// {
698
+// System.err.println("Couldn't insert initial text into text pane.");
699
+// }
642700
643
- String[] initStyles =
644
- {
645
- "regular", "italic", "bold", "small", "large",
646
- "regular", "button", "regular", "icon",
647
- "regular"
648
- };
649
-
650
- JTextPane textPane = new JTextPane();
651
- textPane.setEditable(true);
652
- /*StyledDocument*/ doc = textPane.getStyledDocument();
653
- addStylesToDocument(doc);
654
-
655
- try
656
- {
657
- for (int j = 0; j < 2; j++)
658
- {
659
- for (int i = 0; i < initString.length; i++)
660
- {
661
- doc.insertString(doc.getLength(), initString[i],
662
- doc.getStyle(initStyles[i]));
663
- }
664
- }
665
- } catch (BadLocationException ble)
666
- {
667
- System.err.println("Couldn't insert initial text into text pane.");
668
- }
669
-
670
- return new JTextArea(); // textPane;
701
+ return new JTextPane(); // textPane;
671702 }
672703
673704 protected void addStylesToDocument(StyledDocument doc)
....@@ -767,115 +798,83 @@
767798 JButton slowerButton;
768799 JButton fasterButton;
769800 JButton remarkButton;
801
+
802
+ cGridBag namePanel;
803
+ cGridBag setupPanel;
804
+ cGridBag commandsPanel;
805
+ cGridBag pushPanel;
806
+ cGridBag fillPanel;
770807
771
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
808
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
772809 {
773810 JCheckBox cb;
774811
775
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
776
- oe.aConstraints.gridwidth = 1; // 3;
777
-// oe.aConstraints.weightx = 1;
778
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
779
- oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
812
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
780813 cb.addItemListener(this);
781
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
782
- oe.aConstraints.gridwidth = 1;
783
- oe.aConstraints.gridx += 1;
784814
785815 return cb;
786816 }
787817
788
- cButton AddButton(ObjEditor oe, String label)
818
+ cButton AddButton(cGridBag panel, String label)
789819 {
790820 cButton cb;
791821
792
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
793
- oe.aConstraints.gridwidth = 1;
794
-// oe.aConstraints.weightx = 1;
795
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
796
- oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
822
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
797823 cb.addActionListener(this);
798
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
799
- oe.aConstraints.gridwidth = 1;
800
- oe.aConstraints.gridx += 1;
801824
802825 return cb;
803826 }
804827
805
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
828
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
806829 {
807830 JComboBox combo;
808831
809
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
810
- oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
811
- oe.aConstraints.gridx += 1;
832
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
812833 combo.addActionListener(this);
813834
814835 return combo;
815836 }
816837
817
- NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow)
838
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
818839 {
819
- NumberSlider combo;
840
+ cGridBag control = new cGridBag();
841
+
842
+ cNumberSlider combo;
820843
821844 JLabel jlabel = new JLabel(label);
822
-
823
- aConstraints.fill = GridBagConstraints.VERTICAL;
824845 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
825
- aConstraints.gridwidth = 1;
826
- ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
827
- aConstraints.gridx += 1;
828
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
829
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
830
- ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
831
- aConstraints.gridx += 1;
832
- aConstraints.gridwidth = 1;
833
-
846
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
847
+ control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
834848 combo.setFloat(current);
835
-
836
- combo.label = jlabel;
837
-
838
- combo.addChangeListener(this);
839
-
840
- return combo;
849
+
850
+ panel.add(control);
851
+
852
+ return control;
841853 }
842854
843
- NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current)
855
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
844856 {
845
- NumberSlider combo;
857
+ cGridBag control = new cGridBag();
858
+
859
+ cNumberSlider combo;
846860
847861 JLabel jlabel = new JLabel(label);
848
-
849
- aConstraints.fill = GridBagConstraints.VERTICAL;
850862 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
851
- aConstraints.gridwidth = 2;
852
- ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
853
- aConstraints.gridx += 1;
854
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
855
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
856
- ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
857
- aConstraints.gridx += 1;
858
- aConstraints.gridwidth = 1;
859
-
863
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
864
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
860865 combo.setInteger(current);
861866
862
- combo.label = jlabel;
863
-
864
- combo.addChangeListener(this);
865
-
866
- return combo;
867
+ panel.add(control);
868
+
869
+ return control;
867870 }
868871
869
- JTextArea AddText(JPanel ctrlPanel, String name)
872
+ JTextArea AddText(cGridBag ctrlPanel, String name)
870873 {
871874 JTextArea text;
872875
873
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
874
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
875
- ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
876
+ ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
876877 text.addCaretListener(this);
877
- aConstraints.gridx += 1;
878
- aConstraints.gridwidth = 1;
879878
880879 return text;
881880 }
....@@ -905,9 +904,16 @@
905904 objEditor.ctrlPanel.remove(j);
906905 }
907906
907
+ void Remove(cNumberSlider j)
908
+ {
909
+ j.removeChangeListener(this);
910
+ //objEditor.ctrlPanel.remove(j.label);
911
+ objEditor.ctrlPanel.remove(j);
912
+ }
913
+
908914 /*
909915 */
910
- void Return() // ObjEditor oe)
916
+ void Return0() // ObjEditor oe)
911917 {
912918 aConstraints.gridy += 1;
913919 aConstraints.gridx = 0;
....@@ -962,37 +968,70 @@
962968
963969 void SetupUI2(ObjEditor oe)
964970 {
965
-// oe.aConstraints.weightx = 0;
966
-// oe.aConstraints.weighty = 0;
967
-// oe.aConstraints.gridx = 0;
968
-// oe.aConstraints.gridy = 0;
969
- SetupName(oe);
971
+ //SetupName(oe);
972
+
973
+ namePanel = new cGridBag();
974
+
975
+ nameField = AddText(namePanel, copy.GetName());
976
+ namePanel.add(nameField);
977
+ oe.ctrlPanel.add(namePanel);
978
+
979
+ oe.ctrlPanel.Return();
970980
971981 if (!GroupEditor.allparams)
972982 return;
973983
974
- liveCB = AddCheckBox(oe, "Live", copy.live);
975
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
976
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
984
+ setupPanel = new cGridBag().setVertical(false);
985
+
986
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
987
+ liveCB.setToolTipText("Animate object");
988
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
989
+ hideCB.setToolTipText("Hide object");
977990 // Return();
978
- markCB = AddCheckBox(oe, "Mark", copy.marked);
979
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
980
- randomCB = AddCheckBox(oe, "Rand", copy.random);
981
- Return();
982
- resetButton = AddButton(oe, "Reset");
983
- stepButton = AddButton(oe, "Step");
991
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
992
+ markCB.setToolTipText("Set the animation target transform");
993
+
994
+ rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
995
+ rewindCB.setToolTipText("Rewind animation");
996
+
997
+ randomCB = AddCheckBox(setupPanel, "Random", copy.random);
998
+ randomCB.setToolTipText("Option for switch node");
999
+
1000
+ if (Globals.ADVANCED)
1001
+ {
1002
+ link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
1003
+ link2masterCB.setToolTipText("Attach to support");
1004
+ speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
1005
+ speedupCB.setToolTipText("Option motion capture");
1006
+ }
1007
+
1008
+ oe.ctrlPanel.add(setupPanel);
1009
+ oe.ctrlPanel.Return();
1010
+
1011
+ commandsPanel = new cGridBag().setVertical(false);
1012
+
1013
+ resetButton = AddButton(commandsPanel, "Reset");
1014
+ resetButton.setToolTipText("Jump to frame zero");
1015
+ stepButton = AddButton(commandsPanel, "Step");
1016
+ stepButton.setToolTipText("Step one frame");
9841017 // resetAllButton = AddButton(oe, "Reset All");
9851018 // stepAllButton = AddButton(oe, "Step All");
986
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
9871019 // Return();
988
- slowerButton = AddButton(oe, "Slow");
989
- fasterButton = AddButton(oe, "Fast");
990
- remarkButton = AddButton(oe, "Rem");
1020
+ slowerButton = AddButton(commandsPanel, "Slow");
1021
+ slowerButton.setToolTipText("Decrease animation speed");
1022
+ fasterButton = AddButton(commandsPanel, "Fast");
1023
+ fasterButton.setToolTipText("Increase animation speed");
1024
+ remarkButton = AddButton(commandsPanel, "Remark");
1025
+ remarkButton.setToolTipText("Set the current transform as the target");
9911026
992
- Return();
1027
+ oe.ctrlPanel.add(commandsPanel);
1028
+ oe.ctrlPanel.Return();
9931029
994
- normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
995
- Return();
1030
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
1031
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
1032
+ //Return();
1033
+
1034
+ oe.ctrlPanel.Return();
9961035
9971036 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
9981037 // ObjEditor.aConstraints.gridx += 1;
....@@ -1087,7 +1126,7 @@
10871126 oe.aConstraints.gridwidth = 1;
10881127 /**/
10891128 nameField = AddText(oe.ctrlPanel, copy.GetName());
1090
- Return();
1129
+ oe.ctrlPanel.Return();
10911130
10921131 //ctrlPanel.add(textureButton = new Button("Texture..."));
10931132 //textureButton.setEnabled(false);
....@@ -1189,7 +1228,8 @@
11891228 //JPanel worldPanel =
11901229 // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true);
11911230 //worldPanel.setName("World");
1192
- centralPanel = new JPanel(new BorderLayout());
1231
+ centralPanel = new cGridBag();
1232
+ centralPanel.preferredWidth = 20;
11931233 timelinePanel = new JPanel(new BorderLayout());
11941234 timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
11951235
....@@ -1222,6 +1262,7 @@
12221262 XYZPanel = new cGridBag().setVertical(true);
12231263 //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
12241264
1265
+ XYZPanel.preferredWidth = 5;
12251266 XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
12261267 XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
12271268 XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
....@@ -1262,10 +1303,11 @@
12621303 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12631304 //tmp.setName("Edit");
12641305 objectPanel.add(materialPanel);
1265
- JPanel north = new JPanel(new BorderLayout());
1266
- north.setName("Edit");
1267
- north.add(ctrlPanel, BorderLayout.NORTH);
1268
- objectPanel.add(north);
1306
+// JPanel north = new JPanel(new BorderLayout());
1307
+// north.setName("Edit");
1308
+// north.add(ctrlPanel, BorderLayout.NORTH);
1309
+// objectPanel.add(north);
1310
+ objectPanel.add(ctrlPanel);
12691311 objectPanel.add(infoPanel);
12701312
12711313 /*
....@@ -1286,19 +1328,23 @@
12861328 scrollpane.setWheelScrollingEnabled(true);
12871329 scrollpane.addMouseWheelListener(this); // Default not fast enough
12881330
1289
- /*JTabbedPane*/ scenePanel = new JTabbedPane();
1290
- scenePanel.add(scrollpane);
1331
+ /*JTabbedPane*/ scenePanel = new cGridBag();
1332
+ scenePanel.preferredWidth = 7;
1333
+
1334
+ JTabbedPane tabbedPane = new JTabbedPane();
1335
+ tabbedPane.add(scrollpane);
12911336
1292
- scenePanel.add(FSPane = new cFileSystemPane(this));
1337
+ tabbedPane.add(FSPane = new cFileSystemPane(this));
12931338
1294
- optionsPanel = new JPanel(new GridBagLayout());
1339
+ optionsPanel = new cGridBag().setVertical(true);
12951340
12961341 optionsPanel.setName("Options");
12971342
1298
- AddOptions(optionsPanel, aConstraints);
1343
+ AddOptions(optionsPanel); //, aConstraints);
12991344
1300
- scenePanel.add(optionsPanel);
1301
-
1345
+ tabbedPane.add(optionsPanel);
1346
+
1347
+ scenePanel.add(tabbedPane);
13021348
13031349 /*
13041350 cTree jTree = new cTree(null);
....@@ -1405,7 +1451,7 @@
14051451 });
14061452 }
14071453
1408
- void AddOptions(JPanel panel, GridBagConstraints constraints)
1454
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
14091455 {
14101456 }
14111457
....@@ -1420,260 +1466,173 @@
14201466 ctrlPanel.removeAll();
14211467 }
14221468
1423
- void SetupMaterial(JPanel ctrlPanel)
1469
+ void SetupMaterial(cGridBag panel)
14241470 {
1425
- aConstraints.weighty = 0;
1426
- //aConstraints.weightx = 1;
1427
- /*
1471
+ /*
14281472 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
14291473 materialLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1430
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1431
- aConstraints.gridx += 1;
14321474 */
14331475
1434
- aConstraints.gridwidth = 1;
1435
- ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints);
1436
- aConstraints.gridx += 1;
1437
- aConstraints.weighty = 0;
1438
- aConstraints.gridwidth = 1;
1476
+ cGridBag editBar = new cGridBag().setVertical(false);
1477
+
1478
+ editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1479
+ createMaterialButton.setToolTipText("Create material");
14391480
14401481 /*
14411482 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
1442
- aConstraints.gridx += 1;
1443
- aConstraints.weighty = 0;
1444
- aConstraints.gridwidth = 1;
14451483 */
14461484
1447
- ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints);
1448
- aConstraints.gridx += 1;
1485
+ editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1486
+ clearMaterialButton.setToolTipText("Clear material");
1487
+
1488
+ if (Globals.ADVANCED)
1489
+ {
1490
+ editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1491
+ editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1492
+ editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1493
+ }
14491494
1450
- ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints);
1451
-
1452
- aConstraints.gridx += 1;
1453
-
1454
- ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints);
1455
-
1456
- aConstraints.gridx += 1;
1457
-
1458
- ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints);
1459
-
1460
- aConstraints.gridx = 0;
1461
- aConstraints.gridy += 1;
1462
- aConstraints.weighty = 0;
1463
- aConstraints.gridwidth = 1;
1495
+ editBar.preferredHeight = 15;
1496
+
1497
+ panel.add(editBar);
1498
+
14641499 /**/
14651500 //aConstraints.weighty = 0;
14661501 ////aConstraints.weightx = 1;
14671502 //aConstraints.weighty = 1;
14681503 aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
14691504 //aConstraints.gridx += 1;
1470
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1471
- aConstraints.weighty = 0;
1472
- aConstraints.gridx = 0;
1473
- aConstraints.gridy += 1;
1474
- aConstraints.gridwidth = 1;
1505
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14751506
1476
- ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints);
1477
- colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1478
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1479
- aConstraints.gridx += 1;
1480
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1481
- //aConstraints.weightx = 0;
1482
- ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1483
- aConstraints.gridx = 0;
1484
- aConstraints.gridy += 1;
1485
- aConstraints.gridwidth = 1;
1507
+ cGridBag colorSection = new cGridBag().setVertical(true);
1508
+
1509
+ cGridBag color = new cGridBag();
1510
+ color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
1511
+ colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1512
+ color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1513
+ //colorField.preferredWidth = 200;
1514
+ colorSection.add(color);
14861515
1487
- ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints);
1488
- modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1489
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1490
- aConstraints.gridx += 1;
1491
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1492
- ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1493
- aConstraints.gridx = 0;
1494
- aConstraints.gridy += 1;
1495
- aConstraints.gridwidth = 1;
1516
+ cGridBag modulation = new cGridBag();
1517
+ modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints);
1518
+ modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1519
+ modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1520
+ colorSection.add(modulation);
14961521
1497
- ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints);
1498
- textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1499
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1500
- aConstraints.gridx += 1;
1501
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1502
- ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1503
- aConstraints.gridx = 0;
1504
- aConstraints.gridy += 1;
1505
- aConstraints.gridwidth = 1;
1522
+ cGridBag texture = new cGridBag();
1523
+ texture.add(textureLabel = new JLabel("Texture")); // , aConstraints);
1524
+ textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1525
+ texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1526
+ colorSection.add(texture);
15061527
1507
- ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints);
1508
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1509
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1510
- aConstraints.gridx += 1;
1511
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1512
- ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1513
- aConstraints.gridx = 0;
1514
- aConstraints.gridy += 1;
1515
- aConstraints.gridwidth = 1;
1528
+ cGridBag anisoU = new cGridBag();
1529
+ anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1530
+ anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1531
+ anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1532
+ colorSection.add(anisoU);
15161533
1517
- ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints);
1518
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1519
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1520
- aConstraints.gridx += 1;
1521
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1522
- ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1523
- aConstraints.gridx = 0;
1524
- aConstraints.gridy += 1;
1525
- aConstraints.gridwidth = 1;
1534
+ cGridBag anisoV = new cGridBag();
1535
+ anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1536
+ anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1537
+ anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1538
+ colorSection.add(anisoV);
15261539
1527
- ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints);
1528
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1529
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1530
- aConstraints.gridx += 1;
1531
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1532
- ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints);
1533
- aConstraints.gridx = 0;
1534
- aConstraints.gridy += 1;
1535
- aConstraints.gridwidth = 1;
1540
+ cGridBag shadowbias = new cGridBag();
1541
+ shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1542
+ shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1543
+ shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1544
+ colorSection.add(shadowbias);
15361545
1537
- //aConstraints.weighty = 1;
1538
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1539
- //aConstraints.gridx += 1;
1540
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1541
- aConstraints.weighty = 0;
1542
- aConstraints.gridx = 0;
1543
- aConstraints.gridy += 1;
1544
- aConstraints.gridwidth = 1;
1546
+ panel.add(new JSeparator());
1547
+
1548
+ panel.add(colorSection);
1549
+
1550
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1551
+
1552
+ cGridBag diffuseSection = new cGridBag().setVertical(true);
1553
+
1554
+ cGridBag diffuse = new cGridBag();
1555
+ diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints);
1556
+ diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1557
+ diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1558
+ diffuseSection.add(diffuse);
15451559
1546
- ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints);
1547
- diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1548
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1549
- aConstraints.gridx += 1;
1550
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1551
- ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints);
1552
- aConstraints.gridx = 0;
1553
- aConstraints.gridy += 1;
1554
- aConstraints.gridwidth = 1;
1560
+ cGridBag diffuseness = new cGridBag();
1561
+ diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints);
1562
+ diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1563
+ diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1564
+ diffuseSection.add(diffuseness);
15551565
1556
- ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints);
1557
- diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1558
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1559
- aConstraints.gridx += 1;
1560
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1561
- ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints);
1562
- aConstraints.gridx = 0;
1563
- aConstraints.gridy += 1;
1564
- aConstraints.gridwidth = 1;
1566
+ cGridBag selfshadow = new cGridBag();
1567
+ selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints);
1568
+ selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1569
+ selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1570
+ diffuseSection.add(selfshadow);
15651571
1566
- ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints);
1567
- selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1568
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1569
- aConstraints.gridx += 1;
1570
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1571
- ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints);
1572
- aConstraints.gridx = 0;
1573
- aConstraints.gridy += 1;
1574
- aConstraints.gridwidth = 1;
1572
+ cGridBag sheen = new cGridBag();
1573
+ sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints);
1574
+ sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1575
+ sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1576
+ diffuseSection.add(sheen);
15751577
1576
- ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints);
1577
- sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1578
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1579
- aConstraints.gridx += 1;
1580
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1581
- ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints);
1582
- aConstraints.gridx = 0;
1583
- aConstraints.gridy += 1;
1584
- aConstraints.gridwidth = 1;
1578
+ cGridBag subsurface = new cGridBag();
1579
+ subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints);
1580
+ subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1581
+ subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1582
+ diffuseSection.add(subsurface);
15851583
1586
- ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints);
1587
- subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1588
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1589
- aConstraints.gridx += 1;
1590
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1591
- ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1592
- aConstraints.gridx = 0;
1593
- aConstraints.gridy += 1;
1594
- aConstraints.gridwidth = 1;
1584
+ cGridBag shadow = new cGridBag();
1585
+ shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints);
1586
+ shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1587
+ shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1588
+ diffuseSection.add(shadow);
15951589
1596
- ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints);
1597
- shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1598
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1599
- aConstraints.gridx += 1;
1600
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1601
- ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints);
1602
- aConstraints.gridx = 0;
1603
- aConstraints.gridy += 1;
1604
- aConstraints.gridwidth = 1;
1590
+ cGridBag fakedepth = new cGridBag();
1591
+ fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints);
1592
+ fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1593
+ fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1594
+ diffuseSection.add(fakedepth);
16051595
1606
- ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints);
1607
- fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1608
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1609
- aConstraints.gridx += 1;
1610
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1611
- ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints);
1612
- aConstraints.gridx = 0;
1613
- aConstraints.gridy += 1;
1614
- aConstraints.gridwidth = 1;
1596
+ panel.add(new JSeparator());
1597
+
1598
+ panel.add(diffuseSection);
1599
+
1600
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1601
+
1602
+ cGridBag specularSection = new cGridBag().setVertical(true);
16151603
1616
- //aConstraints.weighty = 1;
1617
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1618
- //aConstraints.gridx += 1;
1619
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1620
- aConstraints.weighty = 0;
1621
- aConstraints.gridx = 0;
1622
- aConstraints.gridy += 1;
1623
- aConstraints.gridwidth = 1;
1604
+ cGridBag specular = new cGridBag();
1605
+ specular.add(specularLabel = new JLabel("Specular")); // , aConstraints);
1606
+ specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1607
+ specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1608
+ specularSection.add(specular);
16241609
1625
- ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints);
1626
- specularLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1627
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1628
- aConstraints.gridx += 1;
1629
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1630
- ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints);
1631
- aConstraints.gridx = 0;
1632
- aConstraints.gridy += 1;
1633
- aConstraints.gridwidth = 1;
1610
+ cGridBag lightarea = new cGridBag();
1611
+ lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints);
1612
+ lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1613
+ lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1614
+ specularSection.add(lightarea);
16341615
1635
- ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints);
1636
- lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1637
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1638
- aConstraints.gridx += 1;
1639
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1640
- ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints);
1641
- aConstraints.gridx = 0;
1642
- aConstraints.gridy += 1;
1643
- aConstraints.gridwidth = 1;
1616
+ cGridBag shininess = new cGridBag();
1617
+ shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints);
1618
+ shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1619
+ shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1620
+ specularSection.add(shininess);
16441621
1645
- ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints);
1646
- shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1647
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1648
- aConstraints.gridx += 1;
1649
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1650
- ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints);
1651
- aConstraints.gridx = 0;
1652
- aConstraints.gridy += 1;
1653
- aConstraints.gridwidth = 1;
1622
+ cGridBag metalness = new cGridBag();
1623
+ metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints);
1624
+ metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1625
+ metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1626
+ specularSection.add(metalness);
16541627
1655
- ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints);
1656
- metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1657
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1658
- aConstraints.gridx += 1;
1659
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1660
- ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1661
- aConstraints.gridx = 0;
1662
- aConstraints.gridy += 1;
1663
- aConstraints.gridwidth = 1;
1628
+ cGridBag velvet = new cGridBag();
1629
+ velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints);
1630
+ velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1631
+ velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1632
+ specularSection.add(velvet);
16641633
1665
- ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints);
1666
- velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1667
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1668
- aConstraints.gridx += 1;
1669
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1670
- ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints);
1671
- aConstraints.gridx = 0;
1672
- aConstraints.gridy += 1;
1673
- aConstraints.gridwidth = 1;
1674
-
1675
- shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1);
1676
- Return();
1634
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
1635
+ //Return();
16771636 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
16781637 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16791638 // aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -1684,130 +1643,93 @@
16841643 // aConstraints.gridy += 1;
16851644 // aConstraints.gridwidth = 1;
16861645
1687
- //aConstraints.weighty = 1;
1688
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1689
- //aConstraints.gridx += 1;
1690
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1691
- aConstraints.weighty = 0;
1692
- aConstraints.gridx = 0;
1693
- aConstraints.gridy += 1;
1694
- aConstraints.gridwidth = 1;
16951646
1696
- ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints);
1697
- cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1698
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1699
- aConstraints.gridx += 1;
1700
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1701
- ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints);
1702
- aConstraints.gridx = 0;
1703
- aConstraints.gridy += 1;
1704
- aConstraints.gridwidth = 1;
1647
+ panel.add(new JSeparator());
1648
+
1649
+ panel.add(specularSection);
1650
+
1651
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1652
+
1653
+ cGridBag globalSection = new cGridBag().setVertical(true);
17051654
1706
- ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints);
1707
- ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1708
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1709
- aConstraints.gridx += 1;
1710
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1711
- ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints);
1712
- aConstraints.gridx = 0;
1713
- aConstraints.gridy += 1;
1714
- aConstraints.gridwidth = 1;
1655
+ cGridBag camera = new cGridBag();
1656
+ camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
1657
+ cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1658
+ camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1659
+ globalSection.add(camera);
17151660
1716
- ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints);
1717
- backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1718
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1719
- aConstraints.gridx += 1;
1720
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1721
- ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints);
1722
- aConstraints.gridx = 0;
1723
- aConstraints.gridy += 1;
1724
- aConstraints.gridwidth = 1;
1661
+ cGridBag ambient = new cGridBag();
1662
+ ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
1663
+ ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1664
+ ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1665
+ globalSection.add(ambient);
17251666
1726
- ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints);
1727
- opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1728
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1729
- aConstraints.gridx += 1;
1730
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1731
- ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints);
1732
- aConstraints.gridx = 0;
1733
- aConstraints.gridy += 1;
1734
- aConstraints.gridwidth = 1;
1735
- aConstraints.weighty = 0;
1667
+ cGridBag backlit = new cGridBag();
1668
+ backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
1669
+ backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1670
+ backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1671
+ globalSection.add(backlit);
17361672
1737
- ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints);
1738
- bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1739
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1740
- aConstraints.gridx += 1;
1741
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1742
- ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints);
1743
- aConstraints.gridx = 0;
1744
- aConstraints.gridy += 1;
1745
- aConstraints.gridwidth = 1;
1673
+ cGridBag opacity = new cGridBag();
1674
+ opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
1675
+ opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1676
+ opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1677
+ globalSection.add(opacity);
17461678
1747
- ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints);
1748
- noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1749
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1750
- aConstraints.gridx += 1;
1751
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1752
- ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints);
1753
- aConstraints.gridx = 0;
1754
- aConstraints.gridy += 1;
1755
- aConstraints.gridwidth = 1;
1679
+ panel.add(new JSeparator());
1680
+
1681
+ panel.add(globalSection);
1682
+
1683
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
1684
+
1685
+ cGridBag textureSection = new cGridBag().setVertical(true);
17561686
1757
- ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints);
1758
- powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1759
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1760
- aConstraints.gridx += 1;
1761
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1762
- ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints);
1763
- aConstraints.gridx = 0;
1764
- aConstraints.gridy += 1;
1765
- aConstraints.gridwidth = 1;
1687
+ cGridBag bump = new cGridBag();
1688
+ bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints);
1689
+ bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1690
+ bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
1691
+ textureSection.add(bump);
17661692
1767
- ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints);
1768
- borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1769
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1770
- aConstraints.gridx += 1;
1771
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1772
- ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints);
1773
- aConstraints.gridx = 0;
1774
- aConstraints.gridy += 1;
1775
- aConstraints.gridwidth = 1;
1693
+ cGridBag noise = new cGridBag();
1694
+ noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints);
1695
+ noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1696
+ noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints);
1697
+ textureSection.add(noise);
17761698
1777
- ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints);
1778
- fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1779
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1780
- aConstraints.gridx += 1;
1781
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1782
- ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints);
1783
- aConstraints.gridx = 0;
1784
- aConstraints.gridy += 1;
1785
- aConstraints.gridwidth = 1;
1699
+ cGridBag power = new cGridBag();
1700
+ power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints);
1701
+ powerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1702
+ power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints);
1703
+ textureSection.add(power);
17861704
1787
- ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints);
1788
- opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1789
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
1790
- aConstraints.gridx += 1;
1791
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
1792
- ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints);
1793
- aConstraints.gridx = 0;
1794
- aConstraints.gridy += 1;
1795
- aConstraints.gridwidth = 1;
1705
+ cGridBag borderfade = new cGridBag();
1706
+ borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints);
1707
+ borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1708
+ borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints);
1709
+ textureSection.add(borderfade);
17961710
1797
- //aConstraints.weighty = 1;
1798
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100;
1799
- //aConstraints.gridx += 1;
1800
- ctrlPanel.add(new JLabel("----------------------------------"), aConstraints);
1801
- aConstraints.weighty = 0;
1711
+ cGridBag fog = new cGridBag();
1712
+ fog.add(fogLabel = new JLabel("Punch")); // , aConstraints);
1713
+ fogLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1714
+ fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints);
1715
+ textureSection.add(fog);
18021716
1803
- aConstraints.gridx = 0;
1804
- aConstraints.gridy = 0;
1805
- aConstraints.gridwidth = 1;
1717
+ cGridBag opacityPower = new cGridBag();
1718
+ opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints);
1719
+ opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1720
+ opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
1721
+ textureSection.add(opacityPower);
1722
+
1723
+ panel.add(new JSeparator());
1724
+
1725
+ panel.add(textureSection);
1726
+
1727
+ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
18061728
18071729 SetMaterial(copy); // .GetMaterial());
18081730
1809
- colorField.addChangeListener(this);
1810
- modulationField.addChangeListener(this);
1731
+ //colorField.addChangeListener(this);
1732
+// modulationField.addChangeListener(this);
18111733 metalnessField.addChangeListener(this);
18121734 diffuseField.addChangeListener(this);
18131735 specularField.addChangeListener(this);
....@@ -1837,12 +1759,15 @@
18371759 opacityPowerField.addChangeListener(this);
18381760 /**/
18391761
1840
- resetSlidersButton.addActionListener(this);
18411762 clearMaterialButton.addActionListener(this);
18421763 createMaterialButton.addActionListener(this);
1843
-
1844
- propagateToggle.addItemListener(this);
1845
- multiplyToggle.addItemListener(this);
1764
+
1765
+ if (Globals.ADVANCED)
1766
+ {
1767
+ resetSlidersButton.addActionListener(this);
1768
+ propagateToggle.addItemListener(this);
1769
+ multiplyToggle.addItemListener(this);
1770
+ }
18461771 }
18471772
18481773 void DropFile(java.io.File[] files, boolean textures)
....@@ -2619,6 +2544,7 @@
26192544 }
26202545 if (input == null)
26212546 {
2547
+ new Exception().printStackTrace();
26222548 System.exit(0);
26232549 }
26242550
....@@ -2833,7 +2759,8 @@
28332759 return;
28342760 }
28352761
2836
- multiplyToggle.setSelected(mat.multiply);
2762
+ if (multiplyToggle != null)
2763
+ multiplyToggle.setSelected(mat.multiply);
28372764
28382765 assert (object.projectedVertices != null);
28392766
....@@ -3048,7 +2975,7 @@
30482975 frame.validate();
30492976
30502977 return;
3051
- } else if (event.getSource() == toggleRandomItem)
2978
+ } else if (event.getSource() == toggleSwitchItem)
30522979 {
30532980 cameraView.ToggleRandom();
30542981 cameraView.repaint();
....@@ -3093,6 +3020,7 @@
30933020 if (event.getSource() == randomCB)
30943021 {
30953022 copy.random ^= true;
3023
+ objEditor.refreshContents();
30963024 return;
30973025 }
30983026 if (event.getSource() == speedupCB)
....@@ -3316,7 +3244,7 @@
33163244 if (!Globals.ANIMATION)
33173245 {
33183246 FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3319
- browser.show();
3247
+ browser.setVisible(true);
33203248 String filename = browser.getFile();
33213249 if (filename != null && filename.length() > 0)
33223250 {
....@@ -3348,6 +3276,7 @@
33483276 callee.refreshContents();
33493277 } else
33503278 {
3279
+ new Exception().printStackTrace();
33513280 System.exit(0);
33523281 }
33533282 }
....@@ -3377,7 +3306,7 @@
33773306 void CreateMaterial()
33783307 {
33793308 //copy.ClearMaterial(); // PATCH
3380
- copy.CreateMaterialS(multiplyToggle.isSelected());
3309
+ copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected());
33813310 if (copy.selection.size() > 0)
33823311 //SetMaterial(copy);
33833312 {
....@@ -3436,11 +3365,11 @@
34363365 {
34373366 copy.ResetBlockLoop(); // temporary problem
34383367
3439
- boolean random = CameraPane.RANDOM;
3440
- CameraPane.RANDOM = false; // parse everything
3368
+ boolean random = CameraPane.SWITCH;
3369
+ CameraPane.SWITCH = false; // parse everything
34413370 copy.ResetDisplayList();
34423371 copy.HardTouch();
3443
- CameraPane.RANDOM = random;
3372
+ CameraPane.SWITCH = random;
34443373 }
34453374
34463375 // public void applySelf()
....@@ -3510,7 +3439,7 @@
35103439 current.fakedepth = (float) fakedepthField.getFloat();
35113440 current.shadowbias = (float) shadowbiasField.getFloat();
35123441
3513
- if (!NumberSlider.frozen)
3442
+ if (!cNumberSlider.frozen)
35143443 {
35153444 //System.out.println("Propagate = " + propagate);
35163445 copy.UpdateMaterial(anchor, current, propagate);
....@@ -3558,6 +3487,7 @@
35583487 || e.getSource() == apertureField
35593488 || e.getSource() == shadowblurField)
35603489 {
3490
+ new Exception().printStackTrace();
35613491 System.exit(0);
35623492 cameraView.options1[0] = (float) focusField.getFloat() * 10;
35633493 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -3883,7 +3813,7 @@
38833813
38843814 radioPanel.revalidate();
38853815 radioPanel.repaint();
3886
- ctrlPanel.revalidate(); // ? new
3816
+ ctrlPanel.validate(); // ? new
38873817 ctrlPanel.repaint();
38883818 }
38893819 }
....@@ -4529,8 +4459,8 @@
45294459 //MenuItem normalLensItem;
45304460 MenuItem editCameraItem;
45314461 MenuItem revertCameraItem;
4532
- CheckboxMenuItem toggleLiveItem;
45334462 MenuItem stepItem;
4463
+ CheckboxMenuItem toggleLiveItem;
45344464 CheckboxMenuItem toggleFullScreenItem;
45354465 CheckboxMenuItem toggleTimelineItem;
45364466 CheckboxMenuItem toggleRenderItem;
....@@ -4539,7 +4469,7 @@
45394469 CheckboxMenuItem toggleFootContactItem;
45404470 CheckboxMenuItem toggleDLItem;
45414471 CheckboxMenuItem toggleTextureItem;
4542
- CheckboxMenuItem toggleRandomItem;
4472
+ CheckboxMenuItem toggleSwitchItem;
45434473 CheckboxMenuItem toggleRootItem;
45444474 CheckboxMenuItem animationItem;
45454475 CheckboxMenuItem toggleHandleItem;
....@@ -4547,20 +4477,20 @@
45474477 JSplitPane mainPanel;
45484478 JScrollPane scrollpane;
45494479 JPanel toolbarPanel;
4550
- JPanel treePanel;
4480
+ cGridBag treePanel;
45514481 JPanel radioPanel;
45524482 ButtonGroup buttonGroup;
4553
- JPanel ctrlPanel;
4554
- JPanel materialPanel;
4483
+ cGridBag ctrlPanel;
4484
+ cGridBag materialPanel;
45554485 JScrollPane infoPanel;
4556
- JPanel optionsPanel;
4486
+ cGridBag optionsPanel;
45574487 JTabbedPane objectPanel;
45584488 cGridBag XYZPanel;
45594489 JSplitPane gridPanel;
45604490 JSplitPane bigPanel;
45614491 cGridBag bigThree;
4562
- JTabbedPane scenePanel;
4563
- JPanel centralPanel;
4492
+ cGridBag scenePanel;
4493
+ cGridBag centralPanel;
45644494 JSplitPane cameraPanel;
45654495 JPanel timelinePanel;
45664496 JMenuBar timelineMenubar;
....@@ -4613,67 +4543,67 @@
46134543 // MATERIAL
46144544 JLabel materialLabel;
46154545 JLabel colorLabel;
4616
- NumberSlider colorField;
4546
+ cNumberSlider colorField;
46174547 JLabel modulationLabel;
4618
- NumberSlider modulationField;
4548
+ cNumberSlider modulationField;
46194549 JLabel metalnessLabel;
4620
- NumberSlider metalnessField;
4550
+ cNumberSlider metalnessField;
46214551 JLabel diffuseLabel;
4622
- NumberSlider diffuseField;
4552
+ cNumberSlider diffuseField;
46234553 JLabel specularLabel;
4624
- NumberSlider specularField;
4554
+ cNumberSlider specularField;
46254555 JLabel shininessLabel;
4626
- NumberSlider shininessField;
4556
+ cNumberSlider shininessField;
46274557 JLabel shiftLabel;
4628
- NumberSlider shiftField;
4558
+ cNumberSlider shiftField;
46294559 JLabel ambientLabel;
4630
- NumberSlider ambientField;
4560
+ cNumberSlider ambientField;
46314561 JLabel lightareaLabel;
4632
- NumberSlider lightareaField;
4562
+ cNumberSlider lightareaField;
46334563 JLabel diffusenessLabel;
4634
- NumberSlider diffusenessField;
4564
+ cNumberSlider diffusenessField;
46354565 JLabel velvetLabel;
4636
- NumberSlider velvetField;
4566
+ cNumberSlider velvetField;
46374567 JLabel sheenLabel;
4638
- NumberSlider sheenField;
4568
+ cNumberSlider sheenField;
46394569 JLabel subsurfaceLabel;
4640
- NumberSlider subsurfaceField;
4570
+ cNumberSlider subsurfaceField;
46414571 //JLabel bumpLabel;
46424572 //NumberSlider bumpField;
46434573 JLabel backlitLabel;
4644
- NumberSlider backlitField;
4574
+ cNumberSlider backlitField;
46454575 JLabel anisoLabel;
4646
- NumberSlider anisoField;
4576
+ cNumberSlider anisoField;
46474577 JLabel anisoVLabel;
4648
- NumberSlider anisoVField;
4578
+ cNumberSlider anisoVField;
46494579 JLabel cameraLabel;
4650
- NumberSlider cameraField;
4580
+ cNumberSlider cameraField;
46514581 JLabel selfshadowLabel;
4652
- NumberSlider selfshadowField;
4582
+ cNumberSlider selfshadowField;
46534583 JLabel shadowLabel;
4654
- NumberSlider shadowField;
4584
+ cNumberSlider shadowField;
46554585 JLabel textureLabel;
4656
- NumberSlider textureField;
4586
+ cNumberSlider textureField;
46574587 JLabel opacityLabel;
4658
- NumberSlider opacityField;
4588
+ cNumberSlider opacityField;
46594589 JLabel fakedepthLabel;
4660
- NumberSlider fakedepthField;
4590
+ cNumberSlider fakedepthField;
46614591 JLabel shadowbiasLabel;
4662
- NumberSlider shadowbiasField;
4592
+ cNumberSlider shadowbiasField;
46634593 JLabel bumpLabel;
4664
- NumberSlider bumpField;
4594
+ cNumberSlider bumpField;
46654595 JLabel noiseLabel;
4666
- NumberSlider noiseField;
4596
+ cNumberSlider noiseField;
46674597 JLabel powerLabel;
4668
- NumberSlider powerField;
4598
+ cNumberSlider powerField;
46694599 JLabel borderfadeLabel;
4670
- NumberSlider borderfadeField;
4600
+ cNumberSlider borderfadeField;
46714601 JLabel fogLabel;
4672
- NumberSlider fogField;
4602
+ cNumberSlider fogField;
46734603 JLabel opacityPowerLabel;
4674
- NumberSlider opacityPowerField;
4604
+ cNumberSlider opacityPowerField;
46754605 JTree jTree;
46764606 //ObjectUI parent;
46774607
4678
- NumberSlider normalpushField;
4608
+ cNumberSlider normalpushField;
46794609 }