.. | .. |
---|
138 | 138 | public void closeUI() |
---|
139 | 139 | { |
---|
140 | 140 | //new Exception().printStackTrace(); |
---|
141 | | - System.out.println("this = " + this); |
---|
142 | | - System.out.println("objEditor = " + objEditor); |
---|
| 141 | +// System.out.println("this = " + this); |
---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
---|
143 | 143 | //nameField.removeActionListener(this); |
---|
144 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
---|
| 145 | + |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
145 | 147 | |
---|
146 | 148 | if (!GroupEditor.allparams) |
---|
147 | 149 | return; |
---|
148 | 150 | |
---|
149 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
150 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
151 | | - objEditor.ctrlPanel.remove(markCB); |
---|
152 | | - |
---|
153 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
154 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
155 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
156 | | - |
---|
157 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
158 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
159 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
160 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
161 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
162 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
163 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
164 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
165 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
166 | | - objEditor.ctrlPanel.remove(remarkButton); |
---|
| 151 | +// objEditor.ctrlPanel.remove(liveCB); |
---|
| 152 | +// objEditor.ctrlPanel.remove(hideCB); |
---|
| 153 | +// objEditor.ctrlPanel.remove(markCB); |
---|
| 154 | +// |
---|
| 155 | +// objEditor.ctrlPanel.remove(randomCB); |
---|
| 156 | +// objEditor.ctrlPanel.remove(speedupCB); |
---|
| 157 | +// objEditor.ctrlPanel.remove(rewindCB); |
---|
| 158 | +// |
---|
| 159 | +// objEditor.ctrlPanel.remove(resetButton); |
---|
| 160 | +// objEditor.ctrlPanel.remove(stepButton); |
---|
| 161 | +//// objEditor.ctrlPanel.remove(stepAllButton); |
---|
| 162 | +//// objEditor.ctrlPanel.remove(resetAllButton); |
---|
| 163 | +// objEditor.ctrlPanel.remove(link2masterCB); |
---|
| 164 | +// //objEditor.ctrlPanel.remove(flipVCB); |
---|
| 165 | +// //objEditor.ctrlPanel.remove(texresMenu); |
---|
| 166 | +// objEditor.ctrlPanel.remove(slowerButton); |
---|
| 167 | +// objEditor.ctrlPanel.remove(fasterButton); |
---|
| 168 | +// objEditor.ctrlPanel.remove(remarkButton); |
---|
167 | 169 | |
---|
168 | | - Remove(normalpushField); |
---|
| 170 | + objEditor.ctrlPanel.remove(setupPanel); |
---|
| 171 | + objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 172 | + objEditor.ctrlPanel.remove(pushPanel); |
---|
| 173 | + //objEditor.ctrlPanel.remove(fillPanel); |
---|
| 174 | + |
---|
| 175 | + //Remove(normalpushField); |
---|
169 | 176 | } |
---|
170 | 177 | |
---|
171 | 178 | public ObjEditor GetEditor() |
---|
.. | .. |
---|
302 | 309 | //normalLensItem.addActionListener(this); |
---|
303 | 310 | cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
304 | 311 | revertCameraItem.addActionListener(this); |
---|
305 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
306 | | - toggleTimelineItem.addItemListener(this); |
---|
| 312 | + |
---|
307 | 313 | cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
308 | 314 | toggleFullScreenItem.addItemListener(this); |
---|
309 | 315 | toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
310 | 316 | cameraMenu.add("-"); |
---|
| 317 | + |
---|
311 | 318 | cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
312 | 319 | toggleTextureItem.addItemListener(this); |
---|
313 | 320 | toggleTextureItem.setState(CameraPane.textureon); |
---|
314 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
315 | | - toggleLiveItem.addItemListener(this); |
---|
316 | | - toggleLiveItem.setState(Globals.isLIVE()); |
---|
317 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
318 | | - stepItem.addActionListener(this); |
---|
319 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
320 | | -// toggleDLItem.addItemListener(this); |
---|
321 | | -// toggleDLItem.setState(false); |
---|
322 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
323 | | - toggleRenderItem.addItemListener(this); |
---|
324 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
325 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
326 | | - toggleDebugItem.addItemListener(this); |
---|
327 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
328 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
329 | | - toggleFrustumItem.addItemListener(this); |
---|
330 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
331 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
332 | | - toggleFootContactItem.addItemListener(this); |
---|
333 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
334 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
335 | | - toggleRandomItem.addItemListener(this); |
---|
336 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
| 321 | + |
---|
| 322 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 323 | + toggleSwitchItem.addItemListener(this); |
---|
| 324 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 325 | + |
---|
337 | 326 | cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
338 | 327 | toggleHandleItem.addItemListener(this); |
---|
339 | 328 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 329 | + |
---|
340 | 330 | cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
341 | 331 | togglePaintItem.addItemListener(this); |
---|
342 | 332 | togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 333 | + |
---|
| 334 | + if (Globals.ADVANCED) |
---|
| 335 | + { |
---|
| 336 | + cameraMenu.add("-"); |
---|
| 337 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 338 | + toggleLiveItem.addItemListener(this); |
---|
| 339 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
| 340 | + |
---|
| 341 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 342 | + stepItem.addActionListener(this); |
---|
| 343 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 344 | + // toggleDLItem.addItemListener(this); |
---|
| 345 | + // toggleDLItem.setState(false); |
---|
| 346 | + |
---|
| 347 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 348 | + toggleRenderItem.addItemListener(this); |
---|
| 349 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 350 | + |
---|
| 351 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 352 | + toggleDebugItem.addItemListener(this); |
---|
| 353 | + toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 354 | + |
---|
| 355 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 356 | + toggleFrustumItem.addItemListener(this); |
---|
| 357 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 358 | + |
---|
| 359 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 360 | + toggleFootContactItem.addItemListener(this); |
---|
| 361 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 362 | + |
---|
| 363 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 364 | + toggleTimelineItem.addItemListener(this); |
---|
| 365 | + } |
---|
| 366 | + |
---|
343 | 367 | // cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
344 | 368 | // toggleRootItem.addItemListener(this); |
---|
345 | 369 | // toggleRootItem.setState(false); |
---|
.. | .. |
---|
353 | 377 | objectPanel = new JTabbedPane(); |
---|
354 | 378 | toolbarPanel = new JPanel(); |
---|
355 | 379 | toolbarPanel.setName("Toolbar"); |
---|
356 | | - treePanel = new JPanel(); |
---|
| 380 | + treePanel = new cGridBag(); |
---|
357 | 381 | treePanel.setName("Tree"); |
---|
358 | | - ctrlPanel = new cGridBag(); // new GridBagLayout()); |
---|
| 382 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
359 | 383 | ctrlPanel.setName("Edit"); |
---|
360 | 384 | materialPanel = new cGridBag().setVertical(true); |
---|
361 | 385 | materialPanel.setName("Material"); |
---|
362 | 386 | /*JTextPane*/ |
---|
363 | 387 | infoarea = createTextPane(); |
---|
| 388 | + doc = infoarea.getStyledDocument(); |
---|
| 389 | + |
---|
364 | 390 | infoarea.setEditable(true); |
---|
365 | 391 | SetText(); |
---|
366 | 392 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
367 | 393 | // infoarea.setOpaque(false); |
---|
368 | 394 | // //infoarea.setForeground(textcolor); |
---|
369 | | - infoarea.setLineWrap(true); |
---|
370 | | - infoarea.setWrapStyleWord(true); |
---|
| 395 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 396 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
371 | 397 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
372 | 398 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
373 | 399 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
378 | 404 | mainPanel.setName("Main"); |
---|
379 | 405 | mainPanel.setContinuousLayout(true); |
---|
380 | 406 | mainPanel.setOneTouchExpandable(true); |
---|
381 | | - mainPanel.setDividerLocation(1.0); |
---|
382 | 407 | mainPanel.setDividerSize(9); |
---|
383 | | - mainPanel.setResizeWeight(0); |
---|
| 408 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 409 | + mainPanel.setResizeWeight(0.5); |
---|
384 | 410 | |
---|
385 | 411 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
386 | 412 | //mainPanel.setLayout(new GridBagLayout()); |
---|
387 | 413 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
388 | | - treePanel.setLayout(new GridBagLayout()); |
---|
389 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 414 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 415 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
390 | 416 | //materialPanel.setLayout(new GridBagLayout()); |
---|
391 | 417 | |
---|
392 | 418 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
.. | .. |
---|
426 | 452 | static String newline = "\n"; |
---|
427 | 453 | protected static final String buttonString = "JButton"; |
---|
428 | 454 | StyledDocument doc; |
---|
429 | | - JTextArea infoarea; |
---|
| 455 | + JTextPane infoarea; |
---|
430 | 456 | |
---|
431 | 457 | void ClearInfo() |
---|
432 | 458 | { |
---|
.. | .. |
---|
493 | 519 | } |
---|
494 | 520 | |
---|
495 | 521 | if (full) |
---|
496 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 522 | + { |
---|
| 523 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 524 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 525 | + } |
---|
497 | 526 | |
---|
498 | 527 | if (sel.bRep != null) |
---|
499 | 528 | { |
---|
.. | .. |
---|
591 | 620 | { |
---|
592 | 621 | CameraPane.pointflow = (PointFlow) sel; |
---|
593 | 622 | } |
---|
| 623 | + |
---|
| 624 | + si.SendInfo("_____________________", "regular"); |
---|
| 625 | + si.SendInfo("", "regular"); |
---|
594 | 626 | } |
---|
595 | 627 | } |
---|
596 | 628 | |
---|
.. | .. |
---|
622 | 654 | cameraView.ToggleFullScreen(); |
---|
623 | 655 | } |
---|
624 | 656 | |
---|
625 | | - private JTextArea createTextPane() |
---|
| 657 | + private JTextPane createTextPane() |
---|
626 | 658 | { |
---|
627 | | - String[] initString = |
---|
628 | | - { |
---|
629 | | - "This is an editable JTextPane, ", //regular |
---|
630 | | - "another ", //italic |
---|
631 | | - "styled ", //bold |
---|
632 | | - "text ", //small |
---|
633 | | - "component, ", //large |
---|
634 | | - "which supports embedded components..." + newline,//regular |
---|
635 | | - " " + newline, //button |
---|
636 | | - "...and embedded icons..." + newline, //regular |
---|
637 | | - " ", //icon |
---|
638 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
639 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
640 | | - + "cover methods for interacting with those objects." |
---|
641 | | - }; |
---|
| 659 | +// TEXTAREA String[] initString = |
---|
| 660 | +// { |
---|
| 661 | +// "This is an editable JTextPane, ", //regular |
---|
| 662 | +// "another ", //italic |
---|
| 663 | +// "styled ", //bold |
---|
| 664 | +// "text ", //small |
---|
| 665 | +// "component, ", //large |
---|
| 666 | +// "which supports embedded components..." + newline,//regular |
---|
| 667 | +// " " + newline, //button |
---|
| 668 | +// "...and embedded icons..." + newline, //regular |
---|
| 669 | +// " ", //icon |
---|
| 670 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 671 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 672 | +// + "cover methods for interacting with those objects." |
---|
| 673 | +// }; |
---|
| 674 | +// |
---|
| 675 | +// String[] initStyles = |
---|
| 676 | +// { |
---|
| 677 | +// "regular", "italic", "bold", "small", "large", |
---|
| 678 | +// "regular", "button", "regular", "icon", |
---|
| 679 | +// "regular" |
---|
| 680 | +// }; |
---|
| 681 | +// |
---|
| 682 | +// JTextPane textPane = new JTextPane(); |
---|
| 683 | +// textPane.setEditable(true); |
---|
| 684 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 685 | +// addStylesToDocument(doc); |
---|
| 686 | +// |
---|
| 687 | +// try |
---|
| 688 | +// { |
---|
| 689 | +// for (int j = 0; j < 2; j++) |
---|
| 690 | +// { |
---|
| 691 | +// for (int i = 0; i < initString.length; i++) |
---|
| 692 | +// { |
---|
| 693 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 694 | +// doc.getStyle(initStyles[i])); |
---|
| 695 | +// } |
---|
| 696 | +// } |
---|
| 697 | +// } catch (BadLocationException ble) |
---|
| 698 | +// { |
---|
| 699 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 700 | +// } |
---|
642 | 701 | |
---|
643 | | - String[] initStyles = |
---|
644 | | - { |
---|
645 | | - "regular", "italic", "bold", "small", "large", |
---|
646 | | - "regular", "button", "regular", "icon", |
---|
647 | | - "regular" |
---|
648 | | - }; |
---|
649 | | - |
---|
650 | | - JTextPane textPane = new JTextPane(); |
---|
651 | | - textPane.setEditable(true); |
---|
652 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
653 | | - addStylesToDocument(doc); |
---|
654 | | - |
---|
655 | | - try |
---|
656 | | - { |
---|
657 | | - for (int j = 0; j < 2; j++) |
---|
658 | | - { |
---|
659 | | - for (int i = 0; i < initString.length; i++) |
---|
660 | | - { |
---|
661 | | - doc.insertString(doc.getLength(), initString[i], |
---|
662 | | - doc.getStyle(initStyles[i])); |
---|
663 | | - } |
---|
664 | | - } |
---|
665 | | - } catch (BadLocationException ble) |
---|
666 | | - { |
---|
667 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
668 | | - } |
---|
669 | | - |
---|
670 | | - return new JTextArea(); // textPane; |
---|
| 702 | + return new JTextPane(); // textPane; |
---|
671 | 703 | } |
---|
672 | 704 | |
---|
673 | 705 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
767 | 799 | JButton slowerButton; |
---|
768 | 800 | JButton fasterButton; |
---|
769 | 801 | JButton remarkButton; |
---|
| 802 | + |
---|
| 803 | + cGridBag namePanel; |
---|
| 804 | + cGridBag setupPanel; |
---|
| 805 | + cGridBag commandsPanel; |
---|
| 806 | + cGridBag pushPanel; |
---|
| 807 | + cGridBag fillPanel; |
---|
770 | 808 | |
---|
771 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 809 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
772 | 810 | { |
---|
773 | 811 | JCheckBox cb; |
---|
774 | 812 | |
---|
775 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
776 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
777 | | -// oe.aConstraints.weightx = 1; |
---|
778 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
779 | | - oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 813 | + panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
780 | 814 | cb.addItemListener(this); |
---|
781 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
782 | | - oe.aConstraints.gridwidth = 1; |
---|
783 | | - oe.aConstraints.gridx += 1; |
---|
784 | 815 | |
---|
785 | 816 | return cb; |
---|
786 | 817 | } |
---|
787 | 818 | |
---|
788 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 819 | + cButton AddButton(cGridBag panel, String label) |
---|
789 | 820 | { |
---|
790 | 821 | cButton cb; |
---|
791 | 822 | |
---|
792 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
793 | | - oe.aConstraints.gridwidth = 1; |
---|
794 | | -// oe.aConstraints.weightx = 1; |
---|
795 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
796 | | - oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
| 823 | + panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
797 | 824 | cb.addActionListener(this); |
---|
798 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
799 | | - oe.aConstraints.gridwidth = 1; |
---|
800 | | - oe.aConstraints.gridx += 1; |
---|
801 | 825 | |
---|
802 | 826 | return cb; |
---|
803 | 827 | } |
---|
804 | 828 | |
---|
805 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 829 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
806 | 830 | { |
---|
807 | 831 | JComboBox combo; |
---|
808 | 832 | |
---|
809 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
810 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
811 | | - oe.aConstraints.gridx += 1; |
---|
| 833 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
812 | 834 | combo.addActionListener(this); |
---|
813 | 835 | |
---|
814 | 836 | return combo; |
---|
815 | 837 | } |
---|
816 | 838 | |
---|
817 | | - cNumberSlider AddSlider(cGridBag ctrlPanel, String label, double min, double max, double current, double pow) |
---|
| 839 | + cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow) |
---|
818 | 840 | { |
---|
819 | 841 | cGridBag control = new cGridBag(); |
---|
820 | 842 | |
---|
.. | .. |
---|
826 | 848 | control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
827 | 849 | combo.setFloat(current); |
---|
828 | 850 | |
---|
829 | | - ctrlPanel.add(control); |
---|
| 851 | + panel.add(control); |
---|
830 | 852 | |
---|
831 | | - return combo; |
---|
| 853 | + return control; |
---|
832 | 854 | } |
---|
833 | 855 | |
---|
834 | | - cNumberSlider AddSlider(cGridBag ctrlPanel, String label, int min, int max, int current) |
---|
| 856 | + cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current) |
---|
835 | 857 | { |
---|
836 | 858 | cGridBag control = new cGridBag(); |
---|
837 | 859 | |
---|
.. | .. |
---|
839 | 861 | |
---|
840 | 862 | JLabel jlabel = new JLabel(label); |
---|
841 | 863 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
842 | | - ctrlPanel.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
843 | | - ctrlPanel.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 864 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 865 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
844 | 866 | combo.setInteger(current); |
---|
845 | 867 | |
---|
846 | | - ctrlPanel.add(control); |
---|
| 868 | + panel.add(control); |
---|
847 | 869 | |
---|
848 | | - return combo; |
---|
| 870 | + return control; |
---|
849 | 871 | } |
---|
850 | 872 | |
---|
851 | 873 | JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
852 | 874 | { |
---|
853 | 875 | JTextArea text; |
---|
854 | 876 | |
---|
855 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
856 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
857 | 877 | ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
858 | 878 | text.addCaretListener(this); |
---|
859 | | - aConstraints.gridx += 1; |
---|
860 | | - aConstraints.gridwidth = 1; |
---|
861 | 879 | |
---|
862 | 880 | return text; |
---|
863 | 881 | } |
---|
.. | .. |
---|
896 | 914 | |
---|
897 | 915 | /* |
---|
898 | 916 | */ |
---|
899 | | - void Return() // ObjEditor oe) |
---|
| 917 | + void Return0() // ObjEditor oe) |
---|
900 | 918 | { |
---|
901 | 919 | aConstraints.gridy += 1; |
---|
902 | 920 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
951 | 969 | |
---|
952 | 970 | void SetupUI2(ObjEditor oe) |
---|
953 | 971 | { |
---|
954 | | -// oe.aConstraints.weightx = 0; |
---|
955 | | -// oe.aConstraints.weighty = 0; |
---|
956 | | -// oe.aConstraints.gridx = 0; |
---|
957 | | -// oe.aConstraints.gridy = 0; |
---|
958 | | - SetupName(oe); |
---|
| 972 | + //SetupName(oe); |
---|
| 973 | + |
---|
| 974 | + namePanel = new cGridBag(); |
---|
| 975 | + |
---|
| 976 | + nameField = AddText(namePanel, copy.GetName()); |
---|
| 977 | + namePanel.add(nameField); |
---|
| 978 | + oe.ctrlPanel.add(namePanel); |
---|
| 979 | + |
---|
| 980 | + oe.ctrlPanel.Return(); |
---|
959 | 981 | |
---|
960 | 982 | if (!GroupEditor.allparams) |
---|
961 | 983 | return; |
---|
962 | 984 | |
---|
963 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
964 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
965 | | - hideCB = AddCheckBox(oe, "Hide", copy.hide); |
---|
| 985 | + setupPanel = new cGridBag().setVertical(false); |
---|
| 986 | + |
---|
| 987 | + liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
| 988 | + liveCB.setToolTipText("Animate object"); |
---|
| 989 | + hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 990 | + hideCB.setToolTipText("Hide object"); |
---|
966 | 991 | // Return(); |
---|
967 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
968 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
969 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
970 | | - Return(); |
---|
971 | | - resetButton = AddButton(oe, "Reset"); |
---|
972 | | - stepButton = AddButton(oe, "Step"); |
---|
| 992 | + markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
| 993 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 994 | + |
---|
| 995 | + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 996 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 997 | + |
---|
| 998 | + randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
| 999 | + randomCB.setToolTipText("Option for switch node"); |
---|
| 1000 | + |
---|
| 1001 | + if (Globals.ADVANCED) |
---|
| 1002 | + { |
---|
| 1003 | + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 1004 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1005 | + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1006 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 1007 | + } |
---|
| 1008 | + |
---|
| 1009 | + oe.ctrlPanel.add(setupPanel); |
---|
| 1010 | + oe.ctrlPanel.Return(); |
---|
| 1011 | + |
---|
| 1012 | + commandsPanel = new cGridBag().setVertical(false); |
---|
| 1013 | + |
---|
| 1014 | + resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1015 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
| 1016 | + stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1017 | + stepButton.setToolTipText("Step one frame"); |
---|
973 | 1018 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
974 | 1019 | // stepAllButton = AddButton(oe, "Step All"); |
---|
975 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
976 | 1020 | // Return(); |
---|
977 | | - slowerButton = AddButton(oe, "Slow"); |
---|
978 | | - fasterButton = AddButton(oe, "Fast"); |
---|
979 | | - remarkButton = AddButton(oe, "Rem"); |
---|
| 1021 | + slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1022 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
| 1023 | + fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1024 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
| 1025 | + remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1026 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
980 | 1027 | |
---|
981 | | - //Return(); |
---|
| 1028 | + oe.ctrlPanel.add(commandsPanel); |
---|
| 1029 | + oe.ctrlPanel.Return(); |
---|
982 | 1030 | |
---|
983 | | - //normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
---|
| 1031 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1032 | + normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
984 | 1033 | //Return(); |
---|
| 1034 | + |
---|
| 1035 | + oe.ctrlPanel.Return(); |
---|
985 | 1036 | |
---|
986 | 1037 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
987 | 1038 | // ObjEditor.aConstraints.gridx += 1; |
---|
.. | .. |
---|
1076 | 1127 | oe.aConstraints.gridwidth = 1; |
---|
1077 | 1128 | /**/ |
---|
1078 | 1129 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1079 | | - Return(); |
---|
| 1130 | + oe.ctrlPanel.Return(); |
---|
1080 | 1131 | |
---|
1081 | 1132 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1082 | 1133 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1253 | 1304 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1254 | 1305 | //tmp.setName("Edit"); |
---|
1255 | 1306 | objectPanel.add(materialPanel); |
---|
1256 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1257 | | - north.setName("Edit"); |
---|
1258 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1259 | | - objectPanel.add(north); |
---|
| 1307 | +// JPanel north = new JPanel(new BorderLayout()); |
---|
| 1308 | +// north.setName("Edit"); |
---|
| 1309 | +// north.add(ctrlPanel, BorderLayout.NORTH); |
---|
| 1310 | +// objectPanel.add(north); |
---|
| 1311 | + objectPanel.add(ctrlPanel); |
---|
1260 | 1312 | objectPanel.add(infoPanel); |
---|
1261 | 1313 | |
---|
1262 | 1314 | /* |
---|
.. | .. |
---|
1278 | 1330 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1279 | 1331 | |
---|
1280 | 1332 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1281 | | - scenePanel.preferredWidth = 7; |
---|
| 1333 | + scenePanel.preferredWidth = 6; |
---|
1282 | 1334 | |
---|
1283 | 1335 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1284 | 1336 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1384 | 1436 | |
---|
1385 | 1437 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1386 | 1438 | |
---|
1387 | | - frame.setSize(1024, 768); |
---|
1388 | | - frame.show(); |
---|
| 1439 | + frame.setSize(1280, 860); |
---|
| 1440 | + frame.setVisible(true); |
---|
1389 | 1441 | |
---|
1390 | 1442 | gridPanel.setDividerLocation(1.0); |
---|
1391 | 1443 | |
---|
.. | .. |
---|
1415 | 1467 | ctrlPanel.removeAll(); |
---|
1416 | 1468 | } |
---|
1417 | 1469 | |
---|
1418 | | - void SetupMaterial(cGridBag ctrlPanel) |
---|
| 1470 | + void SetupMaterial(cGridBag panel) |
---|
1419 | 1471 | { |
---|
1420 | 1472 | /* |
---|
1421 | 1473 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
.. | .. |
---|
1424 | 1476 | |
---|
1425 | 1477 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1426 | 1478 | |
---|
1427 | | - editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints); |
---|
| 1479 | + editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1480 | + createMaterialButton.setToolTipText("Create material"); |
---|
1428 | 1481 | |
---|
1429 | 1482 | /* |
---|
1430 | 1483 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1431 | 1484 | */ |
---|
1432 | 1485 | |
---|
1433 | | - editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints); |
---|
1434 | | - editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints); |
---|
1435 | | - editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1436 | | - editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1486 | + editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1487 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1488 | + |
---|
| 1489 | + if (Globals.ADVANCED) |
---|
| 1490 | + { |
---|
| 1491 | + editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1492 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
| 1493 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1494 | + } |
---|
1437 | 1495 | |
---|
1438 | | - ctrlPanel.add(editBar); |
---|
| 1496 | + editBar.preferredHeight = 15; |
---|
| 1497 | + |
---|
| 1498 | + panel.add(editBar); |
---|
1439 | 1499 | |
---|
1440 | 1500 | /**/ |
---|
1441 | 1501 | //aConstraints.weighty = 0; |
---|
.. | .. |
---|
1484 | 1544 | shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1485 | 1545 | colorSection.add(shadowbias); |
---|
1486 | 1546 | |
---|
1487 | | - ctrlPanel.add(new JSeparator()); |
---|
| 1547 | + panel.add(new JSeparator()); |
---|
1488 | 1548 | |
---|
1489 | | - ctrlPanel.add(colorSection); |
---|
| 1549 | + panel.add(colorSection); |
---|
1490 | 1550 | |
---|
1491 | 1551 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1492 | 1552 | |
---|
.. | .. |
---|
1534 | 1594 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1535 | 1595 | diffuseSection.add(fakedepth); |
---|
1536 | 1596 | |
---|
1537 | | - ctrlPanel.add(new JSeparator()); |
---|
| 1597 | + panel.add(new JSeparator()); |
---|
1538 | 1598 | |
---|
1539 | | - ctrlPanel.add(diffuseSection); |
---|
| 1599 | + panel.add(diffuseSection); |
---|
1540 | 1600 | |
---|
1541 | 1601 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1542 | 1602 | |
---|
.. | .. |
---|
1572 | 1632 | velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1573 | 1633 | specularSection.add(velvet); |
---|
1574 | 1634 | |
---|
1575 | | - shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
| 1635 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
1576 | 1636 | //Return(); |
---|
1577 | 1637 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1578 | 1638 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
.. | .. |
---|
1585 | 1645 | // aConstraints.gridwidth = 1; |
---|
1586 | 1646 | |
---|
1587 | 1647 | |
---|
1588 | | - ctrlPanel.add(new JSeparator()); |
---|
| 1648 | + panel.add(new JSeparator()); |
---|
1589 | 1649 | |
---|
1590 | | - ctrlPanel.add(specularSection); |
---|
| 1650 | + panel.add(specularSection); |
---|
1591 | 1651 | |
---|
1592 | 1652 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1593 | 1653 | |
---|
.. | .. |
---|
1617 | 1677 | opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1618 | 1678 | globalSection.add(opacity); |
---|
1619 | 1679 | |
---|
1620 | | - ctrlPanel.add(new JSeparator()); |
---|
| 1680 | + panel.add(new JSeparator()); |
---|
1621 | 1681 | |
---|
1622 | | - ctrlPanel.add(globalSection); |
---|
| 1682 | + panel.add(globalSection); |
---|
1623 | 1683 | |
---|
1624 | 1684 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1625 | 1685 | |
---|
.. | .. |
---|
1661 | 1721 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1662 | 1722 | textureSection.add(opacityPower); |
---|
1663 | 1723 | |
---|
1664 | | - ctrlPanel.add(new JSeparator()); |
---|
| 1724 | + panel.add(new JSeparator()); |
---|
1665 | 1725 | |
---|
1666 | | - ctrlPanel.add(textureSection); |
---|
| 1726 | + panel.add(textureSection); |
---|
1667 | 1727 | |
---|
1668 | 1728 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1669 | 1729 | |
---|
.. | .. |
---|
1700 | 1760 | opacityPowerField.addChangeListener(this); |
---|
1701 | 1761 | /**/ |
---|
1702 | 1762 | |
---|
1703 | | - resetSlidersButton.addActionListener(this); |
---|
1704 | 1763 | clearMaterialButton.addActionListener(this); |
---|
1705 | 1764 | createMaterialButton.addActionListener(this); |
---|
1706 | | - |
---|
1707 | | - propagateToggle.addItemListener(this); |
---|
1708 | | - multiplyToggle.addItemListener(this); |
---|
| 1765 | + |
---|
| 1766 | + if (Globals.ADVANCED) |
---|
| 1767 | + { |
---|
| 1768 | + resetSlidersButton.addActionListener(this); |
---|
| 1769 | + propagateToggle.addItemListener(this); |
---|
| 1770 | + multiplyToggle.addItemListener(this); |
---|
| 1771 | + } |
---|
1709 | 1772 | } |
---|
1710 | 1773 | |
---|
1711 | 1774 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
1876 | 1939 | |
---|
1877 | 1940 | //? flashIt = false; |
---|
1878 | 1941 | CameraPane pane = (CameraPane) cameraView; |
---|
1879 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1942 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1880 | 1943 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1881 | 1944 | |
---|
1882 | 1945 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2337 | 2400 | { |
---|
2338 | 2401 | /**/ |
---|
2339 | 2402 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2340 | | - browser.show(); |
---|
| 2403 | + browser.setVisible(true); |
---|
2341 | 2404 | String filename = browser.getFile(); |
---|
2342 | 2405 | if (filename != null && filename.length() > 0) |
---|
2343 | 2406 | { |
---|
.. | .. |
---|
2482 | 2545 | } |
---|
2483 | 2546 | if (input == null) |
---|
2484 | 2547 | { |
---|
| 2548 | + new Exception().printStackTrace(); |
---|
2485 | 2549 | System.exit(0); |
---|
2486 | 2550 | } |
---|
2487 | 2551 | |
---|
.. | .. |
---|
2696 | 2760 | return; |
---|
2697 | 2761 | } |
---|
2698 | 2762 | |
---|
2699 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2763 | + if (multiplyToggle != null) |
---|
| 2764 | + multiplyToggle.setSelected(mat.multiply); |
---|
2700 | 2765 | |
---|
2701 | 2766 | assert (object.projectedVertices != null); |
---|
2702 | 2767 | |
---|
.. | .. |
---|
2911 | 2976 | frame.validate(); |
---|
2912 | 2977 | |
---|
2913 | 2978 | return; |
---|
2914 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 2979 | + } else if (event.getSource() == toggleSwitchItem) |
---|
2915 | 2980 | { |
---|
2916 | 2981 | cameraView.ToggleRandom(); |
---|
2917 | 2982 | cameraView.repaint(); |
---|
.. | .. |
---|
2956 | 3021 | if (event.getSource() == randomCB) |
---|
2957 | 3022 | { |
---|
2958 | 3023 | copy.random ^= true; |
---|
| 3024 | + objEditor.refreshContents(); |
---|
2959 | 3025 | return; |
---|
2960 | 3026 | } |
---|
2961 | 3027 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3179 | 3245 | if (!Globals.ANIMATION) |
---|
3180 | 3246 | { |
---|
3181 | 3247 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3182 | | - browser.show(); |
---|
| 3248 | + browser.setVisible(true); |
---|
3183 | 3249 | String filename = browser.getFile(); |
---|
3184 | 3250 | if (filename != null && filename.length() > 0) |
---|
3185 | 3251 | { |
---|
.. | .. |
---|
3240 | 3306 | void CreateMaterial() |
---|
3241 | 3307 | { |
---|
3242 | 3308 | //copy.ClearMaterial(); // PATCH |
---|
3243 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3309 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3244 | 3310 | if (copy.selection.size() > 0) |
---|
3245 | 3311 | //SetMaterial(copy); |
---|
3246 | 3312 | { |
---|
.. | .. |
---|
3299 | 3365 | { |
---|
3300 | 3366 | copy.ResetBlockLoop(); // temporary problem |
---|
3301 | 3367 | |
---|
3302 | | - boolean random = CameraPane.RANDOM; |
---|
3303 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3368 | + boolean random = CameraPane.SWITCH; |
---|
| 3369 | + CameraPane.SWITCH = false; // parse everything |
---|
3304 | 3370 | copy.ResetDisplayList(); |
---|
3305 | 3371 | copy.HardTouch(); |
---|
3306 | | - CameraPane.RANDOM = random; |
---|
| 3372 | + CameraPane.SWITCH = random; |
---|
3307 | 3373 | } |
---|
3308 | 3374 | |
---|
3309 | 3375 | // public void applySelf() |
---|
.. | .. |
---|
3377 | 3443 | { |
---|
3378 | 3444 | //System.out.println("Propagate = " + propagate); |
---|
3379 | 3445 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3446 | + |
---|
| 3447 | + if (copy.material != null) |
---|
| 3448 | + { |
---|
| 3449 | + cMaterial mat = copy.material; |
---|
| 3450 | + |
---|
| 3451 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3452 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3453 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3454 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3455 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3456 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3457 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3458 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3459 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3460 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3461 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3462 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3463 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3464 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3465 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3466 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3467 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3468 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3469 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3470 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3471 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3472 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3473 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3474 | + } |
---|
| 3475 | + |
---|
3380 | 3476 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3381 | 3477 | { |
---|
3382 | 3478 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3421 | 3517 | || e.getSource() == apertureField |
---|
3422 | 3518 | || e.getSource() == shadowblurField) |
---|
3423 | 3519 | { |
---|
| 3520 | + new Exception().printStackTrace(); |
---|
3424 | 3521 | System.exit(0); |
---|
3425 | 3522 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3426 | 3523 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
4392 | 4489 | //MenuItem normalLensItem; |
---|
4393 | 4490 | MenuItem editCameraItem; |
---|
4394 | 4491 | MenuItem revertCameraItem; |
---|
4395 | | - CheckboxMenuItem toggleLiveItem; |
---|
4396 | 4492 | MenuItem stepItem; |
---|
| 4493 | + CheckboxMenuItem toggleLiveItem; |
---|
4397 | 4494 | CheckboxMenuItem toggleFullScreenItem; |
---|
4398 | 4495 | CheckboxMenuItem toggleTimelineItem; |
---|
4399 | 4496 | CheckboxMenuItem toggleRenderItem; |
---|
.. | .. |
---|
4402 | 4499 | CheckboxMenuItem toggleFootContactItem; |
---|
4403 | 4500 | CheckboxMenuItem toggleDLItem; |
---|
4404 | 4501 | CheckboxMenuItem toggleTextureItem; |
---|
4405 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4502 | + CheckboxMenuItem toggleSwitchItem; |
---|
4406 | 4503 | CheckboxMenuItem toggleRootItem; |
---|
4407 | 4504 | CheckboxMenuItem animationItem; |
---|
4408 | 4505 | CheckboxMenuItem toggleHandleItem; |
---|
.. | .. |
---|
4410 | 4507 | JSplitPane mainPanel; |
---|
4411 | 4508 | JScrollPane scrollpane; |
---|
4412 | 4509 | JPanel toolbarPanel; |
---|
4413 | | - JPanel treePanel; |
---|
| 4510 | + cGridBag treePanel; |
---|
4414 | 4511 | JPanel radioPanel; |
---|
4415 | 4512 | ButtonGroup buttonGroup; |
---|
4416 | 4513 | cGridBag ctrlPanel; |
---|