.. | .. |
---|
29 | 29 | { |
---|
30 | 30 | cButton skyboxButton; |
---|
31 | 31 | final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
32 | | - row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.NIMBUSLAF)); |
---|
33 | 33 | //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
34 | 34 | skyboxButton.setToolTipText(s.equals("") ? "No background" : s); |
---|
35 | 35 | skyboxButton.addActionListener(new ActionListener() |
---|
.. | .. |
---|
46 | 46 | { |
---|
47 | 47 | cButton textureButton; |
---|
48 | 48 | final String path = "textures/" + f + "/" + c + "/"; // + t; |
---|
49 | | - row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); |
---|
| 49 | + row.add(textureButton = GetButton(path + "icons/" + t, !Globals.NIMBUSLAF)); |
---|
50 | 50 | textureButton.setToolTipText(c + count); |
---|
51 | 51 | textureButton.addActionListener(new ActionListener() |
---|
52 | 52 | { |
---|
.. | .. |
---|
415 | 415 | this.copy = this.group = group; |
---|
416 | 416 | //selectees = this.group.selectees; |
---|
417 | 417 | |
---|
| 418 | + assert(false); |
---|
| 419 | + |
---|
418 | 420 | if (copy.versionlist == null) |
---|
419 | 421 | { |
---|
420 | 422 | copy.versionlist = new Object3D[100]; |
---|
421 | 423 | copy.versionindex = -1; |
---|
422 | 424 | |
---|
423 | | - Save(true); |
---|
| 425 | + //Save(true); |
---|
424 | 426 | } |
---|
425 | 427 | |
---|
426 | 428 | if(ui) |
---|
.. | .. |
---|
449 | 451 | copy.versionlist = new Object3D[100]; |
---|
450 | 452 | copy.versionindex = -1; |
---|
451 | 453 | |
---|
452 | | - Save(true); |
---|
| 454 | + //Save(true); |
---|
453 | 455 | } |
---|
454 | 456 | } |
---|
455 | 457 | |
---|
.. | .. |
---|
569 | 571 | // pasteExpandItem.addActionListener(this); |
---|
570 | 572 | //menu.add("-"); |
---|
571 | 573 | oe.jTree.popup.addSeparator(); |
---|
572 | | - |
---|
573 | | - deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
574 | | - deleteItem.addActionListener(this); |
---|
575 | 574 | |
---|
576 | 575 | if (Globals.ADVANCED) |
---|
577 | 576 | { |
---|
.. | .. |
---|
706 | 705 | setMasterItem.addActionListener(this); |
---|
707 | 706 | } |
---|
708 | 707 | |
---|
709 | | - oe.menuBar.add(menu = new Menu("Group")); |
---|
710 | | -// grabItem = menu.add(new MenuItem("Grab")); |
---|
711 | | -// grabItem.addActionListener(this); |
---|
| 708 | + oe.menuBar.add(menu = new Menu("Order")); |
---|
| 709 | + |
---|
712 | 710 | backItem = menu.add(new MenuItem("Back")); |
---|
713 | 711 | backItem.addActionListener(this); |
---|
714 | 712 | frontItem = menu.add(new MenuItem("Front")); |
---|
715 | 713 | frontItem.addActionListener(this); |
---|
716 | 714 | // compositeItem = menu.add(new MenuItem("Composite")); |
---|
717 | 715 | // compositeItem.addActionListener(this); |
---|
| 716 | + |
---|
| 717 | + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); |
---|
| 718 | + grabItem.addActionListener(this); |
---|
718 | 719 | |
---|
719 | 720 | if (Globals.ADVANCED) |
---|
720 | 721 | { |
---|
.. | .. |
---|
723 | 724 | } |
---|
724 | 725 | ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); |
---|
725 | 726 | ungroupItem.addActionListener(this); |
---|
| 727 | + |
---|
| 728 | + oe.jTree.popup.addSeparator(); |
---|
| 729 | + |
---|
| 730 | + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
| 731 | + deleteItem.addActionListener(this); |
---|
726 | 732 | |
---|
727 | 733 | // menu.add("-"); |
---|
728 | 734 | // |
---|
.. | .. |
---|
851 | 857 | hideleavesItem.addActionListener(this); |
---|
852 | 858 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
853 | 859 | showleavesItem.addActionListener(this); |
---|
854 | | - markleavesItem = menu.add(new MenuItem("Mark Leaves")); |
---|
| 860 | + markleavesItem = menu.add(new MenuItem("Anim Leaves")); |
---|
855 | 861 | markleavesItem.addActionListener(this); |
---|
856 | | - unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
| 862 | + unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves")); |
---|
857 | 863 | unmarkleavesItem.addActionListener(this); |
---|
858 | 864 | rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
859 | 865 | rewindleavesItem.addActionListener(this); |
---|
.. | .. |
---|
1032 | 1038 | oe.radioPanel.add(dummyButton); |
---|
1033 | 1039 | oe.buttonGroup.add(dummyButton); |
---|
1034 | 1040 | */ |
---|
1035 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 1041 | + cGridBag versionManagerPanel = new cGridBag(); |
---|
1036 | 1042 | |
---|
1037 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 1043 | + versionManagerPanel.preferredHeight = 4; |
---|
1038 | 1044 | |
---|
1039 | 1045 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
1040 | 1046 | |
---|
.. | .. |
---|
1061 | 1067 | // } |
---|
1062 | 1068 | // }); |
---|
1063 | 1069 | |
---|
1064 | | - oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1070 | + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1065 | 1071 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1066 | 1072 | collapseButton.addActionListener(this); |
---|
1067 | 1073 | |
---|
1068 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1074 | + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1069 | 1075 | maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1070 | 1076 | maximize3DButton.addActionListener(this); |
---|
1071 | 1077 | |
---|
1072 | | - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1078 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1073 | 1079 | twoButton.setToolTipText("Show 3D view only"); |
---|
1074 | 1080 | twoButton.addActionListener(this); |
---|
1075 | 1081 | this.fullscreenLayout = twoButton; |
---|
1076 | 1082 | |
---|
1077 | | - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1083 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1078 | 1084 | threeButton.setToolTipText("Show controls and 3D view"); |
---|
1079 | 1085 | threeButton.addActionListener(this); |
---|
1080 | 1086 | if (Globals.ADVANCED) |
---|
1081 | 1087 | { |
---|
1082 | | - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1088 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1083 | 1089 | sixButton.setToolTipText("Show 3D view and controls"); |
---|
1084 | 1090 | sixButton.addActionListener(this); |
---|
1085 | 1091 | } |
---|
.. | .. |
---|
1088 | 1094 | // sevenButton.addActionListener(this); |
---|
1089 | 1095 | // |
---|
1090 | 1096 | |
---|
1091 | | - oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1097 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1092 | 1098 | fullButton.setToolTipText("Full-screen window"); |
---|
1093 | 1099 | fullButton.addActionListener(this); |
---|
1094 | 1100 | |
---|
1095 | | - oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1101 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1096 | 1102 | screenfitButton.setToolTipText("Screen fit"); |
---|
1097 | 1103 | screenfitButton.addActionListener(this); |
---|
1098 | 1104 | |
---|
1099 | | - oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1105 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1100 | 1106 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
1101 | 1107 | restoreCameraButton.addActionListener(this); |
---|
1102 | 1108 | |
---|
1103 | | - copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1109 | + versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1104 | 1110 | saveVersionButton.setToolTipText("Duplicate current version"); |
---|
1105 | 1111 | saveVersionButton.addActionListener(this); |
---|
1106 | 1112 | |
---|
1107 | | - copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1113 | + versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1108 | 1114 | deleteVersionButton.setToolTipText("Delete current version"); |
---|
1109 | 1115 | deleteVersionButton.addActionListener(this); |
---|
| 1116 | + deleteVersionButton.setEnabled(false); |
---|
1110 | 1117 | |
---|
1111 | | - copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1118 | + versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1112 | 1119 | previousVersionButton.setToolTipText("Previous version"); |
---|
1113 | 1120 | previousVersionButton.addActionListener(this); |
---|
1114 | 1121 | previousVersionButton.setEnabled(false); |
---|
1115 | 1122 | |
---|
1116 | 1123 | cGridBag updown = new cGridBag().setVertical(true); |
---|
1117 | | - updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1124 | + updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1118 | 1125 | restoreButton.setToolTipText("Undo (restore current version)"); |
---|
1119 | 1126 | restoreButton.addActionListener(this); |
---|
1120 | | - //restoreButton.setEnabled(false); |
---|
| 1127 | + restoreButton.setEnabled(false); |
---|
1121 | 1128 | |
---|
1122 | | - updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1129 | + updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1123 | 1130 | replaceButton.setToolTipText("Save (replace current version)"); |
---|
1124 | 1131 | replaceButton.addActionListener(this); |
---|
1125 | | - //replaceButton.setEnabled(false); |
---|
| 1132 | + replaceButton.setEnabled(false); |
---|
1126 | 1133 | |
---|
1127 | | - copyOptionsPanel.add(updown); |
---|
| 1134 | + versionManagerPanel.add(updown); |
---|
1128 | 1135 | |
---|
1129 | | - copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1136 | + versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1130 | 1137 | nextVersionButton.setToolTipText("Next version"); |
---|
1131 | 1138 | nextVersionButton.addActionListener(this); |
---|
1132 | 1139 | nextVersionButton.setEnabled(false); |
---|
1133 | 1140 | |
---|
1134 | | - oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1141 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1135 | 1142 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
1136 | 1143 | oneStepButton.addActionListener(this); |
---|
1137 | 1144 | |
---|
.. | .. |
---|
1154 | 1161 | |
---|
1155 | 1162 | if (Globals.ADVANCED) |
---|
1156 | 1163 | { |
---|
1157 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1164 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1158 | 1165 | snapobjectButton.addActionListener(this); |
---|
1159 | 1166 | snapobjectButton.setToolTipText("Snap Object"); |
---|
1160 | 1167 | |
---|
1161 | | - oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1168 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1162 | 1169 | fourButton.addActionListener(this); |
---|
1163 | 1170 | fourButton.setToolTipText("Show control panel only"); |
---|
1164 | 1171 | } |
---|
.. | .. |
---|
1166 | 1173 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
1167 | 1174 | |
---|
1168 | 1175 | |
---|
1169 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1176 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1170 | 1177 | rootButton.setToolTipText("Open selection in new tab"); |
---|
1171 | 1178 | rootButton.addActionListener(this); |
---|
1172 | 1179 | |
---|
1173 | | - oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1180 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1174 | 1181 | closeButton.setToolTipText("Close tab"); |
---|
1175 | 1182 | closeButton.addActionListener(this); |
---|
1176 | 1183 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
1179 | 1186 | cGridBag row1 = new cGridBag(); |
---|
1180 | 1187 | |
---|
1181 | 1188 | // INSERT |
---|
1182 | | - row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1189 | + row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1183 | 1190 | gridButton.setToolTipText("Create ground"); |
---|
1184 | 1191 | gridButton.addActionListener(this); |
---|
1185 | 1192 | |
---|
1186 | | - row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1193 | + row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1187 | 1194 | boxButton.setToolTipText("Create box"); |
---|
1188 | 1195 | boxButton.addActionListener(this); |
---|
1189 | 1196 | |
---|
1190 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1197 | + row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1191 | 1198 | superButton.setToolTipText("Create superellipsoid"); |
---|
1192 | 1199 | superButton.addActionListener(this); |
---|
1193 | 1200 | |
---|
1194 | | - row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1201 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1195 | 1202 | sphereButton.setToolTipText("Create sphere"); |
---|
1196 | 1203 | sphereButton.addActionListener(this); |
---|
1197 | 1204 | |
---|
1198 | | - row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1205 | + row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1199 | 1206 | coneButton.setToolTipText("Create cone"); |
---|
1200 | 1207 | coneButton.addActionListener(this); |
---|
1201 | 1208 | |
---|
1202 | | - row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1209 | + row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1203 | 1210 | torusButton.setToolTipText("Create torus"); |
---|
1204 | 1211 | torusButton.addActionListener(this); |
---|
1205 | 1212 | |
---|
1206 | 1213 | if (Globals.ADVANCED) |
---|
1207 | 1214 | { |
---|
1208 | | - oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1215 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1209 | 1216 | kleinButton.setToolTipText("Create Klein bottle"); |
---|
1210 | 1217 | kleinButton.addActionListener(this); |
---|
1211 | 1218 | } |
---|
1212 | 1219 | |
---|
1213 | | - row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1220 | + row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1214 | 1221 | particlesButton.setToolTipText("Create particle system"); |
---|
1215 | 1222 | particlesButton.addActionListener(this); |
---|
1216 | 1223 | |
---|
.. | .. |
---|
1218 | 1225 | |
---|
1219 | 1226 | cGridBag row2 = new cGridBag(); |
---|
1220 | 1227 | |
---|
1221 | | - row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1228 | + row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1222 | 1229 | groupButton.setToolTipText("Create group"); |
---|
1223 | 1230 | groupButton.addActionListener(this); |
---|
1224 | 1231 | |
---|
1225 | | - row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1232 | + row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1226 | 1233 | compositeButton.setToolTipText("Create composite"); |
---|
1227 | 1234 | compositeButton.addActionListener(this); |
---|
1228 | 1235 | |
---|
1229 | | - row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1236 | + row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1230 | 1237 | switchButton.setToolTipText("Create item switcher"); |
---|
1231 | 1238 | switchButton.addActionListener(this); |
---|
1232 | 1239 | |
---|
1233 | | - row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1240 | + row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1234 | 1241 | loopButton.setToolTipText("Create loop"); |
---|
1235 | 1242 | loopButton.addActionListener(this); |
---|
1236 | 1243 | |
---|
1237 | | - row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1244 | + row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1238 | 1245 | textureButton.setToolTipText("Create texture"); |
---|
1239 | 1246 | textureButton.addActionListener(this); |
---|
1240 | 1247 | |
---|
1241 | | - row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1248 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1242 | 1249 | overlayButton.setToolTipText("Create overlay"); |
---|
1243 | 1250 | overlayButton.addActionListener(this); |
---|
1244 | 1251 | |
---|
1245 | | - row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1252 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1246 | 1253 | lightButton.setToolTipText("Create light"); |
---|
1247 | 1254 | lightButton.addActionListener(this); |
---|
1248 | 1255 | |
---|
.. | .. |
---|
1252 | 1259 | |
---|
1253 | 1260 | CreateTexturePanel(textures); |
---|
1254 | 1261 | |
---|
| 1262 | + resourcecontainer.setSelectedIndex((int)(Math.random() * resourcecontainer.getTabCount())); |
---|
| 1263 | + |
---|
1255 | 1264 | oe.toolboxPanel.add(textures); |
---|
1256 | 1265 | |
---|
1257 | 1266 | textures.preferredHeight = 100; |
---|
.. | .. |
---|
1259 | 1268 | CreateSkyboxPanel(oe.skyboxPanel); |
---|
1260 | 1269 | |
---|
1261 | 1270 | // EDIT panel |
---|
1262 | | - editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1271 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1263 | 1272 | editButton.setToolTipText("Pin selection controls"); |
---|
1264 | 1273 | editButton.addActionListener(this); |
---|
1265 | 1274 | |
---|
1266 | | - editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1275 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1267 | 1276 | uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1268 | 1277 | uneditButton.addActionListener(this); |
---|
1269 | 1278 | |
---|
.. | .. |
---|
1271 | 1280 | allParamsButton.setToolTipText("Show all controls"); |
---|
1272 | 1281 | allParamsButton.addActionListener(this); |
---|
1273 | 1282 | |
---|
1274 | | - editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1283 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1275 | 1284 | clearPanelButton.setToolTipText("Clear all controls"); |
---|
1276 | 1285 | clearPanelButton.addActionListener(this); |
---|
1277 | 1286 | |
---|
.. | .. |
---|
1279 | 1288 | //unselectButton.setToolTipText("Unselect"); |
---|
1280 | 1289 | //unselectButton.addActionListener(this); |
---|
1281 | 1290 | |
---|
1282 | | - editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1291 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1283 | 1292 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
1284 | 1293 | flashSelectionButton.addActionListener(this); |
---|
1285 | 1294 | |
---|
.. | .. |
---|
1302 | 1311 | |
---|
1303 | 1312 | cGridBag jSPPanel = new cGridBag(); |
---|
1304 | 1313 | |
---|
| 1314 | + jSPPanel.preferredHeight = 20; |
---|
| 1315 | + |
---|
1305 | 1316 | JScrollPane jSP; |
---|
1306 | 1317 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
1307 | 1318 | jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
.. | .. |
---|
1310 | 1321 | oe.treePanel.add(jSPPanel); |
---|
1311 | 1322 | oe.treePanel.Return(); |
---|
1312 | 1323 | |
---|
1313 | | - oe.treePanel.add(copyOptionsPanel); |
---|
| 1324 | + oe.treePanel.add(versionManagerPanel); |
---|
1314 | 1325 | oe.treePanel.Return(); |
---|
1315 | | - cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
1316 | | - versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
1317 | | - sliderPane.preferredHeight = 1; |
---|
| 1326 | + versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1327 | + versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); |
---|
| 1328 | + versionSliderPane.preferredHeight = 3; |
---|
1318 | 1329 | |
---|
1319 | 1330 | // mainPanel.setDividerLocation(0.1); //1.0); |
---|
1320 | 1331 | mainPanel.setResizeWeight(0.4); |
---|
.. | .. |
---|
1504 | 1515 | |
---|
1505 | 1516 | oe.SetupViews(); |
---|
1506 | 1517 | |
---|
| 1518 | + if (Globals.DEBUG) |
---|
1507 | 1519 | System.out.println("SetupViews"); |
---|
1508 | 1520 | DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( |
---|
1509 | 1521 | oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? |
---|
.. | .. |
---|
3958 | 3970 | if (source == closeButton) |
---|
3959 | 3971 | { |
---|
3960 | 3972 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
| 3973 | + Replace(); |
---|
| 3974 | + |
---|
3961 | 3975 | cRadio ab; |
---|
3962 | 3976 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3963 | 3977 | { |
---|
.. | .. |
---|
4056 | 4070 | } else |
---|
4057 | 4071 | if(source instanceof cRadio) |
---|
4058 | 4072 | { |
---|
| 4073 | + Replace(); |
---|
| 4074 | + |
---|
4059 | 4075 | group.parent = keepparent; |
---|
4060 | 4076 | group.attributes = 0; |
---|
4061 | 4077 | //group.editWindow = null; |
---|
.. | .. |
---|
4111 | 4127 | |
---|
4112 | 4128 | if (copy.versionlist == null) |
---|
4113 | 4129 | { |
---|
4114 | | - copy.versionlist = new Object3D[100]; |
---|
4115 | 4130 | copy.versionindex = -1; |
---|
4116 | 4131 | |
---|
4117 | | - Save(true); |
---|
| 4132 | + // Cannot work with loops |
---|
| 4133 | + // To fix this issue, we first mark all nodes above the root, |
---|
| 4134 | + // and check if any of these nodes are reachable below the root. |
---|
| 4135 | + Grafreed.grafreed.universe.TagObjects(copy, true); |
---|
| 4136 | + |
---|
| 4137 | + if (!copy.HasTags()) |
---|
| 4138 | + { |
---|
| 4139 | + copy.versionlist = new Object3D[100]; |
---|
| 4140 | + |
---|
| 4141 | + Save(true); |
---|
| 4142 | + } |
---|
| 4143 | + |
---|
| 4144 | + Grafreed.grafreed.universe.TagObjects(copy, false); |
---|
4118 | 4145 | } |
---|
4119 | 4146 | |
---|
4120 | 4147 | SetVersionStates(); |
---|
.. | .. |
---|
4262 | 4289 | TouchTransform(obj); |
---|
4263 | 4290 | continue; |
---|
4264 | 4291 | } |
---|
4265 | | - if ((mask&2) != 0) // Scale |
---|
| 4292 | + if ((mask&2) != 0) // Scale/rotation |
---|
4266 | 4293 | { |
---|
4267 | 4294 | obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1; |
---|
4268 | 4295 | obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0; |
---|
.. | .. |
---|
4270 | 4297 | obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1; |
---|
4271 | 4298 | obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0; |
---|
4272 | 4299 | obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0; |
---|
4273 | | - } |
---|
4274 | | - if ((mask&4) != 0) // Rotation |
---|
4275 | | - { |
---|
4276 | | - // ? |
---|
4277 | 4300 | } |
---|
4278 | 4301 | if ((mask&1) != 0) // Translation |
---|
4279 | 4302 | { |
---|
.. | .. |
---|
5359 | 5382 | if (group.selection != null) |
---|
5360 | 5383 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
5361 | 5384 | { |
---|
5362 | | - if (!(e.nextElement() instanceof Composite)) |
---|
| 5385 | + Object next = e.nextElement(); |
---|
| 5386 | + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) |
---|
5363 | 5387 | { |
---|
5364 | 5388 | allComposites = false; |
---|
5365 | 5389 | break; |
---|
.. | .. |
---|
5371 | 5395 | |
---|
5372 | 5396 | void refreshContents(boolean cp) |
---|
5373 | 5397 | { |
---|
| 5398 | + if (Globals.ADVANCED) |
---|
5374 | 5399 | //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5375 | 5400 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5376 | 5401 | { |
---|
.. | .. |
---|
6350 | 6375 | private MenuItem transformGeometryItem; |
---|
6351 | 6376 | private MenuItem transformChildrenItem; |
---|
6352 | 6377 | private MenuItem hideItem; |
---|
6353 | | - private MenuItem grabItem; |
---|
| 6378 | + private JMenuItem grabItem; |
---|
6354 | 6379 | private MenuItem backItem; |
---|
6355 | 6380 | private MenuItem frontItem; |
---|
6356 | 6381 | private MenuItem cameraItem; |
---|