.. | .. |
---|
16 | 16 | //import buoy.widget.BFileChooser; |
---|
17 | 17 | |
---|
18 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
19 | | - Grafreed.iResourceCallBack, |
---|
| 19 | + Grafreed.iResourceCallBack, |
---|
20 | 20 | ObjectUI, |
---|
21 | 21 | Runnable, |
---|
22 | 22 | ActionListener, |
---|
.. | .. |
---|
42 | 42 | }); |
---|
43 | 43 | } |
---|
44 | 44 | |
---|
| 45 | + public void AddTextureButton(String f, String c, final String t, int count, cGridBag row) |
---|
| 46 | + { |
---|
| 47 | + cButton textureButton; |
---|
| 48 | + final String path = "textures/" + f + "/" + c + "/"; // + t; |
---|
| 49 | + row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); |
---|
| 50 | + textureButton.setToolTipText(c + count); |
---|
| 51 | + textureButton.addActionListener(new ActionListener() |
---|
| 52 | + { |
---|
| 53 | + @Override |
---|
| 54 | + public void actionPerformed(ActionEvent e) |
---|
| 55 | + { |
---|
| 56 | + ChangeTexture(path + t); |
---|
| 57 | + } |
---|
| 58 | + }); |
---|
| 59 | + } |
---|
| 60 | + |
---|
45 | 61 | public void AddSkyboxTab0(JTabbedPane skyboxpanel) |
---|
46 | 62 | { |
---|
47 | 63 | cGridBag tab0 = new cGridBag().setVertical(true); |
---|
.. | .. |
---|
312 | 328 | } |
---|
313 | 329 | } |
---|
314 | 330 | |
---|
315 | | - public void CallBack(String[] path) |
---|
316 | | - { |
---|
317 | | - for (int i = 0; i < path.length; i++) |
---|
318 | | - { |
---|
319 | | - System.out.print(path[i] + "/"); |
---|
320 | | - } |
---|
321 | | - |
---|
322 | | - System.out.println(); |
---|
323 | | - } |
---|
324 | | - |
---|
325 | 331 | public void ChangeSkybox(String skybox) |
---|
326 | 332 | { |
---|
327 | 333 | //cameraView.envyoff = false; |
---|
328 | 334 | group.skyboxname = skybox; |
---|
329 | 335 | group.skyboxext = "jpg"; |
---|
330 | 336 | cameraView.repaint(); |
---|
| 337 | + } |
---|
331 | 338 | |
---|
332 | | - Grafreed.ParseResources("textures", this); |
---|
| 339 | + public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
| 340 | + { |
---|
| 341 | + JTabbedPane skyboxpane = new JTabbedPane(); |
---|
| 342 | + |
---|
| 343 | + AddSkyboxTab0(skyboxpane); |
---|
| 344 | + AddSkyboxTab1(skyboxpane); |
---|
| 345 | + AddSkyboxTab2(skyboxpane); |
---|
| 346 | + AddSkyboxTab3(skyboxpane); |
---|
| 347 | + |
---|
| 348 | + skyboxPanel.add(skyboxpane); |
---|
333 | 349 | } |
---|
334 | 350 | |
---|
| 351 | + public void ChangeTexture(String texture) |
---|
| 352 | + { |
---|
| 353 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 354 | + { |
---|
| 355 | + Object3D obj = group.selection.get(i); |
---|
| 356 | + obj.SetPigmentTexture("@" + texture); |
---|
| 357 | + } |
---|
| 358 | + |
---|
| 359 | + refreshContents(); |
---|
| 360 | + } |
---|
| 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 | + |
---|
335 | 372 | //ObjEditor objEditor; |
---|
336 | 373 | public void closeUI2() |
---|
337 | 374 | { |
---|
.. | .. |
---|
373 | 410 | { |
---|
374 | 411 | copy.versionlist = new Object3D[100]; |
---|
375 | 412 | copy.versionindex = -1; |
---|
| 413 | + |
---|
| 414 | + Save(true); |
---|
376 | 415 | } |
---|
377 | 416 | |
---|
378 | 417 | if(ui) |
---|
.. | .. |
---|
604 | 643 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
605 | 644 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
606 | 645 | //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
607 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
608 | 646 | oe.cameraMenu.add("-"); |
---|
609 | 647 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
610 | 648 | openWindowItem.addActionListener(this); |
---|
611 | | - editLeafItem.addActionListener(this); |
---|
612 | 649 | lookAtItem.addActionListener(this); |
---|
613 | 650 | //lookFromItem.addActinoListener(this); |
---|
614 | 651 | //switchViewItem.addActionListener(this); |
---|
.. | .. |
---|
856 | 893 | shareGeometriesItem.addActionListener(this); |
---|
857 | 894 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
858 | 895 | mergeGeometriesItem.addActionListener(this); |
---|
| 896 | + menu.add("-"); |
---|
| 897 | + editLeafItem = menu.add(new MenuItem("Edit leaf...")); |
---|
| 898 | + editLeafItem.addActionListener(this); |
---|
859 | 899 | if (Globals.ADVANCED) |
---|
860 | 900 | { |
---|
861 | 901 | // Pretty much the same as duplicate and clone. |
---|
.. | .. |
---|
872 | 912 | buildToolsMenu(menu); |
---|
873 | 913 | } |
---|
874 | 914 | |
---|
| 915 | + JTabbedPane resourcecontainer; |
---|
| 916 | + cGridBag currenttab; |
---|
| 917 | + boolean added; // patch for jar |
---|
| 918 | + |
---|
| 919 | + int tabcount = 0; |
---|
| 920 | + int colcount = 0; |
---|
| 921 | + int rowcount = 0; |
---|
| 922 | + int texturecount = 0; |
---|
| 923 | + |
---|
| 924 | + int columns = 5; |
---|
| 925 | + int rows = 7; |
---|
| 926 | + |
---|
| 927 | + public void ResourceCallBack(String[] path) |
---|
| 928 | + { |
---|
| 929 | +// for (int i = 0; i < path.length; i++) |
---|
| 930 | +// System.out.print(path[i] + "/"); |
---|
| 931 | +// System.out.println(); |
---|
| 932 | + |
---|
| 933 | + if (//rowcount == 0 || |
---|
| 934 | + path.length == 1) |
---|
| 935 | + { |
---|
| 936 | + currenttab = new cGridBag(); |
---|
| 937 | + added = false; |
---|
| 938 | + String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
| 939 | + currenttab.setName(tabname); |
---|
| 940 | + rowcount = 1; |
---|
| 941 | + colcount = 0; |
---|
| 942 | + texturecount = 0; |
---|
| 943 | + } |
---|
| 944 | + |
---|
| 945 | + if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
| 946 | + { |
---|
| 947 | + if (!added) |
---|
| 948 | + { |
---|
| 949 | + added = true; |
---|
| 950 | + resourcecontainer.add(currenttab); |
---|
| 951 | + String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
| 952 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 953 | + } |
---|
| 954 | + |
---|
| 955 | + AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
| 956 | + |
---|
| 957 | + if (++colcount >= columns) |
---|
| 958 | + { |
---|
| 959 | + colcount = 0; |
---|
| 960 | + currenttab.Return(); |
---|
| 961 | + |
---|
| 962 | + if (rowcount++ >= rows) |
---|
| 963 | + { |
---|
| 964 | + rowcount = 0; |
---|
| 965 | + } |
---|
| 966 | + } |
---|
| 967 | + } |
---|
| 968 | + else |
---|
| 969 | + { |
---|
| 970 | +// if (!path[path.length-1].equals("icons")) |
---|
| 971 | +// resourcecontainer.Return(); |
---|
| 972 | + } |
---|
| 973 | + } |
---|
| 974 | + |
---|
| 975 | + void CreateTexturePanel(cGridBag container) |
---|
| 976 | + { |
---|
| 977 | + resourcecontainer = new JTabbedPane(JTabbedPane.LEFT); |
---|
| 978 | + container.add(resourcecontainer); |
---|
| 979 | + |
---|
| 980 | + Grafreed.ParseResources("textures", this); |
---|
| 981 | + } |
---|
875 | 982 | |
---|
876 | 983 | void SetupUI2(ObjEditor oe) |
---|
877 | 984 | { |
---|
.. | .. |
---|
890 | 997 | //new Exception().printStackTrace(); |
---|
891 | 998 | |
---|
892 | 999 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
893 | | - oe.aConstraints.weightx = 1; |
---|
894 | | - oe.aConstraints.weighty = 0; |
---|
895 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
896 | | - oe.aConstraints.gridwidth = 100; |
---|
897 | | - oe.aConstraints.gridheight = 1; |
---|
898 | 1000 | // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
899 | 1001 | |
---|
900 | 1002 | oe.buttonGroup = new ButtonGroup(); |
---|
.. | .. |
---|
927 | 1029 | |
---|
928 | 1030 | if (Globals.ADVANCED) |
---|
929 | 1031 | { |
---|
930 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
931 | | - maxButton.setToolTipText("Maximize window"); |
---|
932 | | - maxButton.addActionListener(this); |
---|
| 1032 | +// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1033 | +// maxButton.setToolTipText("Maximize window"); |
---|
| 1034 | +// maxButton.addActionListener(this); |
---|
933 | 1035 | } |
---|
| 1036 | + |
---|
| 1037 | +// cButton gcButton; |
---|
| 1038 | +// |
---|
| 1039 | +// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1040 | +// gcButton.setToolTipText("Garbage collect"); |
---|
| 1041 | +// gcButton.addActionListener(new ActionListener() |
---|
| 1042 | +// { |
---|
| 1043 | +// public void actionPerformed(ActionEvent e) |
---|
| 1044 | +// { |
---|
| 1045 | +// System.gc(); |
---|
| 1046 | +// } |
---|
| 1047 | +// }); |
---|
| 1048 | + |
---|
| 1049 | + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1050 | + collapseButton.setToolTipText("Collapse toolbar"); |
---|
| 1051 | + collapseButton.addActionListener(this); |
---|
| 1052 | + |
---|
| 1053 | + oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1054 | + maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
| 1055 | + maximize3DButton.addActionListener(this); |
---|
| 1056 | + |
---|
| 1057 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1058 | + twoButton.setToolTipText("Show 3D view only"); |
---|
| 1059 | + twoButton.addActionListener(this); |
---|
| 1060 | + this.fullscreenLayout = twoButton; |
---|
| 1061 | + |
---|
| 1062 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1063 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1064 | + threeButton.addActionListener(this); |
---|
| 1065 | + if (Globals.ADVANCED) |
---|
| 1066 | + { |
---|
| 1067 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1068 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 1069 | + sixButton.addActionListener(this); |
---|
| 1070 | + } |
---|
| 1071 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1072 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 1073 | +// sevenButton.addActionListener(this); |
---|
| 1074 | + // |
---|
934 | 1075 | |
---|
935 | 1076 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
936 | 1077 | fullButton.setToolTipText("Full-screen window"); |
---|
.. | .. |
---|
975 | 1116 | nextVersionButton.addActionListener(this); |
---|
976 | 1117 | nextVersionButton.setEnabled(false); |
---|
977 | 1118 | |
---|
978 | | - oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
979 | | - liveCB.setToolTipText("Enable animation"); |
---|
980 | | - liveCB.addItemListener(this); |
---|
981 | | - |
---|
982 | 1119 | oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
983 | 1120 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
984 | 1121 | oneStepButton.addActionListener(this); |
---|
985 | 1122 | |
---|
| 1123 | + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 1124 | + liveCB.setToolTipText("Enable animation"); |
---|
| 1125 | + liveCB.addItemListener(this); |
---|
| 1126 | + |
---|
986 | 1127 | oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
987 | 1128 | fastCB.setToolTipText("Fast mode"); |
---|
988 | 1129 | fastCB.addItemListener(this); |
---|
.. | .. |
---|
1009 | 1150 | |
---|
1010 | 1151 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
1011 | 1152 | |
---|
1012 | | - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1013 | | - twoButton.setToolTipText("Show 3D view only"); |
---|
1014 | | - twoButton.addActionListener(this); |
---|
1015 | | - this.fullscreenLayout = twoButton; |
---|
1016 | | - |
---|
1017 | | - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1018 | | - threeButton.setToolTipText("Show controls and 3D view"); |
---|
1019 | | - threeButton.addActionListener(this); |
---|
1020 | | - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1021 | | - sixButton.setToolTipText("Show 3D view and controls"); |
---|
1022 | | - sixButton.addActionListener(this); |
---|
1023 | | -// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1024 | | -// sevenButton.setToolTipText("3-column layout"); |
---|
1025 | | -// sevenButton.addActionListener(this); |
---|
1026 | | - // |
---|
1027 | 1153 | |
---|
1028 | 1154 | oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1029 | 1155 | rootButton.setToolTipText("Open selection in new tab"); |
---|
.. | .. |
---|
1039 | 1165 | |
---|
1040 | 1166 | // INSERT |
---|
1041 | 1167 | row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1042 | | - gridButton.setToolTipText("Create grid"); |
---|
| 1168 | + gridButton.setToolTipText("Create ground"); |
---|
1043 | 1169 | gridButton.addActionListener(this); |
---|
1044 | 1170 | |
---|
1045 | 1171 | row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1107 | 1233 | |
---|
1108 | 1234 | oe.toolboxPanel.add(row2); |
---|
1109 | 1235 | |
---|
1110 | | - // ENVYMAPS |
---|
1111 | | - cGridBag skyboxpane = new cGridBag(); |
---|
1112 | | - skyboxpane.preferredHeight = 100; |
---|
| 1236 | + cGridBag textures = new cGridBag(); |
---|
1113 | 1237 | |
---|
1114 | | - oe.skyboxPanel.add(skyboxpane); |
---|
| 1238 | + CreateTexturePanel(textures); |
---|
1115 | 1239 | |
---|
1116 | | - JTabbedPane skyboxpanel = new JTabbedPane(); |
---|
1117 | | - skyboxpane.add(skyboxpanel); |
---|
| 1240 | + oe.toolboxPanel.add(textures); |
---|
1118 | 1241 | |
---|
1119 | | - AddSkyboxTab0(skyboxpanel); |
---|
1120 | | - AddSkyboxTab1(skyboxpanel); |
---|
1121 | | - AddSkyboxTab2(skyboxpanel); |
---|
1122 | | - AddSkyboxTab3(skyboxpanel); |
---|
| 1242 | + textures.preferredHeight = 100; |
---|
| 1243 | + |
---|
| 1244 | + CreateSkyboxPanel(oe.skyboxPanel); |
---|
1123 | 1245 | |
---|
1124 | 1246 | // EDIT panel |
---|
1125 | 1247 | editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1131 | 1253 | uneditButton.addActionListener(this); |
---|
1132 | 1254 | |
---|
1133 | 1255 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1134 | | - allParamsButton.setToolTipText("Show all controle"); |
---|
| 1256 | + allParamsButton.setToolTipText("Show all controls"); |
---|
1135 | 1257 | allParamsButton.addActionListener(this); |
---|
1136 | 1258 | |
---|
1137 | 1259 | editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1138 | | - clearPanelButton.setToolTipText("Clear edit panel"); |
---|
| 1260 | + clearPanelButton.setToolTipText("Clear all controls"); |
---|
1139 | 1261 | clearPanelButton.addActionListener(this); |
---|
1140 | 1262 | |
---|
1141 | 1263 | //editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1335 | 1457 | |
---|
1336 | 1458 | void EditObject(Object3D obj) |
---|
1337 | 1459 | { |
---|
| 1460 | + assert(obj instanceof Composite); |
---|
| 1461 | + |
---|
| 1462 | + if (obj.versionlist == null) |
---|
| 1463 | + { |
---|
| 1464 | + obj.versionlist = new Object3D[100]; |
---|
| 1465 | + obj.versionindex = -1; |
---|
| 1466 | + } |
---|
| 1467 | + |
---|
1338 | 1468 | cRadio radioButton = new cRadio(obj.name); |
---|
1339 | 1469 | |
---|
1340 | 1470 | // June 2019. Patch to avoid bug with transparency. |
---|
.. | .. |
---|
1725 | 1855 | TreePath path; |
---|
1726 | 1856 | |
---|
1727 | 1857 | public TransferableTreePath(TreePath tp) { |
---|
1728 | | - path = tp; |
---|
| 1858 | + Object[] objs = new Object[tp.getPathCount()]; |
---|
| 1859 | + for (int i=0; i<objs.length; i++) |
---|
| 1860 | + { |
---|
| 1861 | + objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID(); |
---|
| 1862 | + } |
---|
| 1863 | + path = new TreePath(objs); |
---|
1729 | 1864 | } |
---|
1730 | 1865 | |
---|
1731 | 1866 | public synchronized DataFlavor[] getTransferDataFlavors() { |
---|
.. | .. |
---|
2618 | 2753 | if (source == fullButton) |
---|
2619 | 2754 | { |
---|
2620 | 2755 | ToggleFullScreen(); |
---|
| 2756 | + } else |
---|
| 2757 | + if (source == collapseButton) |
---|
| 2758 | + { |
---|
| 2759 | + this.expandedLayout = radio.layout; |
---|
| 2760 | + CollapseToolbar(); |
---|
| 2761 | + } else |
---|
| 2762 | + if (source == maximize3DButton) |
---|
| 2763 | + { |
---|
| 2764 | + this.expandedLayout = radio.layout; |
---|
| 2765 | + radio.layout = twoButton; |
---|
| 2766 | + Show3DView(); |
---|
| 2767 | + CollapseToolbar(); |
---|
2621 | 2768 | } else |
---|
2622 | 2769 | if (source == previousVersionButton) |
---|
2623 | 2770 | { |
---|
.. | .. |
---|
3570 | 3717 | if (CameraPane.FULLSCREEN) |
---|
3571 | 3718 | fullscreenLayout = radio.layout; |
---|
3572 | 3719 | |
---|
3573 | | - // bug |
---|
3574 | | - //gridPanel.setDividerLocation(1.0); |
---|
3575 | | - //bigPanel.setDividerLocation(0.0); |
---|
3576 | | -// bigThree.remove(scenePanel); |
---|
3577 | | -// bigThree.remove(centralPanel); |
---|
3578 | | -// bigThree.remove(XYZPanel); |
---|
3579 | | -// aWindowConstraints.gridx = 0; |
---|
3580 | | -// aWindowConstraints.gridy = 0; |
---|
3581 | | -// aWindowConstraints.gridwidth = 1; |
---|
3582 | | -// // aConstraints.gridheight = 3; |
---|
3583 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3584 | | -// aWindowConstraints.weightx = 0; |
---|
3585 | | -// aWindowConstraints.weighty = 1; |
---|
3586 | | -// //bigThree.add(jtp, aWindowConstraints); |
---|
3587 | | -// aWindowConstraints.weightx = 1; |
---|
3588 | | -// aWindowConstraints.gridwidth = 3; |
---|
3589 | | -// // aConstraints.gridheight = 3; |
---|
3590 | | -// aWindowConstraints.gridx = 1; |
---|
3591 | | -// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
3592 | | -// bigThree.add(centralPanel, aWindowConstraints); |
---|
3593 | | -// aWindowConstraints.weightx = 0; |
---|
3594 | | -// aWindowConstraints.gridx = 4; |
---|
3595 | | -// aWindowConstraints.gridwidth = 1; |
---|
3596 | | -// // aConstraints.gridheight = 3; |
---|
3597 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3598 | | -// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
3599 | | -// scenePanel.setVisible(false); |
---|
3600 | | -// centralPanel.setVisible(true); |
---|
3601 | | -// XYZPanel.setVisible(false); |
---|
3602 | | - bigThree.ClearUI(); |
---|
3603 | | - bigThree.add(centralPanel); |
---|
3604 | | - bigThree.FlushUI(); |
---|
| 3720 | + Show3DView(); |
---|
3605 | 3721 | |
---|
3606 | 3722 | cameraView.requestFocusInWindow(); |
---|
3607 | 3723 | |
---|
.. | .. |
---|
3787 | 3903 | } else |
---|
3788 | 3904 | if (source == rootButton) |
---|
3789 | 3905 | { |
---|
| 3906 | + Replace(); |
---|
3790 | 3907 | Object3D obj; |
---|
3791 | 3908 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3792 | 3909 | { |
---|
.. | .. |
---|
3923 | 4040 | |
---|
3924 | 4041 | copy = group; |
---|
3925 | 4042 | |
---|
3926 | | - SetUndoStates(); |
---|
3927 | | - |
---|
3928 | 4043 | //Globals.theRenderer.object = group; |
---|
3929 | 4044 | if(!useclient) |
---|
3930 | 4045 | { |
---|
.. | .. |
---|
3952 | 4067 | */ |
---|
3953 | 4068 | radio.layout.doClick(); |
---|
3954 | 4069 | |
---|
| 4070 | + SetUndoStates(); |
---|
| 4071 | + |
---|
3955 | 4072 | ClearUnpinned(); |
---|
3956 | 4073 | |
---|
3957 | 4074 | //Grafreed.Assert(group != null); |
---|
.. | .. |
---|
5186 | 5303 | flashSelectionButton.setEnabled(enabled); |
---|
5187 | 5304 | |
---|
5188 | 5305 | clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
| 5306 | + |
---|
| 5307 | + boolean allComposites = true; |
---|
| 5308 | + |
---|
| 5309 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 5310 | + { |
---|
| 5311 | + if (!(e.nextElement() instanceof Composite)) |
---|
| 5312 | + { |
---|
| 5313 | + allComposites = false; |
---|
| 5314 | + break; |
---|
| 5315 | + } |
---|
| 5316 | + } |
---|
| 5317 | + |
---|
| 5318 | + rootButton.setEnabled(allComposites); |
---|
5189 | 5319 | } |
---|
5190 | 5320 | |
---|
5191 | 5321 | void refreshContents(boolean cp) |
---|
.. | .. |
---|
5200 | 5330 | Object3D child = (Object3D) group.selection.get(i); |
---|
5201 | 5331 | |
---|
5202 | 5332 | objEditor.AddInfo(child, this, true); |
---|
5203 | | - System.err.println("info : " + child.GetPath()); |
---|
| 5333 | +// System.err.println("info : " + child.GetPath()); |
---|
5204 | 5334 | } |
---|
5205 | 5335 | |
---|
5206 | 5336 | objEditor.SetText(); // jan 2014 |
---|