Normand Briere
2019-05-01 b1585b5b2b60c4165be400636c787fae24428c6a
ObjEditor.java
....@@ -138,34 +138,40 @@
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);
145145
146146 if (!GroupEditor.allparams)
147147 return;
148148
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);
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);
167167
168
- Remove(normalpushField);
168
+ objEditor.ctrlPanel.remove(namePanel);
169
+ objEditor.ctrlPanel.remove(setupPanel);
170
+ objEditor.ctrlPanel.remove(commandsPanel);
171
+ objEditor.ctrlPanel.remove(pushPanel);
172
+ //objEditor.ctrlPanel.remove(fillPanel);
173
+
174
+ //Remove(normalpushField);
169175 }
170176
171177 public ObjEditor GetEditor()
....@@ -353,21 +359,23 @@
353359 objectPanel = new JTabbedPane();
354360 toolbarPanel = new JPanel();
355361 toolbarPanel.setName("Toolbar");
356
- treePanel = new JPanel();
362
+ treePanel = new cGridBag();
357363 treePanel.setName("Tree");
358
- ctrlPanel = new cGridBag(); // new GridBagLayout());
364
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
359365 ctrlPanel.setName("Edit");
360366 materialPanel = new cGridBag().setVertical(true);
361367 materialPanel.setName("Material");
362368 /*JTextPane*/
363369 infoarea = createTextPane();
370
+ doc = infoarea.getStyledDocument();
371
+
364372 infoarea.setEditable(true);
365373 SetText();
366374 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
367375 // infoarea.setOpaque(false);
368376 // //infoarea.setForeground(textcolor);
369
- infoarea.setLineWrap(true);
370
- infoarea.setWrapStyleWord(true);
377
+// TEXTAREA infoarea.setLineWrap(true);
378
+// TEXTAREA infoarea.setWrapStyleWord(true);
371379 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
372380 infoPanel.setPreferredSize(new Dimension(50, 200));
373381 infoPanel.setName("Info");
....@@ -378,15 +386,15 @@
378386 mainPanel.setName("Main");
379387 mainPanel.setContinuousLayout(true);
380388 mainPanel.setOneTouchExpandable(true);
381
- mainPanel.setDividerLocation(1.0);
382389 mainPanel.setDividerSize(9);
383
- mainPanel.setResizeWeight(0);
390
+ mainPanel.setDividerLocation(0.5); //1.0);
391
+ mainPanel.setResizeWeight(0.5);
384392
385393 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
386394 //mainPanel.setLayout(new GridBagLayout());
387395 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
388
- treePanel.setLayout(new GridBagLayout());
389
- ctrlPanel.setLayout(new GridBagLayout());
396
+// treePanel.setLayout(new GridBagLayout());
397
+ //ctrlPanel.setLayout(new GridBagLayout());
390398 //materialPanel.setLayout(new GridBagLayout());
391399
392400 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
....@@ -426,7 +434,7 @@
426434 static String newline = "\n";
427435 protected static final String buttonString = "JButton";
428436 StyledDocument doc;
429
- JTextArea infoarea;
437
+ JTextPane infoarea;
430438
431439 void ClearInfo()
432440 {
....@@ -493,7 +501,10 @@
493501 }
494502
495503 if (full)
496
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
504
+ {
505
+ si.SendInfo(" BBox min: " + minima, "regular");
506
+ si.SendInfo(" BBox max: " + maxima, "regular");
507
+ }
497508
498509 if (sel.bRep != null)
499510 {
....@@ -591,6 +602,9 @@
591602 {
592603 CameraPane.pointflow = (PointFlow) sel;
593604 }
605
+
606
+ si.SendInfo("_____________________", "regular");
607
+ si.SendInfo("", "regular");
594608 }
595609 }
596610
....@@ -622,52 +636,52 @@
622636 cameraView.ToggleFullScreen();
623637 }
624638
625
- private JTextArea createTextPane()
639
+ private JTextPane createTextPane()
626640 {
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
- };
641
+// TEXTAREA String[] initString =
642
+// {
643
+// "This is an editable JTextPane, ", //regular
644
+// "another ", //italic
645
+// "styled ", //bold
646
+// "text ", //small
647
+// "component, ", //large
648
+// "which supports embedded components..." + newline,//regular
649
+// " " + newline, //button
650
+// "...and embedded icons..." + newline, //regular
651
+// " ", //icon
652
+// newline + "JTextPane is a subclass of JEditorPane that "
653
+// + "uses a StyledEditorKit and StyledDocument, and provides "
654
+// + "cover methods for interacting with those objects."
655
+// };
656
+//
657
+// String[] initStyles =
658
+// {
659
+// "regular", "italic", "bold", "small", "large",
660
+// "regular", "button", "regular", "icon",
661
+// "regular"
662
+// };
663
+//
664
+// JTextPane textPane = new JTextPane();
665
+// textPane.setEditable(true);
666
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
667
+// addStylesToDocument(doc);
668
+//
669
+// try
670
+// {
671
+// for (int j = 0; j < 2; j++)
672
+// {
673
+// for (int i = 0; i < initString.length; i++)
674
+// {
675
+// doc.insertString(doc.getLength(), initString[i],
676
+// doc.getStyle(initStyles[i]));
677
+// }
678
+// }
679
+// } catch (BadLocationException ble)
680
+// {
681
+// System.err.println("Couldn't insert initial text into text pane.");
682
+// }
642683
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;
684
+ return new JTextPane(); // textPane;
671685 }
672686
673687 protected void addStylesToDocument(StyledDocument doc)
....@@ -767,54 +781,44 @@
767781 JButton slowerButton;
768782 JButton fasterButton;
769783 JButton remarkButton;
784
+
785
+ cGridBag namePanel;
786
+ cGridBag setupPanel;
787
+ cGridBag commandsPanel;
788
+ cGridBag pushPanel;
789
+ cGridBag fillPanel;
770790
771
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
791
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
772792 {
773793 JCheckBox cb;
774794
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);
795
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
780796 cb.addItemListener(this);
781
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
782
- oe.aConstraints.gridwidth = 1;
783
- oe.aConstraints.gridx += 1;
784797
785798 return cb;
786799 }
787800
788
- cButton AddButton(ObjEditor oe, String label)
801
+ cButton AddButton(cGridBag panel, String label)
789802 {
790803 cButton cb;
791804
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);
805
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
797806 cb.addActionListener(this);
798
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
799
- oe.aConstraints.gridwidth = 1;
800
- oe.aConstraints.gridx += 1;
801807
802808 return cb;
803809 }
804810
805
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
811
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
806812 {
807813 JComboBox combo;
808814
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;
815
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
812816 combo.addActionListener(this);
813817
814818 return combo;
815819 }
816820
817
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, double min, double max, double current, double pow)
821
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
818822 {
819823 cGridBag control = new cGridBag();
820824
....@@ -826,12 +830,12 @@
826830 control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
827831 combo.setFloat(current);
828832
829
- ctrlPanel.add(control);
833
+ panel.add(control);
830834
831
- return combo;
835
+ return control;
832836 }
833837
834
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, int min, int max, int current)
838
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
835839 {
836840 cGridBag control = new cGridBag();
837841
....@@ -839,25 +843,21 @@
839843
840844 JLabel jlabel = new JLabel(label);
841845 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
842
- ctrlPanel.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
843
- ctrlPanel.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
846
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
847
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
844848 combo.setInteger(current);
845849
846
- ctrlPanel.add(control);
850
+ panel.add(control);
847851
848
- return combo;
852
+ return control;
849853 }
850854
851855 JTextArea AddText(cGridBag ctrlPanel, String name)
852856 {
853857 JTextArea text;
854858
855
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
856
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
857859 ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
858860 text.addCaretListener(this);
859
- aConstraints.gridx += 1;
860
- aConstraints.gridwidth = 1;
861861
862862 return text;
863863 }
....@@ -896,7 +896,7 @@
896896
897897 /*
898898 */
899
- void Return() // ObjEditor oe)
899
+ void Return0() // ObjEditor oe)
900900 {
901901 aConstraints.gridy += 1;
902902 aConstraints.gridx = 0;
....@@ -955,33 +955,52 @@
955955 // oe.aConstraints.weighty = 0;
956956 // oe.aConstraints.gridx = 0;
957957 // oe.aConstraints.gridy = 0;
958
- SetupName(oe);
958
+ //SetupName(oe);
959
+
960
+ namePanel = new cGridBag();
961
+
962
+ nameField = AddText(namePanel, copy.GetName());
963
+ namePanel.add(nameField);
964
+ oe.ctrlPanel.add(namePanel);
965
+
966
+ oe.ctrlPanel.Return();
959967
960968 if (!GroupEditor.allparams)
961969 return;
962970
963
- liveCB = AddCheckBox(oe, "Live", copy.live);
964
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
965
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
971
+ setupPanel = new cGridBag().setVertical(false);
972
+
973
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
974
+ link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
975
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
966976 // Return();
967
- markCB = AddCheckBox(oe, "Mark", copy.marked);
968
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
969
- randomCB = AddCheckBox(oe, "Rand", copy.random);
970
- Return();
971
- resetButton = AddButton(oe, "Reset");
972
- stepButton = AddButton(oe, "Step");
977
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
978
+ rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind);
979
+ randomCB = AddCheckBox(setupPanel, "Rand", copy.random);
980
+
981
+ oe.ctrlPanel.add(setupPanel);
982
+ oe.ctrlPanel.Return();
983
+
984
+ commandsPanel = new cGridBag().setVertical(false);
985
+
986
+ resetButton = AddButton(commandsPanel, "Reset");
987
+ stepButton = AddButton(commandsPanel, "Step");
973988 // resetAllButton = AddButton(oe, "Reset All");
974989 // stepAllButton = AddButton(oe, "Step All");
975
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
990
+ speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup);
976991 // Return();
977
- slowerButton = AddButton(oe, "Slow");
978
- fasterButton = AddButton(oe, "Fast");
979
- remarkButton = AddButton(oe, "Rem");
992
+ slowerButton = AddButton(commandsPanel, "Slow");
993
+ fasterButton = AddButton(commandsPanel, "Fast");
994
+ remarkButton = AddButton(commandsPanel, "Remark");
980995
981
- Return();
996
+ oe.ctrlPanel.add(commandsPanel);
997
+ oe.ctrlPanel.Return();
982998
983
- normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
984
- Return();
999
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
1000
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
1001
+ //Return();
1002
+
1003
+ oe.ctrlPanel.Return();
9851004
9861005 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
9871006 // ObjEditor.aConstraints.gridx += 1;
....@@ -1076,7 +1095,7 @@
10761095 oe.aConstraints.gridwidth = 1;
10771096 /**/
10781097 nameField = AddText(oe.ctrlPanel, copy.GetName());
1079
- Return();
1098
+ oe.ctrlPanel.Return();
10801099
10811100 //ctrlPanel.add(textureButton = new Button("Texture..."));
10821101 //textureButton.setEnabled(false);
....@@ -1253,10 +1272,11 @@
12531272 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12541273 //tmp.setName("Edit");
12551274 objectPanel.add(materialPanel);
1256
- JPanel north = new JPanel(new BorderLayout());
1257
- north.setName("Edit");
1258
- north.add(ctrlPanel, BorderLayout.NORTH);
1259
- objectPanel.add(north);
1275
+// JPanel north = new JPanel(new BorderLayout());
1276
+// north.setName("Edit");
1277
+// north.add(ctrlPanel, BorderLayout.NORTH);
1278
+// objectPanel.add(north);
1279
+ objectPanel.add(ctrlPanel);
12601280 objectPanel.add(infoPanel);
12611281
12621282 /*
....@@ -1415,7 +1435,7 @@
14151435 ctrlPanel.removeAll();
14161436 }
14171437
1418
- void SetupMaterial(cGridBag ctrlPanel)
1438
+ void SetupMaterial(cGridBag panel)
14191439 {
14201440 /*
14211441 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
....@@ -1424,18 +1444,23 @@
14241444
14251445 cGridBag editBar = new cGridBag().setVertical(false);
14261446
1427
- editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints);
1447
+ editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1448
+ createMaterialButton.setToolTipText("Create material");
14281449
14291450 /*
14301451 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14311452 */
14321453
1433
- editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints);
1434
- editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints);
1454
+ editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1455
+ clearMaterialButton.setToolTipText("Clear material");
1456
+
1457
+ editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
14351458 editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
14361459 editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
14371460
1438
- ctrlPanel.add(editBar);
1461
+ editBar.preferredHeight = 15;
1462
+
1463
+ panel.add(editBar);
14391464
14401465 /**/
14411466 //aConstraints.weighty = 0;
....@@ -1445,17 +1470,13 @@
14451470 //aConstraints.gridx += 1;
14461471 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14471472
1448
- JPanel colorPanel = new JPanel(new BorderLayout());
1449
- colorPanel.setBorder(BorderFactory.createLineBorder(Color.black));
1450
-
14511473 cGridBag colorSection = new cGridBag().setVertical(true);
1452
-
1453
- colorPanel.add(colorSection);
14541474
14551475 cGridBag color = new cGridBag();
14561476 color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints);
14571477 colorLabel.setHorizontalAlignment(SwingConstants.TRAILING);
14581478 color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1479
+ //colorField.preferredWidth = 200;
14591480 colorSection.add(color);
14601481
14611482 cGridBag modulation = new cGridBag();
....@@ -1488,16 +1509,13 @@
14881509 shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
14891510 colorSection.add(shadowbias);
14901511
1491
- ctrlPanel.add(colorPanel);
1512
+ panel.add(new JSeparator());
1513
+
1514
+ panel.add(colorSection);
14921515
14931516 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14941517
1495
- JPanel diffusePanel = new JPanel(new BorderLayout());
1496
- diffusePanel.setBorder(BorderFactory.createLineBorder(Color.black));
1497
-
14981518 cGridBag diffuseSection = new cGridBag().setVertical(true);
1499
-
1500
- diffusePanel.add(diffuseSection);
15011519
15021520 cGridBag diffuse = new cGridBag();
15031521 diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints);
....@@ -1541,16 +1559,13 @@
15411559 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15421560 diffuseSection.add(fakedepth);
15431561
1544
- ctrlPanel.add(diffusePanel);
1562
+ panel.add(new JSeparator());
1563
+
1564
+ panel.add(diffuseSection);
15451565
15461566 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15471567
1548
- JPanel specularPanel = new JPanel(new BorderLayout());
1549
- specularPanel.setBorder(BorderFactory.createLineBorder(Color.black));
1550
-
15511568 cGridBag specularSection = new cGridBag().setVertical(true);
1552
-
1553
- specularPanel.add(specularSection);
15541569
15551570 cGridBag specular = new cGridBag();
15561571 specular.add(specularLabel = new JLabel("Specular")); // , aConstraints);
....@@ -1582,7 +1597,7 @@
15821597 velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15831598 specularSection.add(velvet);
15841599
1585
- shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1);
1600
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
15861601 //Return();
15871602 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
15881603 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -1595,16 +1610,13 @@
15951610 // aConstraints.gridwidth = 1;
15961611
15971612
1598
- ctrlPanel.add(specularPanel);
1613
+ panel.add(new JSeparator());
1614
+
1615
+ panel.add(specularSection);
15991616
16001617 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16011618
1602
- JPanel globalPanel = new JPanel(new BorderLayout());
1603
- globalPanel.setBorder(BorderFactory.createLineBorder(Color.black));
1604
-
16051619 cGridBag globalSection = new cGridBag().setVertical(true);
1606
-
1607
- globalPanel.add(globalSection);
16081620
16091621 cGridBag camera = new cGridBag();
16101622 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
....@@ -1630,16 +1642,13 @@
16301642 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16311643 globalSection.add(opacity);
16321644
1633
- ctrlPanel.add(globalPanel);
1645
+ panel.add(new JSeparator());
1646
+
1647
+ panel.add(globalSection);
16341648
16351649 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16361650
1637
- JPanel texturePanel = new JPanel(new BorderLayout());
1638
- texturePanel.setBorder(BorderFactory.createLineBorder(Color.black));
1639
-
16401651 cGridBag textureSection = new cGridBag().setVertical(true);
1641
-
1642
- texturePanel.add(textureSection);
16431652
16441653 cGridBag bump = new cGridBag();
16451654 bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints);
....@@ -1677,7 +1686,9 @@
16771686 opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
16781687 textureSection.add(opacityPower);
16791688
1680
- ctrlPanel.add(texturePanel);
1689
+ panel.add(new JSeparator());
1690
+
1691
+ panel.add(textureSection);
16811692
16821693 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16831694
....@@ -2496,6 +2507,7 @@
24962507 }
24972508 if (input == null)
24982509 {
2510
+ new Exception().printStackTrace();
24992511 System.exit(0);
25002512 }
25012513
....@@ -3225,6 +3237,7 @@
32253237 callee.refreshContents();
32263238 } else
32273239 {
3240
+ new Exception().printStackTrace();
32283241 System.exit(0);
32293242 }
32303243 }
....@@ -3435,6 +3448,7 @@
34353448 || e.getSource() == apertureField
34363449 || e.getSource() == shadowblurField)
34373450 {
3451
+ new Exception().printStackTrace();
34383452 System.exit(0);
34393453 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34403454 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -4406,8 +4420,8 @@
44064420 //MenuItem normalLensItem;
44074421 MenuItem editCameraItem;
44084422 MenuItem revertCameraItem;
4409
- CheckboxMenuItem toggleLiveItem;
44104423 MenuItem stepItem;
4424
+ CheckboxMenuItem toggleLiveItem;
44114425 CheckboxMenuItem toggleFullScreenItem;
44124426 CheckboxMenuItem toggleTimelineItem;
44134427 CheckboxMenuItem toggleRenderItem;
....@@ -4424,7 +4438,7 @@
44244438 JSplitPane mainPanel;
44254439 JScrollPane scrollpane;
44264440 JPanel toolbarPanel;
4427
- JPanel treePanel;
4441
+ cGridBag treePanel;
44284442 JPanel radioPanel;
44294443 ButtonGroup buttonGroup;
44304444 cGridBag ctrlPanel;