.. | .. |
---|
359 | 359 | refreshContents(); |
---|
360 | 360 | } |
---|
361 | 361 | |
---|
| 362 | + public void Show3DView() |
---|
| 363 | + { |
---|
| 364 | + // bug |
---|
| 365 | + //gridPanel.setDividerLocation(1.0); |
---|
| 366 | + //bigPanel.setDividerLocation(0.0); |
---|
| 367 | + bigThree.ClearUI(); |
---|
| 368 | + bigThree.add(centralPanel); |
---|
| 369 | + bigThree.FlushUI(); |
---|
| 370 | + } |
---|
| 371 | + |
---|
362 | 372 | //ObjEditor objEditor; |
---|
363 | 373 | public void closeUI2() |
---|
364 | 374 | { |
---|
.. | .. |
---|
984 | 994 | //new Exception().printStackTrace(); |
---|
985 | 995 | |
---|
986 | 996 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
987 | | - oe.aConstraints.weightx = 1; |
---|
988 | | - oe.aConstraints.weighty = 0; |
---|
989 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
990 | | - oe.aConstraints.gridwidth = 100; |
---|
991 | | - oe.aConstraints.gridheight = 1; |
---|
992 | 997 | // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
993 | 998 | |
---|
994 | 999 | oe.buttonGroup = new ButtonGroup(); |
---|
.. | .. |
---|
1025 | 1030 | maxButton.setToolTipText("Maximize window"); |
---|
1026 | 1031 | maxButton.addActionListener(this); |
---|
1027 | 1032 | } |
---|
| 1033 | + |
---|
| 1034 | + cButton gcButton; |
---|
| 1035 | + |
---|
| 1036 | + oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1037 | + gcButton.setToolTipText("Garbage collect"); |
---|
| 1038 | + gcButton.addActionListener(new ActionListener() |
---|
| 1039 | + { |
---|
| 1040 | + public void actionPerformed(ActionEvent e) |
---|
| 1041 | + { |
---|
| 1042 | + System.gc(); |
---|
| 1043 | + } |
---|
| 1044 | + }); |
---|
| 1045 | + |
---|
| 1046 | + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1047 | + collapseButton.setToolTipText("Collapse toolbar"); |
---|
| 1048 | + collapseButton.addActionListener(this); |
---|
| 1049 | + |
---|
| 1050 | + oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1051 | + maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
| 1052 | + maximize3DButton.addActionListener(this); |
---|
| 1053 | + |
---|
| 1054 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1055 | + twoButton.setToolTipText("Show 3D view only"); |
---|
| 1056 | + twoButton.addActionListener(this); |
---|
| 1057 | + this.fullscreenLayout = twoButton; |
---|
| 1058 | + |
---|
| 1059 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1060 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1061 | + threeButton.addActionListener(this); |
---|
| 1062 | + if (Globals.ADVANCED) |
---|
| 1063 | + { |
---|
| 1064 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1065 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 1066 | + sixButton.addActionListener(this); |
---|
| 1067 | + } |
---|
| 1068 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1069 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 1070 | +// sevenButton.addActionListener(this); |
---|
| 1071 | + // |
---|
1028 | 1072 | |
---|
1029 | 1073 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1030 | 1074 | fullButton.setToolTipText("Full-screen window"); |
---|
.. | .. |
---|
1069 | 1113 | nextVersionButton.addActionListener(this); |
---|
1070 | 1114 | nextVersionButton.setEnabled(false); |
---|
1071 | 1115 | |
---|
1072 | | - oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
1073 | | - liveCB.setToolTipText("Enable animation"); |
---|
1074 | | - liveCB.addItemListener(this); |
---|
1075 | | - |
---|
1076 | 1116 | oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1077 | 1117 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
1078 | 1118 | oneStepButton.addActionListener(this); |
---|
1079 | 1119 | |
---|
| 1120 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 1121 | + liveCB.setToolTipText("Enable animation"); |
---|
| 1122 | + liveCB.addItemListener(this); |
---|
| 1123 | + |
---|
1080 | 1124 | oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
1081 | 1125 | fastCB.setToolTipText("Fast mode"); |
---|
1082 | 1126 | fastCB.addItemListener(this); |
---|
.. | .. |
---|
1103 | 1147 | |
---|
1104 | 1148 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
1105 | 1149 | |
---|
1106 | | - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1107 | | - twoButton.setToolTipText("Show 3D view only"); |
---|
1108 | | - twoButton.addActionListener(this); |
---|
1109 | | - this.fullscreenLayout = twoButton; |
---|
1110 | | - |
---|
1111 | | - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1112 | | - threeButton.setToolTipText("Show controls and 3D view"); |
---|
1113 | | - threeButton.addActionListener(this); |
---|
1114 | | - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1115 | | - sixButton.setToolTipText("Show 3D view and controls"); |
---|
1116 | | - sixButton.addActionListener(this); |
---|
1117 | | -// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1118 | | -// sevenButton.setToolTipText("3-column layout"); |
---|
1119 | | -// sevenButton.addActionListener(this); |
---|
1120 | | - // |
---|
1121 | 1150 | |
---|
1122 | 1151 | oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1123 | 1152 | rootButton.setToolTipText("Open selection in new tab"); |
---|
.. | .. |
---|
1815 | 1844 | TreePath path; |
---|
1816 | 1845 | |
---|
1817 | 1846 | public TransferableTreePath(TreePath tp) { |
---|
1818 | | - path = tp; |
---|
| 1847 | + Object[] objs = new Object[tp.getPathCount()]; |
---|
| 1848 | + for (int i=0; i<objs.length; i++) |
---|
| 1849 | + { |
---|
| 1850 | + objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID(); |
---|
| 1851 | + } |
---|
| 1852 | + path = new TreePath(objs); |
---|
1819 | 1853 | } |
---|
1820 | 1854 | |
---|
1821 | 1855 | public synchronized DataFlavor[] getTransferDataFlavors() { |
---|
.. | .. |
---|
2708 | 2742 | if (source == fullButton) |
---|
2709 | 2743 | { |
---|
2710 | 2744 | ToggleFullScreen(); |
---|
| 2745 | + } else |
---|
| 2746 | + if (source == collapseButton) |
---|
| 2747 | + { |
---|
| 2748 | + this.expandedLayout = radio.layout; |
---|
| 2749 | + CollapseToolbar(); |
---|
| 2750 | + } else |
---|
| 2751 | + if (source == maximize3DButton) |
---|
| 2752 | + { |
---|
| 2753 | + this.expandedLayout = radio.layout; |
---|
| 2754 | + radio.layout = twoButton; |
---|
| 2755 | + Show3DView(); |
---|
| 2756 | + CollapseToolbar(); |
---|
2711 | 2757 | } else |
---|
2712 | 2758 | if (source == previousVersionButton) |
---|
2713 | 2759 | { |
---|
.. | .. |
---|
3660 | 3706 | if (CameraPane.FULLSCREEN) |
---|
3661 | 3707 | fullscreenLayout = radio.layout; |
---|
3662 | 3708 | |
---|
3663 | | - // bug |
---|
3664 | | - //gridPanel.setDividerLocation(1.0); |
---|
3665 | | - //bigPanel.setDividerLocation(0.0); |
---|
3666 | | -// bigThree.remove(scenePanel); |
---|
3667 | | -// bigThree.remove(centralPanel); |
---|
3668 | | -// bigThree.remove(XYZPanel); |
---|
3669 | | -// aWindowConstraints.gridx = 0; |
---|
3670 | | -// aWindowConstraints.gridy = 0; |
---|
3671 | | -// aWindowConstraints.gridwidth = 1; |
---|
3672 | | -// // aConstraints.gridheight = 3; |
---|
3673 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3674 | | -// aWindowConstraints.weightx = 0; |
---|
3675 | | -// aWindowConstraints.weighty = 1; |
---|
3676 | | -// //bigThree.add(jtp, aWindowConstraints); |
---|
3677 | | -// aWindowConstraints.weightx = 1; |
---|
3678 | | -// aWindowConstraints.gridwidth = 3; |
---|
3679 | | -// // aConstraints.gridheight = 3; |
---|
3680 | | -// aWindowConstraints.gridx = 1; |
---|
3681 | | -// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
3682 | | -// bigThree.add(centralPanel, aWindowConstraints); |
---|
3683 | | -// aWindowConstraints.weightx = 0; |
---|
3684 | | -// aWindowConstraints.gridx = 4; |
---|
3685 | | -// aWindowConstraints.gridwidth = 1; |
---|
3686 | | -// // aConstraints.gridheight = 3; |
---|
3687 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3688 | | -// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
3689 | | -// scenePanel.setVisible(false); |
---|
3690 | | -// centralPanel.setVisible(true); |
---|
3691 | | -// XYZPanel.setVisible(false); |
---|
3692 | | - bigThree.ClearUI(); |
---|
3693 | | - bigThree.add(centralPanel); |
---|
3694 | | - bigThree.FlushUI(); |
---|
| 3709 | + Show3DView(); |
---|
3695 | 3710 | |
---|
3696 | 3711 | cameraView.requestFocusInWindow(); |
---|
3697 | 3712 | |
---|
.. | .. |
---|
5290 | 5305 | Object3D child = (Object3D) group.selection.get(i); |
---|
5291 | 5306 | |
---|
5292 | 5307 | objEditor.AddInfo(child, this, true); |
---|
5293 | | - System.err.println("info : " + child.GetPath()); |
---|
| 5308 | +// System.err.println("info : " + child.GetPath()); |
---|
5294 | 5309 | } |
---|
5295 | 5310 | |
---|
5296 | 5311 | objEditor.SetText(); // jan 2014 |
---|