.. | .. |
---|
19 | 19 | import //weka.core. |
---|
20 | 20 | matrix.Matrix; |
---|
21 | 21 | |
---|
| 22 | +import grafeme.ui.*; |
---|
| 23 | + |
---|
22 | 24 | class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI, |
---|
23 | 25 | ActionListener, ChangeListener, |
---|
24 | 26 | InputMethodListener, |
---|
.. | .. |
---|
28 | 30 | iSendInfo |
---|
29 | 31 | //KeyListener |
---|
30 | 32 | { |
---|
| 33 | + boolean timeline; |
---|
| 34 | + boolean wasFullScreen; |
---|
31 | 35 | |
---|
| 36 | + GroupEditor callee; |
---|
| 37 | + JFrame frame; |
---|
| 38 | + |
---|
32 | 39 | // SCRIPT |
---|
33 | 40 | |
---|
34 | 41 | transient JFrame textpanel = null; |
---|
.. | .. |
---|
119 | 126 | void keyPressed(int key, int modifiers) |
---|
120 | 127 | { |
---|
121 | 128 | System.out.println("KEY PRESSED"); |
---|
122 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
123 | 130 | } |
---|
124 | 131 | */ |
---|
125 | 132 | |
---|
126 | 133 | static GridBagConstraints aConstraints; |
---|
127 | 134 | static GridBagConstraints aWindowConstraints; |
---|
128 | | - GroupEditor callee; |
---|
129 | | - JFrame frame; |
---|
| 135 | + |
---|
130 | 136 | static int GRIDWIDTH = 100; // 4; |
---|
131 | 137 | |
---|
132 | 138 | public void closeUI() |
---|
133 | 139 | { |
---|
134 | 140 | //new Exception().printStackTrace(); |
---|
135 | | - System.out.println("this = " + this); |
---|
136 | | - System.out.println("objEditor = " + objEditor); |
---|
| 141 | +// System.out.println("this = " + this); |
---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
---|
137 | 143 | //nameField.removeActionListener(this); |
---|
138 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
---|
| 145 | + |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
139 | 147 | |
---|
140 | 148 | if (!GroupEditor.allparams) |
---|
141 | 149 | return; |
---|
142 | 150 | |
---|
143 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
144 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
145 | | - objEditor.ctrlPanel.remove(markCB); |
---|
146 | | - |
---|
147 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
148 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
149 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
150 | | - |
---|
151 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
152 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
153 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
154 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
155 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
156 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
157 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
158 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
159 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
160 | | - objEditor.ctrlPanel.remove(remarkButton); |
---|
| 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); |
---|
| 169 | + |
---|
| 170 | + objEditor.ctrlPanel.remove(setupPanel); |
---|
| 171 | + objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 172 | + objEditor.ctrlPanel.remove(pushPanel); |
---|
| 173 | + //objEditor.ctrlPanel.remove(fillPanel); |
---|
| 174 | + |
---|
| 175 | + //Remove(normalpushField); |
---|
161 | 176 | } |
---|
162 | 177 | |
---|
163 | 178 | public ObjEditor GetEditor() |
---|
164 | 179 | { |
---|
165 | 180 | return objEditor; //.GetEditor(); |
---|
166 | 181 | } |
---|
| 182 | + |
---|
| 183 | + // Sometimes myself, sometimes my callee's. |
---|
167 | 184 | ObjEditor objEditor; |
---|
168 | 185 | |
---|
169 | 186 | /* |
---|
.. | .. |
---|
238 | 255 | //if (!isDisplayable()) |
---|
239 | 256 | //setUndecorated(true); |
---|
240 | 257 | |
---|
241 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 258 | + //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
242 | 259 | client = inClient; |
---|
243 | 260 | copy = localCopy; |
---|
244 | 261 | copy.editWindow = this; |
---|
.. | .. |
---|
292 | 309 | //normalLensItem.addActionListener(this); |
---|
293 | 310 | cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
294 | 311 | revertCameraItem.addActionListener(this); |
---|
295 | | - cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen")); |
---|
296 | | - toggleFullItem.addItemListener(this); |
---|
297 | | - toggleFullItem.setState(CameraPane.FULLSCREEN); |
---|
| 312 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 313 | + toggleTimelineItem.addItemListener(this); |
---|
| 314 | + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 315 | + toggleFullScreenItem.addItemListener(this); |
---|
| 316 | + toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
298 | 317 | cameraMenu.add("-"); |
---|
299 | 318 | cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
300 | 319 | toggleTextureItem.addItemListener(this); |
---|
301 | 320 | toggleTextureItem.setState(CameraPane.textureon); |
---|
302 | 321 | cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
303 | 322 | toggleLiveItem.addItemListener(this); |
---|
304 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
| 323 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
305 | 324 | cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
306 | 325 | stepItem.addActionListener(this); |
---|
307 | 326 | // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
.. | .. |
---|
341 | 360 | objectPanel = new JTabbedPane(); |
---|
342 | 361 | toolbarPanel = new JPanel(); |
---|
343 | 362 | toolbarPanel.setName("Toolbar"); |
---|
344 | | - treePanel = new JPanel(); |
---|
| 363 | + treePanel = new cGridBag(); |
---|
345 | 364 | treePanel.setName("Tree"); |
---|
346 | | - ctrlPanel = new JPanel(); // new GridBagLayout()); |
---|
| 365 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
347 | 366 | ctrlPanel.setName("Edit"); |
---|
348 | | - materialPanel = new JPanel(); |
---|
| 367 | + materialPanel = new cGridBag().setVertical(true); |
---|
349 | 368 | materialPanel.setName("Material"); |
---|
350 | 369 | /*JTextPane*/ |
---|
351 | 370 | infoarea = createTextPane(); |
---|
| 371 | + doc = infoarea.getStyledDocument(); |
---|
| 372 | + |
---|
352 | 373 | infoarea.setEditable(true); |
---|
353 | 374 | SetText(); |
---|
354 | 375 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
355 | 376 | // infoarea.setOpaque(false); |
---|
356 | 377 | // //infoarea.setForeground(textcolor); |
---|
357 | | - infoarea.setLineWrap(true); |
---|
358 | | - infoarea.setWrapStyleWord(true); |
---|
| 378 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 379 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
359 | 380 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
360 | 381 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
361 | 382 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
366 | 387 | mainPanel.setName("Main"); |
---|
367 | 388 | mainPanel.setContinuousLayout(true); |
---|
368 | 389 | mainPanel.setOneTouchExpandable(true); |
---|
369 | | - mainPanel.setDividerLocation(1.0); |
---|
370 | 390 | mainPanel.setDividerSize(9); |
---|
371 | | - mainPanel.setResizeWeight(0); |
---|
| 391 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 392 | + mainPanel.setResizeWeight(0.5); |
---|
372 | 393 | |
---|
373 | 394 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
374 | 395 | //mainPanel.setLayout(new GridBagLayout()); |
---|
375 | 396 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
376 | | - treePanel.setLayout(new GridBagLayout()); |
---|
377 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
378 | | - materialPanel.setLayout(new GridBagLayout()); |
---|
| 397 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 398 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 399 | + //materialPanel.setLayout(new GridBagLayout()); |
---|
379 | 400 | |
---|
380 | 401 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
381 | 402 | GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0); |
---|
.. | .. |
---|
414 | 435 | static String newline = "\n"; |
---|
415 | 436 | protected static final String buttonString = "JButton"; |
---|
416 | 437 | StyledDocument doc; |
---|
417 | | - JTextArea infoarea; |
---|
| 438 | + JTextPane infoarea; |
---|
418 | 439 | |
---|
419 | 440 | void ClearInfo() |
---|
420 | 441 | { |
---|
.. | .. |
---|
481 | 502 | } |
---|
482 | 503 | |
---|
483 | 504 | if (full) |
---|
484 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 505 | + { |
---|
| 506 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 507 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 508 | + } |
---|
485 | 509 | |
---|
486 | 510 | if (sel.bRep != null) |
---|
487 | 511 | { |
---|
.. | .. |
---|
522 | 546 | maxima.y = sel.toParent[3][1]; |
---|
523 | 547 | maxima.z = sel.toParent[3][2]; |
---|
524 | 548 | si.SendInfo(" Orig: " + maxima, "regular"); |
---|
525 | | - maxima.x = sel.globalTransform[3][0]; |
---|
526 | | - maxima.y = sel.globalTransform[3][1]; |
---|
527 | | - maxima.z = sel.globalTransform[3][2]; |
---|
528 | | - if (full) |
---|
529 | | - si.SendInfo(" Global Orig: " + maxima, "regular"); |
---|
530 | 549 | maxima.x = sel.toParent[0][0]; |
---|
531 | 550 | maxima.y = sel.toParent[1][1]; |
---|
532 | 551 | maxima.z = sel.toParent[2][2]; |
---|
533 | 552 | si.SendInfo(" Scale: " + maxima, "regular"); |
---|
534 | | - maxima.x = sel.globalTransform[0][0]; |
---|
535 | | - maxima.y = sel.globalTransform[1][1]; |
---|
536 | | - maxima.z = sel.globalTransform[2][2]; |
---|
| 553 | + maxima.x = sel.globalTransform[3][0]; |
---|
| 554 | + maxima.y = sel.globalTransform[3][1]; |
---|
| 555 | + maxima.z = sel.globalTransform[3][2]; |
---|
| 556 | + if (full) |
---|
| 557 | + si.SendInfo(" Global Orig: " + maxima, "regular"); |
---|
| 558 | + maxima.x = sel.globalTransform[0][0]; |
---|
| 559 | + maxima.y = sel.globalTransform[1][1]; |
---|
| 560 | + maxima.z = sel.globalTransform[2][2]; |
---|
537 | 561 | if (full) |
---|
538 | 562 | si.SendInfo(" Global Scale: " + maxima, "regular"); |
---|
539 | 563 | } |
---|
.. | .. |
---|
579 | 603 | { |
---|
580 | 604 | CameraPane.pointflow = (PointFlow) sel; |
---|
581 | 605 | } |
---|
| 606 | + |
---|
| 607 | + si.SendInfo("_____________________", "regular"); |
---|
| 608 | + si.SendInfo("", "regular"); |
---|
582 | 609 | } |
---|
583 | 610 | } |
---|
584 | 611 | |
---|
.. | .. |
---|
594 | 621 | } |
---|
595 | 622 | } |
---|
596 | 623 | |
---|
597 | | - private JTextArea createTextPane() |
---|
598 | | - { |
---|
599 | | - String[] initString = |
---|
| 624 | + void ToggleFullScreen() |
---|
600 | 625 | { |
---|
601 | | - "This is an editable JTextPane, ", //regular |
---|
602 | | - "another ", //italic |
---|
603 | | - "styled ", //bold |
---|
604 | | - "text ", //small |
---|
605 | | - "component, ", //large |
---|
606 | | - "which supports embedded components..." + newline,//regular |
---|
607 | | - " " + newline, //button |
---|
608 | | - "...and embedded icons..." + newline, //regular |
---|
609 | | - " ", //icon |
---|
610 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
611 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
612 | | - + "cover methods for interacting with those objects." |
---|
613 | | - }; |
---|
614 | | - |
---|
615 | | - String[] initStyles = |
---|
616 | | - { |
---|
617 | | - "regular", "italic", "bold", "small", "large", |
---|
618 | | - "regular", "button", "regular", "icon", |
---|
619 | | - "regular" |
---|
620 | | - }; |
---|
621 | | - |
---|
622 | | - JTextPane textPane = new JTextPane(); |
---|
623 | | - textPane.setEditable(true); |
---|
624 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
625 | | - addStylesToDocument(doc); |
---|
626 | | - |
---|
627 | | - try |
---|
628 | | - { |
---|
629 | | - for (int j = 0; j < 2; j++) |
---|
630 | | - { |
---|
631 | | - for (int i = 0; i < initString.length; i++) |
---|
| 626 | + if (CameraPane.FULLSCREEN) |
---|
632 | 627 | { |
---|
633 | | - doc.insertString(doc.getLength(), initString[i], |
---|
634 | | - doc.getStyle(initStyles[i])); |
---|
| 628 | + frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 629 | + framePanel.add(bigThree); |
---|
| 630 | + frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 631 | + } else |
---|
| 632 | + { |
---|
| 633 | + frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 634 | + framePanel.remove(bigThree); |
---|
| 635 | + frame.getContentPane().add(/*"Center",*/bigThree); |
---|
635 | 636 | } |
---|
636 | | - } |
---|
637 | | - } catch (BadLocationException ble) |
---|
638 | | - { |
---|
639 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
| 637 | + cameraView.ToggleFullScreen(); |
---|
640 | 638 | } |
---|
641 | 639 | |
---|
642 | | - return new JTextArea(); // textPane; |
---|
| 640 | + private JTextPane createTextPane() |
---|
| 641 | + { |
---|
| 642 | +// TEXTAREA String[] initString = |
---|
| 643 | +// { |
---|
| 644 | +// "This is an editable JTextPane, ", //regular |
---|
| 645 | +// "another ", //italic |
---|
| 646 | +// "styled ", //bold |
---|
| 647 | +// "text ", //small |
---|
| 648 | +// "component, ", //large |
---|
| 649 | +// "which supports embedded components..." + newline,//regular |
---|
| 650 | +// " " + newline, //button |
---|
| 651 | +// "...and embedded icons..." + newline, //regular |
---|
| 652 | +// " ", //icon |
---|
| 653 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 654 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 655 | +// + "cover methods for interacting with those objects." |
---|
| 656 | +// }; |
---|
| 657 | +// |
---|
| 658 | +// String[] initStyles = |
---|
| 659 | +// { |
---|
| 660 | +// "regular", "italic", "bold", "small", "large", |
---|
| 661 | +// "regular", "button", "regular", "icon", |
---|
| 662 | +// "regular" |
---|
| 663 | +// }; |
---|
| 664 | +// |
---|
| 665 | +// JTextPane textPane = new JTextPane(); |
---|
| 666 | +// textPane.setEditable(true); |
---|
| 667 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 668 | +// addStylesToDocument(doc); |
---|
| 669 | +// |
---|
| 670 | +// try |
---|
| 671 | +// { |
---|
| 672 | +// for (int j = 0; j < 2; j++) |
---|
| 673 | +// { |
---|
| 674 | +// for (int i = 0; i < initString.length; i++) |
---|
| 675 | +// { |
---|
| 676 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 677 | +// doc.getStyle(initStyles[i])); |
---|
| 678 | +// } |
---|
| 679 | +// } |
---|
| 680 | +// } catch (BadLocationException ble) |
---|
| 681 | +// { |
---|
| 682 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 683 | +// } |
---|
| 684 | + |
---|
| 685 | + return new JTextPane(); // textPane; |
---|
643 | 686 | } |
---|
644 | 687 | |
---|
645 | 688 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
692 | 735 | protected static ImageIcon createImageIcon(String path, |
---|
693 | 736 | String description) |
---|
694 | 737 | { |
---|
695 | | - java.net.URL imgURL = GraphreeD.class.getResource(path); |
---|
| 738 | + java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
696 | 739 | if (imgURL != null) |
---|
697 | 740 | { |
---|
698 | 741 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
739 | 782 | JButton slowerButton; |
---|
740 | 783 | JButton fasterButton; |
---|
741 | 784 | JButton remarkButton; |
---|
| 785 | + |
---|
| 786 | + cGridBag namePanel; |
---|
| 787 | + cGridBag setupPanel; |
---|
| 788 | + cGridBag commandsPanel; |
---|
| 789 | + cGridBag pushPanel; |
---|
| 790 | + cGridBag fillPanel; |
---|
742 | 791 | |
---|
743 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 792 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
744 | 793 | { |
---|
745 | 794 | JCheckBox cb; |
---|
746 | 795 | |
---|
747 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
748 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
749 | | -// oe.aConstraints.weightx = 1; |
---|
750 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
751 | | - oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 796 | + panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
752 | 797 | cb.addItemListener(this); |
---|
753 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
754 | | - oe.aConstraints.gridwidth = 1; |
---|
755 | | - oe.aConstraints.gridx += 1; |
---|
756 | 798 | |
---|
757 | 799 | return cb; |
---|
758 | 800 | } |
---|
759 | 801 | |
---|
760 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 802 | + cButton AddButton(cGridBag panel, String label) |
---|
761 | 803 | { |
---|
762 | 804 | cButton cb; |
---|
763 | 805 | |
---|
764 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
765 | | - oe.aConstraints.gridwidth = 1; |
---|
766 | | -// oe.aConstraints.weightx = 1; |
---|
767 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
768 | | - oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
| 806 | + panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
769 | 807 | cb.addActionListener(this); |
---|
770 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
771 | | - oe.aConstraints.gridwidth = 1; |
---|
772 | | - oe.aConstraints.gridx += 1; |
---|
773 | 808 | |
---|
774 | 809 | return cb; |
---|
775 | 810 | } |
---|
776 | 811 | |
---|
777 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 812 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
778 | 813 | { |
---|
779 | 814 | JComboBox combo; |
---|
780 | 815 | |
---|
781 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
782 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
783 | | - oe.aConstraints.gridx += 1; |
---|
| 816 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
784 | 817 | combo.addActionListener(this); |
---|
785 | 818 | |
---|
786 | 819 | return combo; |
---|
787 | 820 | } |
---|
788 | 821 | |
---|
789 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow) |
---|
| 822 | + cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow) |
---|
790 | 823 | { |
---|
791 | | - NumberSlider combo; |
---|
| 824 | + cGridBag control = new cGridBag(); |
---|
| 825 | + |
---|
| 826 | + cNumberSlider combo; |
---|
792 | 827 | |
---|
793 | 828 | JLabel jlabel = new JLabel(label); |
---|
794 | | - |
---|
795 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
796 | 829 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
797 | | - aConstraints.gridwidth = 2; |
---|
798 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
799 | | - aConstraints.gridx += 1; |
---|
800 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
801 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
802 | | - ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
803 | | - aConstraints.gridx += 1; |
---|
804 | | - aConstraints.gridwidth = 1; |
---|
805 | | - |
---|
| 830 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 831 | + control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
806 | 832 | combo.setFloat(current); |
---|
807 | | - |
---|
808 | | - combo.label = jlabel; |
---|
809 | | - |
---|
810 | | - combo.addChangeListener(this); |
---|
811 | | - |
---|
812 | | - return combo; |
---|
| 833 | + |
---|
| 834 | + panel.add(control); |
---|
| 835 | + |
---|
| 836 | + return control; |
---|
813 | 837 | } |
---|
814 | 838 | |
---|
815 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current) |
---|
| 839 | + cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current) |
---|
816 | 840 | { |
---|
817 | | - NumberSlider combo; |
---|
| 841 | + cGridBag control = new cGridBag(); |
---|
| 842 | + |
---|
| 843 | + cNumberSlider combo; |
---|
818 | 844 | |
---|
819 | 845 | JLabel jlabel = new JLabel(label); |
---|
820 | | - |
---|
821 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
822 | 846 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
823 | | - aConstraints.gridwidth = 2; |
---|
824 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
825 | | - aConstraints.gridx += 1; |
---|
826 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
827 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
828 | | - ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
829 | | - aConstraints.gridx += 1; |
---|
830 | | - aConstraints.gridwidth = 1; |
---|
831 | | - |
---|
| 847 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 848 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
832 | 849 | combo.setInteger(current); |
---|
833 | 850 | |
---|
834 | | - combo.label = jlabel; |
---|
835 | | - |
---|
836 | | - combo.addChangeListener(this); |
---|
837 | | - |
---|
838 | | - return combo; |
---|
| 851 | + panel.add(control); |
---|
| 852 | + |
---|
| 853 | + return control; |
---|
839 | 854 | } |
---|
840 | 855 | |
---|
841 | | - JTextArea AddText(JPanel ctrlPanel, String name) |
---|
| 856 | + JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
842 | 857 | { |
---|
843 | 858 | JTextArea text; |
---|
844 | 859 | |
---|
845 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
846 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
847 | | - ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 860 | + ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
848 | 861 | text.addCaretListener(this); |
---|
849 | | - aConstraints.gridx += 1; |
---|
850 | | - aConstraints.gridwidth = 1; |
---|
851 | 862 | |
---|
852 | 863 | return text; |
---|
853 | 864 | } |
---|
.. | .. |
---|
877 | 888 | objEditor.ctrlPanel.remove(j); |
---|
878 | 889 | } |
---|
879 | 890 | |
---|
| 891 | + void Remove(cNumberSlider j) |
---|
| 892 | + { |
---|
| 893 | + j.removeChangeListener(this); |
---|
| 894 | + //objEditor.ctrlPanel.remove(j.label); |
---|
| 895 | + objEditor.ctrlPanel.remove(j); |
---|
| 896 | + } |
---|
| 897 | + |
---|
880 | 898 | /* |
---|
881 | 899 | */ |
---|
882 | | - void Return() // ObjEditor oe) |
---|
| 900 | + void Return0() // ObjEditor oe) |
---|
883 | 901 | { |
---|
884 | 902 | aConstraints.gridy += 1; |
---|
885 | 903 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
934 | 952 | |
---|
935 | 953 | void SetupUI2(ObjEditor oe) |
---|
936 | 954 | { |
---|
937 | | -// oe.aConstraints.weightx = 0; |
---|
938 | | -// oe.aConstraints.weighty = 0; |
---|
939 | | -// oe.aConstraints.gridx = 0; |
---|
940 | | -// oe.aConstraints.gridy = 0; |
---|
941 | | - SetupName(oe); |
---|
| 955 | + //SetupName(oe); |
---|
| 956 | + |
---|
| 957 | + namePanel = new cGridBag(); |
---|
| 958 | + |
---|
| 959 | + nameField = AddText(namePanel, copy.GetName()); |
---|
| 960 | + namePanel.add(nameField); |
---|
| 961 | + oe.ctrlPanel.add(namePanel); |
---|
| 962 | + |
---|
| 963 | + oe.ctrlPanel.Return(); |
---|
942 | 964 | |
---|
943 | 965 | if (!GroupEditor.allparams) |
---|
944 | 966 | return; |
---|
945 | 967 | |
---|
946 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
947 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
948 | | - hideCB = AddCheckBox(oe, "Hide", copy.hide); |
---|
| 968 | + setupPanel = new cGridBag().setVertical(false); |
---|
| 969 | + |
---|
| 970 | + liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
| 971 | + liveCB.setToolTipText("Animate object"); |
---|
| 972 | + hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 973 | + hideCB.setToolTipText("Hide object"); |
---|
949 | 974 | // Return(); |
---|
950 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
951 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
952 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
953 | | - Return(); |
---|
954 | | - resetButton = AddButton(oe, "Reset"); |
---|
955 | | - stepButton = AddButton(oe, "Step"); |
---|
| 975 | + markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
| 976 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 977 | + |
---|
| 978 | + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 979 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 980 | + |
---|
| 981 | + randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
| 982 | + randomCB.setToolTipText("Option for switch node"); |
---|
| 983 | + |
---|
| 984 | + if (Globals.ADVANCED) |
---|
| 985 | + { |
---|
| 986 | + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 987 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 988 | + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 989 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 990 | + } |
---|
| 991 | + |
---|
| 992 | + oe.ctrlPanel.add(setupPanel); |
---|
| 993 | + oe.ctrlPanel.Return(); |
---|
| 994 | + |
---|
| 995 | + commandsPanel = new cGridBag().setVertical(false); |
---|
| 996 | + |
---|
| 997 | + resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 998 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
| 999 | + stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1000 | + stepButton.setToolTipText("Step one frame"); |
---|
956 | 1001 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
957 | 1002 | // stepAllButton = AddButton(oe, "Step All"); |
---|
958 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
959 | 1003 | // Return(); |
---|
960 | | - slowerButton = AddButton(oe, "Slow"); |
---|
961 | | - fasterButton = AddButton(oe, "Fast"); |
---|
962 | | - remarkButton = AddButton(oe, "Rem"); |
---|
| 1004 | + slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1005 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
| 1006 | + fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1007 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
| 1008 | + remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1009 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
963 | 1010 | |
---|
964 | | - Return(); |
---|
| 1011 | + oe.ctrlPanel.add(commandsPanel); |
---|
| 1012 | + oe.ctrlPanel.Return(); |
---|
965 | 1013 | |
---|
| 1014 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1015 | + normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
| 1016 | + //Return(); |
---|
| 1017 | + |
---|
| 1018 | + oe.ctrlPanel.Return(); |
---|
| 1019 | + |
---|
966 | 1020 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
967 | 1021 | // ObjEditor.aConstraints.gridx += 1; |
---|
968 | 1022 | |
---|
.. | .. |
---|
1056 | 1110 | oe.aConstraints.gridwidth = 1; |
---|
1057 | 1111 | /**/ |
---|
1058 | 1112 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1059 | | - Return(); |
---|
| 1113 | + oe.ctrlPanel.Return(); |
---|
1060 | 1114 | |
---|
1061 | 1115 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1062 | 1116 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1107 | 1161 | //frontScroll.setLabel("------------------------------ XZ (front) ---------------------------------------------------"); |
---|
1108 | 1162 | //sideScroll.setLabel("------------------------------- YZ (side) ---------------------------------------------------"); |
---|
1109 | 1163 | |
---|
1110 | | -// GridBagConstraints gbc = (GridBagConstraints) GraphreeD.clone(aConstraints); |
---|
| 1164 | +// GridBagConstraints gbc = (GridBagConstraints) GrafreeD.clone(aConstraints); |
---|
1111 | 1165 | Camera cam = GetCamera(copy, 0); |
---|
1112 | 1166 | |
---|
1113 | 1167 | Composite cams = null; |
---|
.. | .. |
---|
1158 | 1212 | //JPanel worldPanel = |
---|
1159 | 1213 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1160 | 1214 | //worldPanel.setName("World"); |
---|
1161 | | - /*JPanel*/ cameraPanel = |
---|
1162 | | - new JPanel(new BorderLayout()); |
---|
1163 | | - cameraPanel.add(cameraView); |
---|
| 1215 | + centralPanel = new cGridBag(); |
---|
| 1216 | + centralPanel.preferredWidth = 20; |
---|
| 1217 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1218 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1164 | 1219 | |
---|
| 1220 | + cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
| 1221 | + cameraPanel.setContinuousLayout(true); |
---|
| 1222 | + cameraPanel.setOneTouchExpandable(true); |
---|
| 1223 | +// cameraPanel.setDividerLocation(0.9); |
---|
| 1224 | +// cameraPanel.setDividerSize(9); |
---|
| 1225 | + cameraPanel.setResizeWeight(1.0); |
---|
| 1226 | + |
---|
| 1227 | + centralPanel.add(cameraView); |
---|
| 1228 | + //frame.setJMenuBar(timelineMenubar); |
---|
| 1229 | + //centralPanel.add(timelinePanel); |
---|
| 1230 | + |
---|
1165 | 1231 | //topView.camera = ; |
---|
1166 | 1232 | //frontView.camera = new Camera(2); |
---|
1167 | 1233 | //sideView.camera = new Camera(3); |
---|
.. | .. |
---|
1177 | 1243 | //frontView.object = copy; |
---|
1178 | 1244 | //sideView.object = copy; |
---|
1179 | 1245 | |
---|
1180 | | - XYZPanel = new JPanel(); |
---|
1181 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1246 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1247 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1182 | 1248 | |
---|
1183 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1184 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1185 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1249 | + XYZPanel.preferredWidth = 5; |
---|
| 1250 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
| 1251 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
| 1252 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1186 | 1253 | |
---|
1187 | 1254 | /* |
---|
1188 | 1255 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1191 | 1258 | gridPanel.add(cameraView); |
---|
1192 | 1259 | gridPanel.add(XYZPanel); |
---|
1193 | 1260 | */ |
---|
1194 | | - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout()); |
---|
| 1261 | + gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
1195 | 1262 | gridPanel.setContinuousLayout(true); |
---|
1196 | 1263 | gridPanel.setOneTouchExpandable(true); |
---|
1197 | 1264 | gridPanel.setDividerLocation(1.0); |
---|
.. | .. |
---|
1220 | 1287 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1221 | 1288 | //tmp.setName("Edit"); |
---|
1222 | 1289 | objectPanel.add(materialPanel); |
---|
1223 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1224 | | - north.setName("Edit"); |
---|
1225 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1226 | | - objectPanel.add(north); |
---|
| 1290 | +// JPanel north = new JPanel(new BorderLayout()); |
---|
| 1291 | +// north.setName("Edit"); |
---|
| 1292 | +// north.add(ctrlPanel, BorderLayout.NORTH); |
---|
| 1293 | +// objectPanel.add(north); |
---|
| 1294 | + objectPanel.add(ctrlPanel); |
---|
1227 | 1295 | objectPanel.add(infoPanel); |
---|
1228 | 1296 | |
---|
1229 | 1297 | /* |
---|
.. | .. |
---|
1244 | 1312 | scrollpane.setWheelScrollingEnabled(true); |
---|
1245 | 1313 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1246 | 1314 | |
---|
1247 | | - /*JTabbedPane*/ jtp = new JTabbedPane(); |
---|
1248 | | - jtp.add(scrollpane); |
---|
| 1315 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1316 | + scenePanel.preferredWidth = 7; |
---|
| 1317 | + |
---|
| 1318 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1319 | + tabbedPane.add(scrollpane); |
---|
1249 | 1320 | |
---|
1250 | | - jtp.add(FSPane = new cFileSystemPane(this)); |
---|
| 1321 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1251 | 1322 | |
---|
1252 | | - optionsPanel = new JPanel(new GridBagLayout()); |
---|
| 1323 | + optionsPanel = new cGridBag().setVertical(true); |
---|
1253 | 1324 | |
---|
1254 | 1325 | optionsPanel.setName("Options"); |
---|
1255 | | - jtp.add(optionsPanel); |
---|
1256 | | - |
---|
| 1326 | + |
---|
| 1327 | + AddOptions(optionsPanel); //, aConstraints); |
---|
| 1328 | + |
---|
| 1329 | + tabbedPane.add(optionsPanel); |
---|
| 1330 | + |
---|
| 1331 | + scenePanel.add(tabbedPane); |
---|
1257 | 1332 | |
---|
1258 | 1333 | /* |
---|
1259 | 1334 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1275 | 1350 | jtp.add(tree); |
---|
1276 | 1351 | */ |
---|
1277 | 1352 | |
---|
1278 | | - bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jtp, gridPanel); |
---|
| 1353 | + bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel); |
---|
1279 | 1354 | bigPanel.setContinuousLayout(true); |
---|
1280 | 1355 | bigPanel.setOneTouchExpandable(true); |
---|
1281 | 1356 | bigPanel.setDividerLocation(0.8); |
---|
.. | .. |
---|
1287 | 1362 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1288 | 1363 | //bigPanel.add(ctrlPanel); |
---|
1289 | 1364 | //bigPanel.add(gridPanel); |
---|
| 1365 | + /** |
---|
1290 | 1366 | bigThree = new JPanel(); |
---|
1291 | 1367 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1292 | 1368 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1297 | 1373 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1298 | 1374 | aWindowConstraints.weightx = 0; |
---|
1299 | 1375 | aWindowConstraints.weighty = 1; |
---|
1300 | | - bigThree.add(jtp, aWindowConstraints); |
---|
| 1376 | + bigThree.add(scenePanel, aWindowConstraints); |
---|
1301 | 1377 | aWindowConstraints.weightx = 1; |
---|
1302 | 1378 | aWindowConstraints.gridwidth = 3; |
---|
1303 | 1379 | // aConstraints.gridheight = 3; |
---|
1304 | 1380 | aWindowConstraints.gridx = 1; |
---|
1305 | 1381 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
1306 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 1382 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
1307 | 1383 | aWindowConstraints.weightx = 0; |
---|
1308 | 1384 | aWindowConstraints.gridx = 4; |
---|
1309 | 1385 | aWindowConstraints.gridwidth = 1; |
---|
1310 | 1386 | // aConstraints.gridheight = 3; |
---|
1311 | 1387 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1312 | 1388 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1389 | + /**/ |
---|
1313 | 1390 | |
---|
| 1391 | + bigThree = new cGridBag(); |
---|
| 1392 | + bigThree.addComponent(scenePanel); |
---|
| 1393 | + bigThree.addComponent(centralPanel); |
---|
| 1394 | + bigThree.addComponent(XYZPanel); |
---|
| 1395 | + |
---|
1314 | 1396 | // // SIDE EFFECT!!! |
---|
1315 | 1397 | // aConstraints.gridx = 0; |
---|
1316 | 1398 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1331 | 1413 | //worldPane.add(bigPanel); |
---|
1332 | 1414 | //worldPane.add(worldPanel); |
---|
1333 | 1415 | /**/ |
---|
1334 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1416 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1417 | + frame.add(/*"Center",*/framePanel); |
---|
1335 | 1418 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
---|
1336 | 1419 | |
---|
1337 | | -// aConstraints = gbc; // (GridBagConstraints) GraphreeD.clone(gbc); |
---|
| 1420 | +// aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1338 | 1421 | |
---|
1339 | | - frame.setSize(800, 600); |
---|
| 1422 | + frame.setSize(1024, 768); |
---|
1340 | 1423 | frame.show(); |
---|
1341 | 1424 | |
---|
1342 | 1425 | gridPanel.setDividerLocation(1.0); |
---|
.. | .. |
---|
1352 | 1435 | }); |
---|
1353 | 1436 | } |
---|
1354 | 1437 | |
---|
| 1438 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 1439 | + { |
---|
| 1440 | + } |
---|
| 1441 | + |
---|
1355 | 1442 | JTree GetTree() |
---|
1356 | 1443 | { |
---|
1357 | 1444 | return objEditor.jTree; |
---|
.. | .. |
---|
1363 | 1450 | ctrlPanel.removeAll(); |
---|
1364 | 1451 | } |
---|
1365 | 1452 | |
---|
1366 | | - void SetupMaterial(JPanel ctrlPanel) |
---|
| 1453 | + void SetupMaterial(cGridBag panel) |
---|
1367 | 1454 | { |
---|
1368 | | - aConstraints.weighty = 0; |
---|
1369 | | - //aConstraints.weightx = 1; |
---|
1370 | | - /* |
---|
| 1455 | + /* |
---|
1371 | 1456 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1372 | 1457 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1373 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1374 | | - aConstraints.gridx += 1; |
---|
1375 | 1458 | */ |
---|
1376 | 1459 | |
---|
1377 | | - aConstraints.gridwidth = 1; |
---|
1378 | | - ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints); |
---|
1379 | | - aConstraints.gridx += 1; |
---|
1380 | | - aConstraints.weighty = 0; |
---|
1381 | | - aConstraints.gridwidth = 1; |
---|
| 1460 | + cGridBag editBar = new cGridBag().setVertical(false); |
---|
| 1461 | + |
---|
| 1462 | + editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1463 | + createMaterialButton.setToolTipText("Create material"); |
---|
1382 | 1464 | |
---|
1383 | 1465 | /* |
---|
1384 | 1466 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1385 | | - aConstraints.gridx += 1; |
---|
1386 | | - aConstraints.weighty = 0; |
---|
1387 | | - aConstraints.gridwidth = 1; |
---|
1388 | 1467 | */ |
---|
1389 | 1468 | |
---|
1390 | | - ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints); |
---|
1391 | | - aConstraints.gridx += 1; |
---|
| 1469 | + editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1470 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1471 | + |
---|
| 1472 | + editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1473 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
| 1474 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1392 | 1475 | |
---|
1393 | | - ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints); |
---|
1394 | | - |
---|
1395 | | - aConstraints.gridx += 1; |
---|
1396 | | - |
---|
1397 | | - ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints); |
---|
1398 | | - |
---|
1399 | | - aConstraints.gridx += 1; |
---|
1400 | | - |
---|
1401 | | - ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints); |
---|
1402 | | - |
---|
1403 | | - aConstraints.gridx = 0; |
---|
1404 | | - aConstraints.gridy += 1; |
---|
1405 | | - aConstraints.weighty = 0; |
---|
1406 | | - aConstraints.gridwidth = 1; |
---|
| 1476 | + editBar.preferredHeight = 15; |
---|
| 1477 | + |
---|
| 1478 | + panel.add(editBar); |
---|
| 1479 | + |
---|
1407 | 1480 | /**/ |
---|
1408 | 1481 | //aConstraints.weighty = 0; |
---|
1409 | 1482 | ////aConstraints.weightx = 1; |
---|
1410 | 1483 | //aConstraints.weighty = 1; |
---|
1411 | 1484 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1412 | 1485 | //aConstraints.gridx += 1; |
---|
1413 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1414 | | - aConstraints.weighty = 0; |
---|
1415 | | - aConstraints.gridx = 0; |
---|
1416 | | - aConstraints.gridy += 1; |
---|
1417 | | - aConstraints.gridwidth = 1; |
---|
| 1486 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1418 | 1487 | |
---|
1419 | | - ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints); |
---|
1420 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1421 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1422 | | - aConstraints.gridx += 1; |
---|
1423 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1424 | | - //aConstraints.weightx = 0; |
---|
1425 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1426 | | - aConstraints.gridx = 0; |
---|
1427 | | - aConstraints.gridy += 1; |
---|
1428 | | - aConstraints.gridwidth = 1; |
---|
| 1488 | + cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 1489 | + |
---|
| 1490 | + cGridBag color = new cGridBag(); |
---|
| 1491 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 1492 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1493 | + color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1494 | + //colorField.preferredWidth = 200; |
---|
| 1495 | + colorSection.add(color); |
---|
1429 | 1496 | |
---|
1430 | | - ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints); |
---|
1431 | | - modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1432 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1433 | | - aConstraints.gridx += 1; |
---|
1434 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1435 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1436 | | - aConstraints.gridx = 0; |
---|
1437 | | - aConstraints.gridy += 1; |
---|
1438 | | - aConstraints.gridwidth = 1; |
---|
| 1497 | + cGridBag modulation = new cGridBag(); |
---|
| 1498 | + modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
| 1499 | + modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1500 | + modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1501 | + colorSection.add(modulation); |
---|
1439 | 1502 | |
---|
1440 | | - ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints); |
---|
1441 | | - textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1442 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1443 | | - aConstraints.gridx += 1; |
---|
1444 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1445 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1446 | | - aConstraints.gridx = 0; |
---|
1447 | | - aConstraints.gridy += 1; |
---|
1448 | | - aConstraints.gridwidth = 1; |
---|
| 1503 | + cGridBag texture = new cGridBag(); |
---|
| 1504 | + texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
| 1505 | + textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1506 | + texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1507 | + colorSection.add(texture); |
---|
1449 | 1508 | |
---|
1450 | | - ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints); |
---|
1451 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1452 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1453 | | - aConstraints.gridx += 1; |
---|
1454 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1455 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1456 | | - aConstraints.gridx = 0; |
---|
1457 | | - aConstraints.gridy += 1; |
---|
1458 | | - aConstraints.gridwidth = 1; |
---|
| 1509 | + cGridBag anisoU = new cGridBag(); |
---|
| 1510 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1511 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1512 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1513 | + colorSection.add(anisoU); |
---|
1459 | 1514 | |
---|
1460 | | - ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints); |
---|
1461 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1462 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1463 | | - aConstraints.gridx += 1; |
---|
1464 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1465 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1466 | | - aConstraints.gridx = 0; |
---|
1467 | | - aConstraints.gridy += 1; |
---|
1468 | | - aConstraints.gridwidth = 1; |
---|
| 1515 | + cGridBag anisoV = new cGridBag(); |
---|
| 1516 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1517 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1518 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1519 | + colorSection.add(anisoV); |
---|
1469 | 1520 | |
---|
1470 | | - ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints); |
---|
1471 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1472 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1473 | | - aConstraints.gridx += 1; |
---|
1474 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1475 | | - ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1476 | | - aConstraints.gridx = 0; |
---|
1477 | | - aConstraints.gridy += 1; |
---|
1478 | | - aConstraints.gridwidth = 1; |
---|
| 1521 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1522 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1523 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1524 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1525 | + colorSection.add(shadowbias); |
---|
1479 | 1526 | |
---|
1480 | | - //aConstraints.weighty = 1; |
---|
1481 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1482 | | - //aConstraints.gridx += 1; |
---|
1483 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1484 | | - aConstraints.weighty = 0; |
---|
1485 | | - aConstraints.gridx = 0; |
---|
1486 | | - aConstraints.gridy += 1; |
---|
1487 | | - aConstraints.gridwidth = 1; |
---|
| 1527 | + panel.add(new JSeparator()); |
---|
| 1528 | + |
---|
| 1529 | + panel.add(colorSection); |
---|
| 1530 | + |
---|
| 1531 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1532 | + |
---|
| 1533 | + cGridBag diffuseSection = new cGridBag().setVertical(true); |
---|
| 1534 | + |
---|
| 1535 | + cGridBag diffuse = new cGridBag(); |
---|
| 1536 | + diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints); |
---|
| 1537 | + diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1538 | + diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1539 | + diffuseSection.add(diffuse); |
---|
1488 | 1540 | |
---|
1489 | | - ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints); |
---|
1490 | | - diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1491 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1492 | | - aConstraints.gridx += 1; |
---|
1493 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1494 | | - ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1495 | | - aConstraints.gridx = 0; |
---|
1496 | | - aConstraints.gridy += 1; |
---|
1497 | | - aConstraints.gridwidth = 1; |
---|
| 1541 | + cGridBag diffuseness = new cGridBag(); |
---|
| 1542 | + diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints); |
---|
| 1543 | + diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1544 | + diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1545 | + diffuseSection.add(diffuseness); |
---|
1498 | 1546 | |
---|
1499 | | - ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints); |
---|
1500 | | - diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1501 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1502 | | - aConstraints.gridx += 1; |
---|
1503 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1504 | | - ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1505 | | - aConstraints.gridx = 0; |
---|
1506 | | - aConstraints.gridy += 1; |
---|
1507 | | - aConstraints.gridwidth = 1; |
---|
| 1547 | + cGridBag selfshadow = new cGridBag(); |
---|
| 1548 | + selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints); |
---|
| 1549 | + selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1550 | + selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1551 | + diffuseSection.add(selfshadow); |
---|
1508 | 1552 | |
---|
1509 | | - ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints); |
---|
1510 | | - selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1511 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1512 | | - aConstraints.gridx += 1; |
---|
1513 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1514 | | - ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1515 | | - aConstraints.gridx = 0; |
---|
1516 | | - aConstraints.gridy += 1; |
---|
1517 | | - aConstraints.gridwidth = 1; |
---|
| 1553 | + cGridBag sheen = new cGridBag(); |
---|
| 1554 | + sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints); |
---|
| 1555 | + sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1556 | + sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1557 | + diffuseSection.add(sheen); |
---|
1518 | 1558 | |
---|
1519 | | - ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints); |
---|
1520 | | - sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1521 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1522 | | - aConstraints.gridx += 1; |
---|
1523 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1524 | | - ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1525 | | - aConstraints.gridx = 0; |
---|
1526 | | - aConstraints.gridy += 1; |
---|
1527 | | - aConstraints.gridwidth = 1; |
---|
| 1559 | + cGridBag subsurface = new cGridBag(); |
---|
| 1560 | + subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints); |
---|
| 1561 | + subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1562 | + subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1563 | + diffuseSection.add(subsurface); |
---|
1528 | 1564 | |
---|
1529 | | - ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints); |
---|
1530 | | - subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1531 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1532 | | - aConstraints.gridx += 1; |
---|
1533 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1534 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1535 | | - aConstraints.gridx = 0; |
---|
1536 | | - aConstraints.gridy += 1; |
---|
1537 | | - aConstraints.gridwidth = 1; |
---|
| 1565 | + cGridBag shadow = new cGridBag(); |
---|
| 1566 | + shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints); |
---|
| 1567 | + shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1568 | + shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1569 | + diffuseSection.add(shadow); |
---|
1538 | 1570 | |
---|
1539 | | - ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints); |
---|
1540 | | - shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1541 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1542 | | - aConstraints.gridx += 1; |
---|
1543 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1544 | | - ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1545 | | - aConstraints.gridx = 0; |
---|
1546 | | - aConstraints.gridy += 1; |
---|
1547 | | - aConstraints.gridwidth = 1; |
---|
| 1571 | + cGridBag fakedepth = new cGridBag(); |
---|
| 1572 | + fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints); |
---|
| 1573 | + fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1574 | + fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1575 | + diffuseSection.add(fakedepth); |
---|
1548 | 1576 | |
---|
1549 | | - ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints); |
---|
1550 | | - fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1551 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1552 | | - aConstraints.gridx += 1; |
---|
1553 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1554 | | - ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1555 | | - aConstraints.gridx = 0; |
---|
1556 | | - aConstraints.gridy += 1; |
---|
1557 | | - aConstraints.gridwidth = 1; |
---|
| 1577 | + panel.add(new JSeparator()); |
---|
| 1578 | + |
---|
| 1579 | + panel.add(diffuseSection); |
---|
| 1580 | + |
---|
| 1581 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1582 | + |
---|
| 1583 | + cGridBag specularSection = new cGridBag().setVertical(true); |
---|
1558 | 1584 | |
---|
1559 | | - //aConstraints.weighty = 1; |
---|
1560 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1561 | | - //aConstraints.gridx += 1; |
---|
1562 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1563 | | - aConstraints.weighty = 0; |
---|
1564 | | - aConstraints.gridx = 0; |
---|
1565 | | - aConstraints.gridy += 1; |
---|
1566 | | - aConstraints.gridwidth = 1; |
---|
| 1585 | + cGridBag specular = new cGridBag(); |
---|
| 1586 | + specular.add(specularLabel = new JLabel("Specular")); // , aConstraints); |
---|
| 1587 | + specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1588 | + specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1589 | + specularSection.add(specular); |
---|
1567 | 1590 | |
---|
1568 | | - ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints); |
---|
1569 | | - specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1570 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1571 | | - aConstraints.gridx += 1; |
---|
1572 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1573 | | - ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1574 | | - aConstraints.gridx = 0; |
---|
1575 | | - aConstraints.gridy += 1; |
---|
1576 | | - aConstraints.gridwidth = 1; |
---|
| 1591 | + cGridBag lightarea = new cGridBag(); |
---|
| 1592 | + lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints); |
---|
| 1593 | + lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1594 | + lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1595 | + specularSection.add(lightarea); |
---|
1577 | 1596 | |
---|
1578 | | - ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints); |
---|
1579 | | - lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1580 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1581 | | - aConstraints.gridx += 1; |
---|
1582 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1583 | | - ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1584 | | - aConstraints.gridx = 0; |
---|
1585 | | - aConstraints.gridy += 1; |
---|
1586 | | - aConstraints.gridwidth = 1; |
---|
| 1597 | + cGridBag shininess = new cGridBag(); |
---|
| 1598 | + shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints); |
---|
| 1599 | + shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1600 | + shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1601 | + specularSection.add(shininess); |
---|
1587 | 1602 | |
---|
1588 | | - ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints); |
---|
1589 | | - shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1590 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1591 | | - aConstraints.gridx += 1; |
---|
1592 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1593 | | - ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1594 | | - aConstraints.gridx = 0; |
---|
1595 | | - aConstraints.gridy += 1; |
---|
1596 | | - aConstraints.gridwidth = 1; |
---|
| 1603 | + cGridBag metalness = new cGridBag(); |
---|
| 1604 | + metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints); |
---|
| 1605 | + metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1606 | + metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1607 | + specularSection.add(metalness); |
---|
1597 | 1608 | |
---|
1598 | | - ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints); |
---|
1599 | | - metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1600 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1601 | | - aConstraints.gridx += 1; |
---|
1602 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1603 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1604 | | - aConstraints.gridx = 0; |
---|
1605 | | - aConstraints.gridy += 1; |
---|
1606 | | - aConstraints.gridwidth = 1; |
---|
| 1609 | + cGridBag velvet = new cGridBag(); |
---|
| 1610 | + velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints); |
---|
| 1611 | + velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1612 | + velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1613 | + specularSection.add(velvet); |
---|
1607 | 1614 | |
---|
1608 | | - ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints); |
---|
1609 | | - velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1610 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1611 | | - aConstraints.gridx += 1; |
---|
1612 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1613 | | - ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1614 | | - aConstraints.gridx = 0; |
---|
1615 | | - aConstraints.gridy += 1; |
---|
1616 | | - aConstraints.gridwidth = 1; |
---|
1617 | | - |
---|
1618 | | - shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
1619 | | - Return(); |
---|
| 1615 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
| 1616 | + //Return(); |
---|
1620 | 1617 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1621 | 1618 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1622 | 1619 | // aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
1627 | 1624 | // aConstraints.gridy += 1; |
---|
1628 | 1625 | // aConstraints.gridwidth = 1; |
---|
1629 | 1626 | |
---|
1630 | | - //aConstraints.weighty = 1; |
---|
1631 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1632 | | - //aConstraints.gridx += 1; |
---|
1633 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1634 | | - aConstraints.weighty = 0; |
---|
1635 | | - aConstraints.gridx = 0; |
---|
1636 | | - aConstraints.gridy += 1; |
---|
1637 | | - aConstraints.gridwidth = 1; |
---|
1638 | 1627 | |
---|
1639 | | - ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints); |
---|
1640 | | - cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1641 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1642 | | - aConstraints.gridx += 1; |
---|
1643 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1644 | | - ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1645 | | - aConstraints.gridx = 0; |
---|
1646 | | - aConstraints.gridy += 1; |
---|
1647 | | - aConstraints.gridwidth = 1; |
---|
| 1628 | + panel.add(new JSeparator()); |
---|
| 1629 | + |
---|
| 1630 | + panel.add(specularSection); |
---|
| 1631 | + |
---|
| 1632 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1633 | + |
---|
| 1634 | + cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1648 | 1635 | |
---|
1649 | | - ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints); |
---|
1650 | | - ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1651 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1652 | | - aConstraints.gridx += 1; |
---|
1653 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1654 | | - ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1655 | | - aConstraints.gridx = 0; |
---|
1656 | | - aConstraints.gridy += 1; |
---|
1657 | | - aConstraints.gridwidth = 1; |
---|
| 1636 | + cGridBag camera = new cGridBag(); |
---|
| 1637 | + camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
| 1638 | + cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1639 | + camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1640 | + globalSection.add(camera); |
---|
1658 | 1641 | |
---|
1659 | | - ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints); |
---|
1660 | | - backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1661 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1662 | | - aConstraints.gridx += 1; |
---|
1663 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1664 | | - ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1665 | | - aConstraints.gridx = 0; |
---|
1666 | | - aConstraints.gridy += 1; |
---|
1667 | | - aConstraints.gridwidth = 1; |
---|
| 1642 | + cGridBag ambient = new cGridBag(); |
---|
| 1643 | + ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
| 1644 | + ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1645 | + ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1646 | + globalSection.add(ambient); |
---|
1668 | 1647 | |
---|
1669 | | - ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints); |
---|
1670 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1671 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1672 | | - aConstraints.gridx += 1; |
---|
1673 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1674 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1675 | | - aConstraints.gridx = 0; |
---|
1676 | | - aConstraints.gridy += 1; |
---|
1677 | | - aConstraints.gridwidth = 1; |
---|
1678 | | - aConstraints.weighty = 0; |
---|
| 1648 | + cGridBag backlit = new cGridBag(); |
---|
| 1649 | + backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
| 1650 | + backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1651 | + backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1652 | + globalSection.add(backlit); |
---|
1679 | 1653 | |
---|
1680 | | - ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints); |
---|
1681 | | - bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1682 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1683 | | - aConstraints.gridx += 1; |
---|
1684 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1685 | | - ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints); |
---|
1686 | | - aConstraints.gridx = 0; |
---|
1687 | | - aConstraints.gridy += 1; |
---|
1688 | | - aConstraints.gridwidth = 1; |
---|
| 1654 | + cGridBag opacity = new cGridBag(); |
---|
| 1655 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 1656 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1657 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1658 | + globalSection.add(opacity); |
---|
1689 | 1659 | |
---|
1690 | | - ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints); |
---|
1691 | | - noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1692 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1693 | | - aConstraints.gridx += 1; |
---|
1694 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1695 | | - ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints); |
---|
1696 | | - aConstraints.gridx = 0; |
---|
1697 | | - aConstraints.gridy += 1; |
---|
1698 | | - aConstraints.gridwidth = 1; |
---|
| 1660 | + panel.add(new JSeparator()); |
---|
| 1661 | + |
---|
| 1662 | + panel.add(globalSection); |
---|
| 1663 | + |
---|
| 1664 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1665 | + |
---|
| 1666 | + cGridBag textureSection = new cGridBag().setVertical(true); |
---|
1699 | 1667 | |
---|
1700 | | - ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints); |
---|
1701 | | - powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1702 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1703 | | - aConstraints.gridx += 1; |
---|
1704 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1705 | | - ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints); |
---|
1706 | | - aConstraints.gridx = 0; |
---|
1707 | | - aConstraints.gridy += 1; |
---|
1708 | | - aConstraints.gridwidth = 1; |
---|
| 1668 | + cGridBag bump = new cGridBag(); |
---|
| 1669 | + bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints); |
---|
| 1670 | + bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1671 | + bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
---|
| 1672 | + textureSection.add(bump); |
---|
1709 | 1673 | |
---|
1710 | | - ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints); |
---|
1711 | | - borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1712 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1713 | | - aConstraints.gridx += 1; |
---|
1714 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1715 | | - ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints); |
---|
1716 | | - aConstraints.gridx = 0; |
---|
1717 | | - aConstraints.gridy += 1; |
---|
1718 | | - aConstraints.gridwidth = 1; |
---|
| 1674 | + cGridBag noise = new cGridBag(); |
---|
| 1675 | + noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints); |
---|
| 1676 | + noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1677 | + noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints); |
---|
| 1678 | + textureSection.add(noise); |
---|
1719 | 1679 | |
---|
1720 | | - ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints); |
---|
1721 | | - fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1722 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1723 | | - aConstraints.gridx += 1; |
---|
1724 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1725 | | - ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints); |
---|
1726 | | - aConstraints.gridx = 0; |
---|
1727 | | - aConstraints.gridy += 1; |
---|
1728 | | - aConstraints.gridwidth = 1; |
---|
| 1680 | + cGridBag power = new cGridBag(); |
---|
| 1681 | + power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints); |
---|
| 1682 | + powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1683 | + power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints); |
---|
| 1684 | + textureSection.add(power); |
---|
1729 | 1685 | |
---|
1730 | | - ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints); |
---|
1731 | | - opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1732 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1733 | | - aConstraints.gridx += 1; |
---|
1734 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1735 | | - ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints); |
---|
1736 | | - aConstraints.gridx = 0; |
---|
1737 | | - aConstraints.gridy += 1; |
---|
1738 | | - aConstraints.gridwidth = 1; |
---|
| 1686 | + cGridBag borderfade = new cGridBag(); |
---|
| 1687 | + borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints); |
---|
| 1688 | + borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1689 | + borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
---|
| 1690 | + textureSection.add(borderfade); |
---|
1739 | 1691 | |
---|
1740 | | - //aConstraints.weighty = 1; |
---|
1741 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1742 | | - //aConstraints.gridx += 1; |
---|
1743 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1744 | | - aConstraints.weighty = 0; |
---|
| 1692 | + cGridBag fog = new cGridBag(); |
---|
| 1693 | + fog.add(fogLabel = new JLabel("Punch")); // , aConstraints); |
---|
| 1694 | + fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1695 | + fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints); |
---|
| 1696 | + textureSection.add(fog); |
---|
1745 | 1697 | |
---|
1746 | | - aConstraints.gridx = 0; |
---|
1747 | | - aConstraints.gridy = 0; |
---|
1748 | | - aConstraints.gridwidth = 1; |
---|
| 1698 | + cGridBag opacityPower = new cGridBag(); |
---|
| 1699 | + opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints); |
---|
| 1700 | + opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1701 | + opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
| 1702 | + textureSection.add(opacityPower); |
---|
| 1703 | + |
---|
| 1704 | + panel.add(new JSeparator()); |
---|
| 1705 | + |
---|
| 1706 | + panel.add(textureSection); |
---|
| 1707 | + |
---|
| 1708 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1749 | 1709 | |
---|
1750 | 1710 | SetMaterial(copy); // .GetMaterial()); |
---|
1751 | 1711 | |
---|
1752 | | - colorField.addChangeListener(this); |
---|
1753 | | - modulationField.addChangeListener(this); |
---|
| 1712 | + //colorField.addChangeListener(this); |
---|
| 1713 | +// modulationField.addChangeListener(this); |
---|
1754 | 1714 | metalnessField.addChangeListener(this); |
---|
1755 | 1715 | diffuseField.addChangeListener(this); |
---|
1756 | 1716 | specularField.addChangeListener(this); |
---|
.. | .. |
---|
1859 | 1819 | } |
---|
1860 | 1820 | |
---|
1861 | 1821 | // Images/textures |
---|
1862 | | - if (textures |
---|
1863 | | - && (filename.toLowerCase().endsWith(".jpg") |
---|
1864 | | - || filename.toLowerCase().endsWith(".jpeg") |
---|
1865 | | - || filename.toLowerCase().endsWith(".gif") |
---|
1866 | | - || filename.toLowerCase().endsWith(".png") |
---|
1867 | | - || filename.toLowerCase().endsWith(".tre") |
---|
1868 | | - || filename.toLowerCase().endsWith(".bmp") |
---|
1869 | | - || filename.toLowerCase().endsWith(".tga") |
---|
1870 | | - || filename.toLowerCase().endsWith(".sgi") |
---|
1871 | | - || filename.toLowerCase().endsWith(".tif") |
---|
1872 | | - || filename.toLowerCase().endsWith(".tiff"))) |
---|
| 1822 | + if (filename.toLowerCase().endsWith(".jpg") |
---|
| 1823 | + || filename.toLowerCase().endsWith(".jpeg") |
---|
| 1824 | + || filename.toLowerCase().endsWith(".gif") |
---|
| 1825 | + || filename.toLowerCase().endsWith(".png") |
---|
| 1826 | + || filename.toLowerCase().endsWith(".tre") |
---|
| 1827 | + || filename.toLowerCase().endsWith(".bmp") |
---|
| 1828 | + || filename.toLowerCase().endsWith(".tga") |
---|
| 1829 | + || filename.toLowerCase().endsWith(".sgi") |
---|
| 1830 | + || filename.toLowerCase().endsWith(".tif") |
---|
| 1831 | + || filename.toLowerCase().endsWith(".tiff")) |
---|
1873 | 1832 | { |
---|
1874 | | - DropTexture(filename); |
---|
| 1833 | + if (textures) |
---|
| 1834 | + DropTexture(filename); |
---|
| 1835 | + else |
---|
| 1836 | + CreateBillboard(filename); |
---|
1875 | 1837 | continue; |
---|
1876 | 1838 | } |
---|
1877 | 1839 | |
---|
.. | .. |
---|
1880 | 1842 | } |
---|
1881 | 1843 | |
---|
1882 | 1844 | ResetModel(); |
---|
| 1845 | + } |
---|
| 1846 | + |
---|
| 1847 | + void CreateBillboard(String filename) |
---|
| 1848 | + { |
---|
| 1849 | + Object3D source = null; |
---|
| 1850 | + Object3D group = copy; |
---|
| 1851 | + |
---|
| 1852 | + if (group.selection.size() > 0) |
---|
| 1853 | + { |
---|
| 1854 | + source = group.selection.get(0); |
---|
| 1855 | + } |
---|
| 1856 | + |
---|
| 1857 | + Grid grid = new Grid(1,1); |
---|
| 1858 | + grid.material = null; |
---|
| 1859 | + |
---|
| 1860 | + grid.toParent = LA.newMatrix(); |
---|
| 1861 | + grid.fromParent = LA.newMatrix(); |
---|
| 1862 | + LA.matYRotate(grid.toParent, Math.PI/2); |
---|
| 1863 | + LA.matXRotate(grid.toParent, -Math.PI/2); |
---|
| 1864 | + LA.matXRotate(grid.fromParent, Math.PI/2); |
---|
| 1865 | + LA.matYRotate(grid.fromParent, -Math.PI/2); |
---|
| 1866 | + |
---|
| 1867 | + BillboardNode bb = new BillboardNode(); |
---|
| 1868 | + bb.addChild(grid); |
---|
| 1869 | + |
---|
| 1870 | + Object3D newgroup = new Object3D(); |
---|
| 1871 | + newgroup.CreateMaterial(); |
---|
| 1872 | + |
---|
| 1873 | + File file = new File(filename); |
---|
| 1874 | + newgroup.name = file.getName(); |
---|
| 1875 | + newgroup.addChild(bb); |
---|
| 1876 | + |
---|
| 1877 | + Object3D main = newgroup; |
---|
| 1878 | + |
---|
| 1879 | + main.SetPigmentTexture(filename); |
---|
| 1880 | + |
---|
| 1881 | + if (source != null) |
---|
| 1882 | + { |
---|
| 1883 | + main.material = new cMaterial(source.material); |
---|
| 1884 | + if (main.projectedVertices.length < source.projectedVertices.length) |
---|
| 1885 | + { |
---|
| 1886 | + main.projectedVertices = new Object3D.cVector2[source.projectedVertices.length]; |
---|
| 1887 | + } |
---|
| 1888 | + |
---|
| 1889 | + for (int i=0; i<source.projectedVertices.length; i++) |
---|
| 1890 | + { |
---|
| 1891 | + main.projectedVertices[i].x = source.projectedVertices[i].x; |
---|
| 1892 | + main.projectedVertices[i].y = source.projectedVertices[i].y; |
---|
| 1893 | + } |
---|
| 1894 | + |
---|
| 1895 | + main.texres = source.texres; |
---|
| 1896 | + } |
---|
| 1897 | + |
---|
| 1898 | + makeSomething(newgroup, false); |
---|
1883 | 1899 | } |
---|
1884 | 1900 | |
---|
1885 | 1901 | Point location; |
---|
.. | .. |
---|
2138 | 2154 | { |
---|
2139 | 2155 | Mocap sel = (Mocap) copy.selection.get(0); |
---|
2140 | 2156 | |
---|
| 2157 | + sel.SetCurrentBones(sel.frame); |
---|
| 2158 | + |
---|
2141 | 2159 | sel.fullname = fullname; |
---|
2142 | 2160 | |
---|
2143 | 2161 | if (changename) |
---|
.. | .. |
---|
2151 | 2169 | sel.smoothed = false; |
---|
2152 | 2170 | |
---|
2153 | 2171 | // if (!changename) |
---|
2154 | | - sel.SetPositionDelta(false, true, true, true/*?*/); // false |
---|
| 2172 | + //sel.SetPositionDelta(false, true, true, true/*?*/); // false |
---|
| 2173 | + sel.SetGlobalTransform(); |
---|
| 2174 | + sel.LoadData(); |
---|
| 2175 | + sel.Rewind(); |
---|
| 2176 | + sel.Fade(); |
---|
2155 | 2177 | // sel.setPose(0); |
---|
2156 | 2178 | refreshContents(); |
---|
2157 | 2179 | } else |
---|
2158 | 2180 | { |
---|
2159 | 2181 | mocap.Reset(); |
---|
2160 | 2182 | // new skeleton |
---|
2161 | | - makeSomething(mocap, false); // true); |
---|
| 2183 | + makeSomething(mocap, true); // true); |
---|
2162 | 2184 | } |
---|
2163 | 2185 | } catch (Exception e) |
---|
2164 | 2186 | { |
---|
.. | .. |
---|
2185 | 2207 | { |
---|
2186 | 2208 | Mocap sel = (Mocap) select; |
---|
2187 | 2209 | |
---|
| 2210 | + sel.SetCurrentBones(sel.frame); |
---|
| 2211 | + |
---|
2188 | 2212 | File file = new File(fullname); |
---|
2189 | 2213 | |
---|
2190 | 2214 | // Mocap mocap = new Mocap("Mocap" + file.getName()); |
---|
.. | .. |
---|
2251 | 2275 | |
---|
2252 | 2276 | if (!changename) |
---|
2253 | 2277 | { |
---|
2254 | | - sel.SetPositionDelta(false, true, true, true/*?*/); |
---|
| 2278 | + //sel.SetPositionDelta(false, true, true, true/*?*/); |
---|
| 2279 | + sel.SetGlobalTransform(); |
---|
| 2280 | + sel.LoadData(); |
---|
| 2281 | + sel.Rewind(); |
---|
| 2282 | + sel.Fade(); |
---|
2255 | 2283 | } |
---|
2256 | 2284 | |
---|
2257 | 2285 | // sel.setPose(0); |
---|
.. | .. |
---|
2345 | 2373 | |
---|
2346 | 2374 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2347 | 2375 | { |
---|
2348 | | - if (GraphreeD.standAlone) |
---|
| 2376 | + if (GrafreeD.standAlone) |
---|
2349 | 2377 | { |
---|
2350 | 2378 | /**/ |
---|
2351 | 2379 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
.. | .. |
---|
2494 | 2522 | } |
---|
2495 | 2523 | if (input == null) |
---|
2496 | 2524 | { |
---|
| 2525 | + new Exception().printStackTrace(); |
---|
2497 | 2526 | System.exit(0); |
---|
2498 | 2527 | } |
---|
2499 | 2528 | |
---|
.. | .. |
---|
2890 | 2919 | // june 2013 copy.HardTouch(); |
---|
2891 | 2920 | cameraView.repaint(); |
---|
2892 | 2921 | return; |
---|
2893 | | - } else if (event.getSource() == toggleFullItem) |
---|
| 2922 | + } else if (event.getSource() == toggleTimelineItem) |
---|
2894 | 2923 | { |
---|
2895 | | - if (CameraPane.FULLSCREEN) |
---|
| 2924 | + timeline ^= true; |
---|
| 2925 | + |
---|
| 2926 | + if (timeline) |
---|
2896 | 2927 | { |
---|
2897 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
2898 | | - framePanel.add(bigThree); |
---|
2899 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
2900 | | - } else |
---|
2901 | | - { |
---|
2902 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
2903 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 2928 | + centralPanel.remove(cameraView); |
---|
| 2929 | + cameraPanel.add(cameraView); |
---|
| 2930 | + centralPanel.add(cameraPanel); |
---|
| 2931 | + frame.setJMenuBar(timelineMenubar); |
---|
| 2932 | + wasFullScreen = CameraPane.FULLSCREEN; |
---|
| 2933 | + if (!CameraPane.FULLSCREEN) |
---|
| 2934 | + ToggleFullScreen(); |
---|
| 2935 | + toggleFullScreenItem.setEnabled(false); |
---|
2904 | 2936 | } |
---|
| 2937 | + else |
---|
| 2938 | + { |
---|
| 2939 | + centralPanel.remove(cameraPanel); |
---|
| 2940 | + centralPanel.add(cameraView); |
---|
| 2941 | + frame.setJMenuBar(null); |
---|
| 2942 | + if (!wasFullScreen) |
---|
| 2943 | + ToggleFullScreen(); |
---|
| 2944 | + toggleFullScreenItem.setEnabled(true); |
---|
| 2945 | + } |
---|
| 2946 | + |
---|
2905 | 2947 | frame.validate(); |
---|
2906 | | - cameraView.ToggleFullScreen(); |
---|
| 2948 | + return; |
---|
| 2949 | + } else if (event.getSource() == toggleFullScreenItem) |
---|
| 2950 | + { |
---|
| 2951 | + ToggleFullScreen(); |
---|
| 2952 | + frame.validate(); |
---|
2907 | 2953 | |
---|
2908 | 2954 | return; |
---|
2909 | 2955 | } else if (event.getSource() == toggleRandomItem) |
---|
.. | .. |
---|
2951 | 2997 | if (event.getSource() == randomCB) |
---|
2952 | 2998 | { |
---|
2953 | 2999 | copy.random ^= true; |
---|
| 3000 | + objEditor.refreshContents(); |
---|
2954 | 3001 | return; |
---|
2955 | 3002 | } |
---|
2956 | 3003 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3013 | 3060 | objEditor.refreshContents(); |
---|
3014 | 3061 | } else if (event.getSource() == stepItem) |
---|
3015 | 3062 | { |
---|
3016 | | - cameraView.ONESTEP = true; |
---|
| 3063 | + //cameraView.ONESTEP = true; |
---|
| 3064 | + Globals.ONESTEP = true; |
---|
3017 | 3065 | cameraView.repaint(); |
---|
3018 | 3066 | return; |
---|
3019 | 3067 | } else if (event.getSource() == stepButton) |
---|
.. | .. |
---|
3152 | 3200 | cameraView.RevertCamera(); |
---|
3153 | 3201 | cameraView.repaint(); |
---|
3154 | 3202 | return; |
---|
3155 | | - } else if (event.getSource() == textureButton) |
---|
3156 | | - { |
---|
3157 | | - return; // true; |
---|
| 3203 | +// } else if (event.getSource() == textureButton) |
---|
| 3204 | +// { |
---|
| 3205 | +// return; // true; |
---|
3158 | 3206 | } else // combos... |
---|
3159 | 3207 | if (event.getSource() == texresMenu) |
---|
3160 | 3208 | { |
---|
.. | .. |
---|
3170 | 3218 | |
---|
3171 | 3219 | void ToggleAnimation() |
---|
3172 | 3220 | { |
---|
3173 | | - if (!CameraPane.ANIMATION) |
---|
| 3221 | + if (!Globals.ANIMATION) |
---|
3174 | 3222 | { |
---|
3175 | 3223 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3176 | | - browser.show(); |
---|
| 3224 | + browser.setVisible(true); |
---|
3177 | 3225 | String filename = browser.getFile(); |
---|
3178 | 3226 | if (filename != null && filename.length() > 0) |
---|
3179 | 3227 | { |
---|
3180 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3228 | + Globals.filename = browser.getDirectory() + filename; |
---|
3181 | 3229 | //CameraPane.framecount = 0; |
---|
3182 | | - CameraPane.imagecount = 0; |
---|
| 3230 | + Globals.imagecount = 0; |
---|
3183 | 3231 | |
---|
3184 | | - CameraPane.ANIMATION ^= true; |
---|
| 3232 | + Globals.ANIMATION ^= true; |
---|
3185 | 3233 | |
---|
3186 | | - GraphreeD.wav.cursor = 0; |
---|
3187 | | - GraphreeD.wav.loop = 0; |
---|
| 3234 | + GrafreeD.wav.cursor = 0; |
---|
| 3235 | + GrafreeD.wav.loop = 0; |
---|
3188 | 3236 | } |
---|
3189 | 3237 | } else |
---|
3190 | 3238 | { |
---|
3191 | | - CameraPane.ANIMATION ^= true; |
---|
| 3239 | + Globals.ANIMATION ^= true; |
---|
3192 | 3240 | } |
---|
3193 | 3241 | } |
---|
3194 | 3242 | |
---|
.. | .. |
---|
3205 | 3253 | callee.refreshContents(); |
---|
3206 | 3254 | } else |
---|
3207 | 3255 | { |
---|
| 3256 | + new Exception().printStackTrace(); |
---|
3208 | 3257 | System.exit(0); |
---|
3209 | 3258 | } |
---|
3210 | 3259 | } |
---|
.. | .. |
---|
3367 | 3416 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
3368 | 3417 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
3369 | 3418 | |
---|
3370 | | - if (!NumberSlider.frozen) |
---|
| 3419 | + if (!cNumberSlider.frozen) |
---|
3371 | 3420 | { |
---|
3372 | 3421 | //System.out.println("Propagate = " + propagate); |
---|
3373 | 3422 | copy.UpdateMaterial(anchor, current, propagate); |
---|
.. | .. |
---|
3415 | 3464 | || e.getSource() == apertureField |
---|
3416 | 3465 | || e.getSource() == shadowblurField) |
---|
3417 | 3466 | { |
---|
| 3467 | + new Exception().printStackTrace(); |
---|
3418 | 3468 | System.exit(0); |
---|
3419 | 3469 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3420 | 3470 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
3441 | 3491 | //System.out.println("PARENT = " + parent); |
---|
3442 | 3492 | //if (parent != null) |
---|
3443 | 3493 | // parent.applySelf(); |
---|
3444 | | - refreshContents(); |
---|
| 3494 | + if (e.getSource() == normalpushField) |
---|
| 3495 | + { |
---|
| 3496 | + objEditor.refreshContents(); |
---|
| 3497 | + //Refresh(); |
---|
| 3498 | + } |
---|
| 3499 | + else |
---|
| 3500 | + refreshContents(); |
---|
3445 | 3501 | // ??? client.refreshEditWindow(); |
---|
3446 | 3502 | } |
---|
3447 | 3503 | //else |
---|
.. | .. |
---|
3453 | 3509 | //group.name = nameField.getText(); |
---|
3454 | 3510 | //objEditor.applySelf(); |
---|
3455 | 3511 | |
---|
3456 | | - assert (objEditor == this); |
---|
| 3512 | + // OCT2018: assert (objEditor == this); |
---|
3457 | 3513 | if (copy.selection == null || copy.selection.size() == 0) |
---|
3458 | 3514 | //super.applySelf() |
---|
3459 | 3515 | ; else |
---|
.. | .. |
---|
3477 | 3533 | objEditor.copy = keep; |
---|
3478 | 3534 | } |
---|
3479 | 3535 | } |
---|
| 3536 | + |
---|
| 3537 | + if (normalpushField != null) |
---|
| 3538 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
3480 | 3539 | } |
---|
3481 | 3540 | |
---|
3482 | 3541 | void SnapObject() |
---|
3483 | 3542 | { |
---|
3484 | | - Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
3485 | | - SnapObject(obj); |
---|
| 3543 | + if (copy.selection.size() > 0) |
---|
| 3544 | + { |
---|
| 3545 | + Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
| 3546 | + SnapObject(obj); |
---|
| 3547 | + } |
---|
3486 | 3548 | } |
---|
3487 | 3549 | |
---|
3488 | 3550 | void SnapObject(Object3D obj) |
---|
.. | .. |
---|
3596 | 3658 | |
---|
3597 | 3659 | if (obj.parent != null) |
---|
3598 | 3660 | { |
---|
3599 | | - obj.parent.TransformToWorld(interest); |
---|
| 3661 | +// obj.parent.TransformToWorld(interest); |
---|
3600 | 3662 | } |
---|
3601 | 3663 | |
---|
3602 | 3664 | if (!CameraPane.TRACK) |
---|
.. | .. |
---|
3728 | 3790 | |
---|
3729 | 3791 | radioPanel.revalidate(); |
---|
3730 | 3792 | radioPanel.repaint(); |
---|
3731 | | - ctrlPanel.revalidate(); // ? new |
---|
| 3793 | + ctrlPanel.validate(); // ? new |
---|
3732 | 3794 | ctrlPanel.repaint(); |
---|
3733 | 3795 | } |
---|
3734 | 3796 | } |
---|
.. | .. |
---|
4085 | 4147 | |
---|
4086 | 4148 | void load() // throws ClassNotFoundException |
---|
4087 | 4149 | { |
---|
4088 | | - if (GraphreeD.standAlone) |
---|
| 4150 | + if (GrafreeD.standAlone) |
---|
4089 | 4151 | { |
---|
4090 | 4152 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4091 | 4153 | browser.show(); |
---|
.. | .. |
---|
4190 | 4252 | |
---|
4191 | 4253 | void saveAs() |
---|
4192 | 4254 | { |
---|
4193 | | - if (GraphreeD.standAlone) |
---|
| 4255 | + if (GrafreeD.standAlone) |
---|
4194 | 4256 | { |
---|
4195 | 4257 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4196 | 4258 | browser.setVisible(true); |
---|
.. | .. |
---|
4213 | 4275 | |
---|
4214 | 4276 | Object3D object = copy.selection.get(0); |
---|
4215 | 4277 | |
---|
| 4278 | + FileObject fileobj = null; |
---|
| 4279 | + |
---|
| 4280 | + if (object instanceof FileObject) |
---|
| 4281 | + fileobj = (FileObject)object; |
---|
| 4282 | + |
---|
4216 | 4283 | if (object.fileparent != null) |
---|
4217 | 4284 | { |
---|
4218 | | - FileObject fileobj = (FileObject) object.fileparent; |
---|
| 4285 | + assert(fileobj == null); |
---|
4219 | 4286 | |
---|
| 4287 | + fileobj = (FileObject) object.fileparent; |
---|
| 4288 | + } |
---|
| 4289 | + |
---|
| 4290 | + if (fileobj != null) |
---|
| 4291 | + { |
---|
4220 | 4292 | System.out.println("WriteObject " + object + " : " + fileobj.name); |
---|
4221 | 4293 | WriteObject(object, fileobj.name); |
---|
4222 | 4294 | } |
---|
.. | .. |
---|
4259 | 4331 | } |
---|
4260 | 4332 | } |
---|
4261 | 4333 | else |
---|
4262 | | - //if (GraphreeD.standAlone) |
---|
| 4334 | + //if (GrafreeD.standAlone) |
---|
4263 | 4335 | { |
---|
4264 | 4336 | FileDialog browser = new FileDialog(frame, "Export", FileDialog.SAVE); |
---|
4265 | 4337 | browser.setVisible(true); |
---|
.. | .. |
---|
4291 | 4363 | Object3D objectparent = obj.parent; |
---|
4292 | 4364 | obj.parent = null; |
---|
4293 | 4365 | |
---|
4294 | | - Object3D object = (Object3D) GraphreeD.clone(obj); |
---|
| 4366 | + Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
4295 | 4367 | |
---|
4296 | 4368 | obj.parent = objectparent; |
---|
4297 | 4369 | |
---|
.. | .. |
---|
4325 | 4397 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4326 | 4398 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4327 | 4399 | copy.generatePOV(buffer); |
---|
4328 | | - if (GraphreeD.standAlone) |
---|
| 4400 | + if (GrafreeD.standAlone) |
---|
4329 | 4401 | { |
---|
4330 | 4402 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4331 | 4403 | browser.show(); |
---|
.. | .. |
---|
4364 | 4436 | //MenuItem normalLensItem; |
---|
4365 | 4437 | MenuItem editCameraItem; |
---|
4366 | 4438 | MenuItem revertCameraItem; |
---|
4367 | | - CheckboxMenuItem toggleLiveItem; |
---|
4368 | 4439 | MenuItem stepItem; |
---|
4369 | | - CheckboxMenuItem toggleFullItem; |
---|
| 4440 | + CheckboxMenuItem toggleLiveItem; |
---|
| 4441 | + CheckboxMenuItem toggleFullScreenItem; |
---|
| 4442 | + CheckboxMenuItem toggleTimelineItem; |
---|
4370 | 4443 | CheckboxMenuItem toggleRenderItem; |
---|
4371 | 4444 | CheckboxMenuItem toggleDebugItem; |
---|
4372 | 4445 | CheckboxMenuItem toggleFrustumItem; |
---|
.. | .. |
---|
4381 | 4454 | JSplitPane mainPanel; |
---|
4382 | 4455 | JScrollPane scrollpane; |
---|
4383 | 4456 | JPanel toolbarPanel; |
---|
4384 | | - JPanel treePanel; |
---|
| 4457 | + cGridBag treePanel; |
---|
4385 | 4458 | JPanel radioPanel; |
---|
4386 | 4459 | ButtonGroup buttonGroup; |
---|
4387 | | - JPanel ctrlPanel; |
---|
4388 | | - JPanel materialPanel; |
---|
| 4460 | + cGridBag ctrlPanel; |
---|
| 4461 | + cGridBag materialPanel; |
---|
4389 | 4462 | JScrollPane infoPanel; |
---|
4390 | | - JPanel optionsPanel; |
---|
| 4463 | + cGridBag optionsPanel; |
---|
4391 | 4464 | JTabbedPane objectPanel; |
---|
4392 | | - JPanel XYZPanel; |
---|
| 4465 | + cGridBag XYZPanel; |
---|
4393 | 4466 | JSplitPane gridPanel; |
---|
4394 | 4467 | JSplitPane bigPanel; |
---|
4395 | | - JPanel bigThree; |
---|
4396 | | - JTabbedPane jtp; |
---|
4397 | | - JPanel cameraPanel; |
---|
| 4468 | + cGridBag bigThree; |
---|
| 4469 | + cGridBag scenePanel; |
---|
| 4470 | + cGridBag centralPanel; |
---|
| 4471 | + JSplitPane cameraPanel; |
---|
| 4472 | + JPanel timelinePanel; |
---|
| 4473 | + JMenuBar timelineMenubar; |
---|
4398 | 4474 | JSplitPane framePanel; |
---|
4399 | 4475 | JTextArea/*Field*/ nameField; |
---|
4400 | | - cButton textureButton; |
---|
| 4476 | + //cButton textureButton; |
---|
4401 | 4477 | cButton okButton; |
---|
4402 | 4478 | cButton applyButton; |
---|
4403 | 4479 | cButton cancelButton; |
---|
.. | .. |
---|
4444 | 4520 | // MATERIAL |
---|
4445 | 4521 | JLabel materialLabel; |
---|
4446 | 4522 | JLabel colorLabel; |
---|
4447 | | - NumberSlider colorField; |
---|
| 4523 | + cNumberSlider colorField; |
---|
4448 | 4524 | JLabel modulationLabel; |
---|
4449 | | - NumberSlider modulationField; |
---|
| 4525 | + cNumberSlider modulationField; |
---|
4450 | 4526 | JLabel metalnessLabel; |
---|
4451 | | - NumberSlider metalnessField; |
---|
| 4527 | + cNumberSlider metalnessField; |
---|
4452 | 4528 | JLabel diffuseLabel; |
---|
4453 | | - NumberSlider diffuseField; |
---|
| 4529 | + cNumberSlider diffuseField; |
---|
4454 | 4530 | JLabel specularLabel; |
---|
4455 | | - NumberSlider specularField; |
---|
| 4531 | + cNumberSlider specularField; |
---|
4456 | 4532 | JLabel shininessLabel; |
---|
4457 | | - NumberSlider shininessField; |
---|
| 4533 | + cNumberSlider shininessField; |
---|
4458 | 4534 | JLabel shiftLabel; |
---|
4459 | | - NumberSlider shiftField; |
---|
| 4535 | + cNumberSlider shiftField; |
---|
4460 | 4536 | JLabel ambientLabel; |
---|
4461 | | - NumberSlider ambientField; |
---|
| 4537 | + cNumberSlider ambientField; |
---|
4462 | 4538 | JLabel lightareaLabel; |
---|
4463 | | - NumberSlider lightareaField; |
---|
| 4539 | + cNumberSlider lightareaField; |
---|
4464 | 4540 | JLabel diffusenessLabel; |
---|
4465 | | - NumberSlider diffusenessField; |
---|
| 4541 | + cNumberSlider diffusenessField; |
---|
4466 | 4542 | JLabel velvetLabel; |
---|
4467 | | - NumberSlider velvetField; |
---|
| 4543 | + cNumberSlider velvetField; |
---|
4468 | 4544 | JLabel sheenLabel; |
---|
4469 | | - NumberSlider sheenField; |
---|
| 4545 | + cNumberSlider sheenField; |
---|
4470 | 4546 | JLabel subsurfaceLabel; |
---|
4471 | | - NumberSlider subsurfaceField; |
---|
| 4547 | + cNumberSlider subsurfaceField; |
---|
4472 | 4548 | //JLabel bumpLabel; |
---|
4473 | 4549 | //NumberSlider bumpField; |
---|
4474 | 4550 | JLabel backlitLabel; |
---|
4475 | | - NumberSlider backlitField; |
---|
| 4551 | + cNumberSlider backlitField; |
---|
4476 | 4552 | JLabel anisoLabel; |
---|
4477 | | - NumberSlider anisoField; |
---|
| 4553 | + cNumberSlider anisoField; |
---|
4478 | 4554 | JLabel anisoVLabel; |
---|
4479 | | - NumberSlider anisoVField; |
---|
| 4555 | + cNumberSlider anisoVField; |
---|
4480 | 4556 | JLabel cameraLabel; |
---|
4481 | | - NumberSlider cameraField; |
---|
| 4557 | + cNumberSlider cameraField; |
---|
4482 | 4558 | JLabel selfshadowLabel; |
---|
4483 | | - NumberSlider selfshadowField; |
---|
| 4559 | + cNumberSlider selfshadowField; |
---|
4484 | 4560 | JLabel shadowLabel; |
---|
4485 | | - NumberSlider shadowField; |
---|
| 4561 | + cNumberSlider shadowField; |
---|
4486 | 4562 | JLabel textureLabel; |
---|
4487 | | - NumberSlider textureField; |
---|
| 4563 | + cNumberSlider textureField; |
---|
4488 | 4564 | JLabel opacityLabel; |
---|
4489 | | - NumberSlider opacityField; |
---|
| 4565 | + cNumberSlider opacityField; |
---|
4490 | 4566 | JLabel fakedepthLabel; |
---|
4491 | | - NumberSlider fakedepthField; |
---|
| 4567 | + cNumberSlider fakedepthField; |
---|
4492 | 4568 | JLabel shadowbiasLabel; |
---|
4493 | | - NumberSlider shadowbiasField; |
---|
| 4569 | + cNumberSlider shadowbiasField; |
---|
4494 | 4570 | JLabel bumpLabel; |
---|
4495 | | - NumberSlider bumpField; |
---|
| 4571 | + cNumberSlider bumpField; |
---|
4496 | 4572 | JLabel noiseLabel; |
---|
4497 | | - NumberSlider noiseField; |
---|
| 4573 | + cNumberSlider noiseField; |
---|
4498 | 4574 | JLabel powerLabel; |
---|
4499 | | - NumberSlider powerField; |
---|
| 4575 | + cNumberSlider powerField; |
---|
4500 | 4576 | JLabel borderfadeLabel; |
---|
4501 | | - NumberSlider borderfadeField; |
---|
| 4577 | + cNumberSlider borderfadeField; |
---|
4502 | 4578 | JLabel fogLabel; |
---|
4503 | | - NumberSlider fogField; |
---|
| 4579 | + cNumberSlider fogField; |
---|
4504 | 4580 | JLabel opacityPowerLabel; |
---|
4505 | | - NumberSlider opacityPowerField; |
---|
| 4581 | + cNumberSlider opacityPowerField; |
---|
4506 | 4582 | JTree jTree; |
---|
4507 | 4583 | //ObjectUI parent; |
---|
| 4584 | + |
---|
| 4585 | + cNumberSlider normalpushField; |
---|
4508 | 4586 | } |
---|