.. | .. |
---|
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 | { |
---|
.. | .. |
---|
347 | 347 | |
---|
348 | 348 | public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
349 | 349 | { |
---|
350 | | - JTabbedPane skyboxpane = new JTabbedPane(); |
---|
| 350 | + JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT); |
---|
351 | 351 | |
---|
352 | 352 | AddSkyboxTab0(skyboxpane); |
---|
353 | 353 | AddSkyboxTab1(skyboxpane); |
---|
.. | .. |
---|
857 | 857 | hideleavesItem.addActionListener(this); |
---|
858 | 858 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
859 | 859 | showleavesItem.addActionListener(this); |
---|
860 | | - markleavesItem = menu.add(new MenuItem("Mark Leaves")); |
---|
| 860 | + markleavesItem = menu.add(new MenuItem("Anim Leaves")); |
---|
861 | 861 | markleavesItem.addActionListener(this); |
---|
862 | | - unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
| 862 | + unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves")); |
---|
863 | 863 | unmarkleavesItem.addActionListener(this); |
---|
864 | 864 | rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
865 | 865 | rewindleavesItem.addActionListener(this); |
---|
.. | .. |
---|
964 | 964 | texturecount = 0; |
---|
965 | 965 | } |
---|
966 | 966 | |
---|
967 | | - if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
| 967 | + if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png"))) |
---|
968 | 968 | { |
---|
969 | 969 | //if (!added) |
---|
970 | 970 | { |
---|
.. | .. |
---|
973 | 973 | currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
974 | 974 | } |
---|
975 | 975 | |
---|
976 | | - AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
| 976 | + AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); |
---|
977 | 977 | |
---|
978 | 978 | if (++colcount >= columns) |
---|
979 | 979 | { |
---|
.. | .. |
---|
1038 | 1038 | oe.radioPanel.add(dummyButton); |
---|
1039 | 1039 | oe.buttonGroup.add(dummyButton); |
---|
1040 | 1040 | */ |
---|
1041 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 1041 | + cGridBag versionManagerPanel = new cGridBag(); |
---|
1042 | 1042 | |
---|
1043 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 1043 | + versionManagerPanel.preferredHeight = 4; |
---|
1044 | 1044 | |
---|
1045 | 1045 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
1046 | 1046 | |
---|
.. | .. |
---|
1067 | 1067 | // } |
---|
1068 | 1068 | // }); |
---|
1069 | 1069 | |
---|
1070 | | - 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); |
---|
1071 | 1071 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1072 | 1072 | collapseButton.addActionListener(this); |
---|
1073 | 1073 | |
---|
1074 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1074 | + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1075 | 1075 | maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1076 | 1076 | maximize3DButton.addActionListener(this); |
---|
1077 | 1077 | |
---|
1078 | | - 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); |
---|
1079 | 1079 | twoButton.setToolTipText("Show 3D view only"); |
---|
1080 | 1080 | twoButton.addActionListener(this); |
---|
1081 | 1081 | this.fullscreenLayout = twoButton; |
---|
1082 | 1082 | |
---|
1083 | | - 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); |
---|
1084 | 1084 | threeButton.setToolTipText("Show controls and 3D view"); |
---|
1085 | 1085 | threeButton.addActionListener(this); |
---|
1086 | 1086 | if (Globals.ADVANCED) |
---|
1087 | 1087 | { |
---|
1088 | | - 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); |
---|
1089 | 1089 | sixButton.setToolTipText("Show 3D view and controls"); |
---|
1090 | 1090 | sixButton.addActionListener(this); |
---|
1091 | 1091 | } |
---|
.. | .. |
---|
1094 | 1094 | // sevenButton.addActionListener(this); |
---|
1095 | 1095 | // |
---|
1096 | 1096 | |
---|
1097 | | - 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); |
---|
1098 | 1098 | fullButton.setToolTipText("Full-screen window"); |
---|
1099 | 1099 | fullButton.addActionListener(this); |
---|
1100 | 1100 | |
---|
1101 | | - 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); |
---|
1102 | 1102 | screenfitButton.setToolTipText("Screen fit"); |
---|
1103 | 1103 | screenfitButton.addActionListener(this); |
---|
1104 | 1104 | |
---|
1105 | | - 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); |
---|
1106 | 1106 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
1107 | 1107 | restoreCameraButton.addActionListener(this); |
---|
1108 | 1108 | |
---|
1109 | | - 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); |
---|
1110 | 1110 | saveVersionButton.setToolTipText("Duplicate current version"); |
---|
1111 | 1111 | saveVersionButton.addActionListener(this); |
---|
1112 | 1112 | |
---|
1113 | | - copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1113 | + versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1114 | 1114 | deleteVersionButton.setToolTipText("Delete current version"); |
---|
1115 | 1115 | deleteVersionButton.addActionListener(this); |
---|
1116 | 1116 | deleteVersionButton.setEnabled(false); |
---|
1117 | 1117 | |
---|
1118 | | - copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1118 | + versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1119 | 1119 | previousVersionButton.setToolTipText("Previous version"); |
---|
1120 | 1120 | previousVersionButton.addActionListener(this); |
---|
1121 | 1121 | previousVersionButton.setEnabled(false); |
---|
1122 | 1122 | |
---|
1123 | 1123 | cGridBag updown = new cGridBag().setVertical(true); |
---|
1124 | | - updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1124 | + updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1125 | 1125 | restoreButton.setToolTipText("Undo (restore current version)"); |
---|
1126 | 1126 | restoreButton.addActionListener(this); |
---|
1127 | 1127 | restoreButton.setEnabled(false); |
---|
1128 | 1128 | |
---|
1129 | | - updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1129 | + updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1130 | 1130 | replaceButton.setToolTipText("Save (replace current version)"); |
---|
1131 | 1131 | replaceButton.addActionListener(this); |
---|
1132 | 1132 | replaceButton.setEnabled(false); |
---|
1133 | 1133 | |
---|
1134 | | - copyOptionsPanel.add(updown); |
---|
| 1134 | + versionManagerPanel.add(updown); |
---|
1135 | 1135 | |
---|
1136 | | - copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1136 | + versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1137 | 1137 | nextVersionButton.setToolTipText("Next version"); |
---|
1138 | 1138 | nextVersionButton.addActionListener(this); |
---|
1139 | 1139 | nextVersionButton.setEnabled(false); |
---|
1140 | 1140 | |
---|
1141 | | - 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); |
---|
1142 | 1142 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
1143 | 1143 | oneStepButton.addActionListener(this); |
---|
1144 | 1144 | |
---|
.. | .. |
---|
1161 | 1161 | |
---|
1162 | 1162 | if (Globals.ADVANCED) |
---|
1163 | 1163 | { |
---|
1164 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1164 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1165 | 1165 | snapobjectButton.addActionListener(this); |
---|
1166 | 1166 | snapobjectButton.setToolTipText("Snap Object"); |
---|
1167 | 1167 | |
---|
1168 | | - 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); |
---|
1169 | 1169 | fourButton.addActionListener(this); |
---|
1170 | 1170 | fourButton.setToolTipText("Show control panel only"); |
---|
1171 | 1171 | } |
---|
.. | .. |
---|
1173 | 1173 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
1174 | 1174 | |
---|
1175 | 1175 | |
---|
1176 | | - 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); |
---|
1177 | 1177 | rootButton.setToolTipText("Open selection in new tab"); |
---|
1178 | 1178 | rootButton.addActionListener(this); |
---|
1179 | 1179 | |
---|
1180 | | - 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); |
---|
1181 | 1181 | closeButton.setToolTipText("Close tab"); |
---|
1182 | 1182 | closeButton.addActionListener(this); |
---|
1183 | 1183 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
1186 | 1186 | cGridBag row1 = new cGridBag(); |
---|
1187 | 1187 | |
---|
1188 | 1188 | // INSERT |
---|
1189 | | - row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1189 | + row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1190 | 1190 | gridButton.setToolTipText("Create ground"); |
---|
1191 | 1191 | gridButton.addActionListener(this); |
---|
1192 | 1192 | |
---|
1193 | | - row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1193 | + row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1194 | 1194 | boxButton.setToolTipText("Create box"); |
---|
1195 | 1195 | boxButton.addActionListener(this); |
---|
1196 | 1196 | |
---|
1197 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1197 | + row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1198 | 1198 | superButton.setToolTipText("Create superellipsoid"); |
---|
1199 | 1199 | superButton.addActionListener(this); |
---|
1200 | 1200 | |
---|
1201 | | - row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1201 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1202 | 1202 | sphereButton.setToolTipText("Create sphere"); |
---|
1203 | 1203 | sphereButton.addActionListener(this); |
---|
1204 | 1204 | |
---|
1205 | | - row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1205 | + row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1206 | 1206 | coneButton.setToolTipText("Create cone"); |
---|
1207 | 1207 | coneButton.addActionListener(this); |
---|
1208 | 1208 | |
---|
1209 | | - row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1209 | + row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1210 | 1210 | torusButton.setToolTipText("Create torus"); |
---|
1211 | 1211 | torusButton.addActionListener(this); |
---|
1212 | 1212 | |
---|
1213 | 1213 | if (Globals.ADVANCED) |
---|
1214 | 1214 | { |
---|
1215 | | - 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); |
---|
1216 | 1216 | kleinButton.setToolTipText("Create Klein bottle"); |
---|
1217 | 1217 | kleinButton.addActionListener(this); |
---|
1218 | 1218 | } |
---|
1219 | 1219 | |
---|
1220 | | - row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1220 | + row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1221 | 1221 | particlesButton.setToolTipText("Create particle system"); |
---|
1222 | 1222 | particlesButton.addActionListener(this); |
---|
1223 | 1223 | |
---|
.. | .. |
---|
1225 | 1225 | |
---|
1226 | 1226 | cGridBag row2 = new cGridBag(); |
---|
1227 | 1227 | |
---|
1228 | | - row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1228 | + row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1229 | 1229 | groupButton.setToolTipText("Create group"); |
---|
1230 | 1230 | groupButton.addActionListener(this); |
---|
1231 | 1231 | |
---|
1232 | | - row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1232 | + row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1233 | 1233 | compositeButton.setToolTipText("Create composite"); |
---|
1234 | 1234 | compositeButton.addActionListener(this); |
---|
1235 | 1235 | |
---|
1236 | | - row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1236 | + row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1237 | 1237 | switchButton.setToolTipText("Create item switcher"); |
---|
1238 | 1238 | switchButton.addActionListener(this); |
---|
1239 | 1239 | |
---|
1240 | | - row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1240 | + row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1241 | 1241 | loopButton.setToolTipText("Create loop"); |
---|
1242 | 1242 | loopButton.addActionListener(this); |
---|
1243 | 1243 | |
---|
1244 | | - row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1244 | + row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1245 | 1245 | textureButton.setToolTipText("Create texture"); |
---|
1246 | 1246 | textureButton.addActionListener(this); |
---|
1247 | 1247 | |
---|
1248 | | - row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1248 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1249 | 1249 | overlayButton.setToolTipText("Create overlay"); |
---|
1250 | 1250 | overlayButton.addActionListener(this); |
---|
1251 | 1251 | |
---|
1252 | | - 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); |
---|
1253 | 1253 | lightButton.setToolTipText("Create light"); |
---|
1254 | 1254 | lightButton.addActionListener(this); |
---|
1255 | 1255 | |
---|
.. | .. |
---|
1268 | 1268 | CreateSkyboxPanel(oe.skyboxPanel); |
---|
1269 | 1269 | |
---|
1270 | 1270 | // EDIT panel |
---|
1271 | | - editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1271 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1272 | 1272 | editButton.setToolTipText("Pin selection controls"); |
---|
1273 | 1273 | editButton.addActionListener(this); |
---|
1274 | 1274 | |
---|
1275 | | - editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1275 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1276 | 1276 | uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1277 | 1277 | uneditButton.addActionListener(this); |
---|
1278 | 1278 | |
---|
.. | .. |
---|
1280 | 1280 | allParamsButton.setToolTipText("Show all controls"); |
---|
1281 | 1281 | allParamsButton.addActionListener(this); |
---|
1282 | 1282 | |
---|
1283 | | - editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1283 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1284 | 1284 | clearPanelButton.setToolTipText("Clear all controls"); |
---|
1285 | 1285 | clearPanelButton.addActionListener(this); |
---|
1286 | 1286 | |
---|
.. | .. |
---|
1288 | 1288 | //unselectButton.setToolTipText("Unselect"); |
---|
1289 | 1289 | //unselectButton.addActionListener(this); |
---|
1290 | 1290 | |
---|
1291 | | - 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); |
---|
1292 | 1292 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
1293 | 1293 | flashSelectionButton.addActionListener(this); |
---|
1294 | 1294 | |
---|
.. | .. |
---|
1311 | 1311 | |
---|
1312 | 1312 | cGridBag jSPPanel = new cGridBag(); |
---|
1313 | 1313 | |
---|
| 1314 | + jSPPanel.preferredHeight = 20; |
---|
| 1315 | + |
---|
1314 | 1316 | JScrollPane jSP; |
---|
1315 | 1317 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
1316 | 1318 | jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
.. | .. |
---|
1319 | 1321 | oe.treePanel.add(jSPPanel); |
---|
1320 | 1322 | oe.treePanel.Return(); |
---|
1321 | 1323 | |
---|
1322 | | - oe.treePanel.add(copyOptionsPanel); |
---|
| 1324 | + oe.treePanel.add(versionManagerPanel); |
---|
1323 | 1325 | oe.treePanel.Return(); |
---|
1324 | | - cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
1325 | | - versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
1326 | | - sliderPane.preferredHeight = 1; |
---|
| 1326 | + versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1327 | + versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); |
---|
| 1328 | + versionSliderPane.preferredHeight = 3; |
---|
1327 | 1329 | |
---|
1328 | 1330 | // mainPanel.setDividerLocation(0.1); //1.0); |
---|
1329 | 1331 | mainPanel.setResizeWeight(0.4); |
---|
.. | .. |
---|
3968 | 3970 | if (source == closeButton) |
---|
3969 | 3971 | { |
---|
3970 | 3972 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
| 3973 | + Replace(); |
---|
| 3974 | + |
---|
3971 | 3975 | cRadio ab; |
---|
3972 | 3976 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3973 | 3977 | { |
---|
.. | .. |
---|
4066 | 4070 | } else |
---|
4067 | 4071 | if(source instanceof cRadio) |
---|
4068 | 4072 | { |
---|
| 4073 | + Replace(); |
---|
| 4074 | + |
---|
4069 | 4075 | group.parent = keepparent; |
---|
4070 | 4076 | group.attributes = 0; |
---|
4071 | 4077 | //group.editWindow = null; |
---|
.. | .. |
---|
4121 | 4127 | |
---|
4122 | 4128 | if (copy.versionlist == null) |
---|
4123 | 4129 | { |
---|
4124 | | - copy.versionlist = new Object3D[100]; |
---|
4125 | 4130 | copy.versionindex = -1; |
---|
4126 | 4131 | |
---|
4127 | 4132 | // Cannot work with loops |
---|
4128 | | - // To fix this issue, first mark all nodes above the root, |
---|
| 4133 | + // To fix this issue, we first mark all nodes above the root, |
---|
4129 | 4134 | // and check if any of these nodes are reachable below the root. |
---|
4130 | | - //Save(true); |
---|
| 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); |
---|
4131 | 4145 | } |
---|
4132 | 4146 | |
---|
4133 | 4147 | SetVersionStates(); |
---|
.. | .. |
---|
4275 | 4289 | TouchTransform(obj); |
---|
4276 | 4290 | continue; |
---|
4277 | 4291 | } |
---|
4278 | | - if ((mask&2) != 0) // Scale |
---|
| 4292 | + if ((mask&2) != 0) // Scale/rotation |
---|
4279 | 4293 | { |
---|
4280 | 4294 | obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1; |
---|
4281 | 4295 | obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0; |
---|
.. | .. |
---|
4283 | 4297 | obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1; |
---|
4284 | 4298 | obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0; |
---|
4285 | 4299 | obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0; |
---|
4286 | | - } |
---|
4287 | | - if ((mask&4) != 0) // Rotation |
---|
4288 | | - { |
---|
4289 | | - // ? |
---|
4290 | 4300 | } |
---|
4291 | 4301 | if ((mask&1) != 0) // Translation |
---|
4292 | 4302 | { |
---|
.. | .. |
---|
5385 | 5395 | |
---|
5386 | 5396 | void refreshContents(boolean cp) |
---|
5387 | 5397 | { |
---|
| 5398 | + if (Globals.ADVANCED) |
---|
5388 | 5399 | //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5389 | 5400 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5390 | 5401 | { |
---|