Normand Briere
2019-05-01 d1e1417edc8a6ccf195b6da3270f22234dda61e4
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;
....@@ -951,37 +951,53 @@
951951
952952 void SetupUI2(ObjEditor oe)
953953 {
954
-// oe.aConstraints.weightx = 0;
955
-// oe.aConstraints.weighty = 0;
956
-// oe.aConstraints.gridx = 0;
957
-// oe.aConstraints.gridy = 0;
958
- SetupName(oe);
954
+ //SetupName(oe);
955
+
956
+ namePanel = new cGridBag();
957
+
958
+ nameField = AddText(namePanel, copy.GetName());
959
+ namePanel.add(nameField);
960
+ oe.ctrlPanel.add(namePanel);
961
+
962
+ oe.ctrlPanel.Return();
959963
960964 if (!GroupEditor.allparams)
961965 return;
962966
963
- liveCB = AddCheckBox(oe, "Live", copy.live);
964
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
965
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
967
+ setupPanel = new cGridBag().setVertical(false);
968
+
969
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
970
+ if (Globals.ADVANCED)
971
+ link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
972
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
966973 // 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");
974
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
975
+ rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind);
976
+ randomCB = AddCheckBox(setupPanel, "Rand", copy.random);
977
+
978
+ oe.ctrlPanel.add(setupPanel);
979
+ oe.ctrlPanel.Return();
980
+
981
+ commandsPanel = new cGridBag().setVertical(false);
982
+
983
+ resetButton = AddButton(commandsPanel, "Reset");
984
+ stepButton = AddButton(commandsPanel, "Step");
973985 // resetAllButton = AddButton(oe, "Reset All");
974986 // stepAllButton = AddButton(oe, "Step All");
975
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
987
+ speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup);
976988 // Return();
977
- slowerButton = AddButton(oe, "Slow");
978
- fasterButton = AddButton(oe, "Fast");
979
- remarkButton = AddButton(oe, "Rem");
989
+ slowerButton = AddButton(commandsPanel, "Slow");
990
+ fasterButton = AddButton(commandsPanel, "Fast");
991
+ remarkButton = AddButton(commandsPanel, "Remark");
980992
981
- //Return();
993
+ oe.ctrlPanel.add(commandsPanel);
994
+ oe.ctrlPanel.Return();
982995
983
- //normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
996
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
997
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
984998 //Return();
999
+
1000
+ oe.ctrlPanel.Return();
9851001
9861002 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
9871003 // ObjEditor.aConstraints.gridx += 1;
....@@ -1076,7 +1092,7 @@
10761092 oe.aConstraints.gridwidth = 1;
10771093 /**/
10781094 nameField = AddText(oe.ctrlPanel, copy.GetName());
1079
- Return();
1095
+ oe.ctrlPanel.Return();
10801096
10811097 //ctrlPanel.add(textureButton = new Button("Texture..."));
10821098 //textureButton.setEnabled(false);
....@@ -1253,10 +1269,11 @@
12531269 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12541270 //tmp.setName("Edit");
12551271 objectPanel.add(materialPanel);
1256
- JPanel north = new JPanel(new BorderLayout());
1257
- north.setName("Edit");
1258
- north.add(ctrlPanel, BorderLayout.NORTH);
1259
- objectPanel.add(north);
1272
+// JPanel north = new JPanel(new BorderLayout());
1273
+// north.setName("Edit");
1274
+// north.add(ctrlPanel, BorderLayout.NORTH);
1275
+// objectPanel.add(north);
1276
+ objectPanel.add(ctrlPanel);
12601277 objectPanel.add(infoPanel);
12611278
12621279 /*
....@@ -1415,7 +1432,7 @@
14151432 ctrlPanel.removeAll();
14161433 }
14171434
1418
- void SetupMaterial(cGridBag ctrlPanel)
1435
+ void SetupMaterial(cGridBag panel)
14191436 {
14201437 /*
14211438 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
....@@ -1424,18 +1441,23 @@
14241441
14251442 cGridBag editBar = new cGridBag().setVertical(false);
14261443
1427
- editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints);
1444
+ editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1445
+ createMaterialButton.setToolTipText("Create material");
14281446
14291447 /*
14301448 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14311449 */
14321450
1433
- editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints);
1434
- editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints);
1451
+ editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1452
+ clearMaterialButton.setToolTipText("Clear material");
1453
+
1454
+ editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
14351455 editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
14361456 editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
14371457
1438
- ctrlPanel.add(editBar);
1458
+ editBar.preferredHeight = 15;
1459
+
1460
+ panel.add(editBar);
14391461
14401462 /**/
14411463 //aConstraints.weighty = 0;
....@@ -1484,9 +1506,9 @@
14841506 shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
14851507 colorSection.add(shadowbias);
14861508
1487
- ctrlPanel.add(new JSeparator());
1509
+ panel.add(new JSeparator());
14881510
1489
- ctrlPanel.add(colorSection);
1511
+ panel.add(colorSection);
14901512
14911513 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14921514
....@@ -1534,9 +1556,9 @@
15341556 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15351557 diffuseSection.add(fakedepth);
15361558
1537
- ctrlPanel.add(new JSeparator());
1559
+ panel.add(new JSeparator());
15381560
1539
- ctrlPanel.add(diffuseSection);
1561
+ panel.add(diffuseSection);
15401562
15411563 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15421564
....@@ -1572,7 +1594,7 @@
15721594 velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15731595 specularSection.add(velvet);
15741596
1575
- shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1);
1597
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
15761598 //Return();
15771599 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
15781600 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -1585,9 +1607,9 @@
15851607 // aConstraints.gridwidth = 1;
15861608
15871609
1588
- ctrlPanel.add(new JSeparator());
1610
+ panel.add(new JSeparator());
15891611
1590
- ctrlPanel.add(specularSection);
1612
+ panel.add(specularSection);
15911613
15921614 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15931615
....@@ -1617,9 +1639,9 @@
16171639 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16181640 globalSection.add(opacity);
16191641
1620
- ctrlPanel.add(new JSeparator());
1642
+ panel.add(new JSeparator());
16211643
1622
- ctrlPanel.add(globalSection);
1644
+ panel.add(globalSection);
16231645
16241646 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16251647
....@@ -1661,9 +1683,9 @@
16611683 opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
16621684 textureSection.add(opacityPower);
16631685
1664
- ctrlPanel.add(new JSeparator());
1686
+ panel.add(new JSeparator());
16651687
1666
- ctrlPanel.add(textureSection);
1688
+ panel.add(textureSection);
16671689
16681690 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16691691
....@@ -2482,6 +2504,7 @@
24822504 }
24832505 if (input == null)
24842506 {
2507
+ new Exception().printStackTrace();
24852508 System.exit(0);
24862509 }
24872510
....@@ -3179,7 +3202,7 @@
31793202 if (!Globals.ANIMATION)
31803203 {
31813204 FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3182
- browser.show();
3205
+ browser.setVisible(true);
31833206 String filename = browser.getFile();
31843207 if (filename != null && filename.length() > 0)
31853208 {
....@@ -3211,6 +3234,7 @@
32113234 callee.refreshContents();
32123235 } else
32133236 {
3237
+ new Exception().printStackTrace();
32143238 System.exit(0);
32153239 }
32163240 }
....@@ -3421,6 +3445,7 @@
34213445 || e.getSource() == apertureField
34223446 || e.getSource() == shadowblurField)
34233447 {
3448
+ new Exception().printStackTrace();
34243449 System.exit(0);
34253450 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34263451 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -4392,8 +4417,8 @@
43924417 //MenuItem normalLensItem;
43934418 MenuItem editCameraItem;
43944419 MenuItem revertCameraItem;
4395
- CheckboxMenuItem toggleLiveItem;
43964420 MenuItem stepItem;
4421
+ CheckboxMenuItem toggleLiveItem;
43974422 CheckboxMenuItem toggleFullScreenItem;
43984423 CheckboxMenuItem toggleTimelineItem;
43994424 CheckboxMenuItem toggleRenderItem;
....@@ -4410,7 +4435,7 @@
44104435 JSplitPane mainPanel;
44114436 JScrollPane scrollpane;
44124437 JPanel toolbarPanel;
4413
- JPanel treePanel;
4438
+ cGridBag treePanel;
44144439 JPanel radioPanel;
44154440 ButtonGroup buttonGroup;
44164441 cGridBag ctrlPanel;