.. | .. |
---|
19 | 19 | import //weka.core. |
---|
20 | 20 | matrix.Matrix; |
---|
21 | 21 | |
---|
| 22 | +import grafeme.ui.*; |
---|
| 23 | + |
---|
22 | 24 | class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI, |
---|
23 | 25 | ActionListener, ChangeListener, |
---|
24 | 26 | InputMethodListener, |
---|
.. | .. |
---|
28 | 30 | iSendInfo |
---|
29 | 31 | //KeyListener |
---|
30 | 32 | { |
---|
| 33 | + boolean timeline; |
---|
| 34 | + boolean wasFullScreen; |
---|
31 | 35 | |
---|
| 36 | + GroupEditor callee; |
---|
| 37 | + JFrame frame; |
---|
| 38 | + |
---|
32 | 39 | // SCRIPT |
---|
33 | 40 | |
---|
34 | 41 | transient JFrame textpanel = null; |
---|
.. | .. |
---|
119 | 126 | void keyPressed(int key, int modifiers) |
---|
120 | 127 | { |
---|
121 | 128 | System.out.println("KEY PRESSED"); |
---|
122 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
123 | 130 | } |
---|
124 | 131 | */ |
---|
125 | 132 | |
---|
126 | 133 | static GridBagConstraints aConstraints; |
---|
127 | 134 | static GridBagConstraints aWindowConstraints; |
---|
128 | | - GroupEditor callee; |
---|
129 | | - JFrame frame; |
---|
| 135 | + |
---|
130 | 136 | static int GRIDWIDTH = 100; // 4; |
---|
131 | 137 | |
---|
132 | 138 | public void closeUI() |
---|
.. | .. |
---|
158 | 164 | objEditor.ctrlPanel.remove(slowerButton); |
---|
159 | 165 | objEditor.ctrlPanel.remove(fasterButton); |
---|
160 | 166 | objEditor.ctrlPanel.remove(remarkButton); |
---|
| 167 | + |
---|
| 168 | + Remove(normalpushField); |
---|
161 | 169 | } |
---|
162 | 170 | |
---|
163 | 171 | public ObjEditor GetEditor() |
---|
164 | 172 | { |
---|
165 | 173 | return objEditor; //.GetEditor(); |
---|
166 | 174 | } |
---|
| 175 | + |
---|
| 176 | + // Sometimes myself, sometimes my callee's. |
---|
167 | 177 | ObjEditor objEditor; |
---|
168 | 178 | |
---|
169 | 179 | /* |
---|
.. | .. |
---|
238 | 248 | //if (!isDisplayable()) |
---|
239 | 249 | //setUndecorated(true); |
---|
240 | 250 | |
---|
241 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 251 | + //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
242 | 252 | client = inClient; |
---|
243 | 253 | copy = localCopy; |
---|
244 | 254 | copy.editWindow = this; |
---|
.. | .. |
---|
292 | 302 | //normalLensItem.addActionListener(this); |
---|
293 | 303 | cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
294 | 304 | revertCameraItem.addActionListener(this); |
---|
| 305 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 306 | + toggleTimelineItem.addItemListener(this); |
---|
295 | 307 | cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
296 | 308 | toggleFullScreenItem.addItemListener(this); |
---|
297 | 309 | toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
298 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
299 | | - toggleTimelineItem.addItemListener(this); |
---|
300 | 310 | cameraMenu.add("-"); |
---|
301 | 311 | cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
302 | 312 | toggleTextureItem.addItemListener(this); |
---|
303 | 313 | toggleTextureItem.setState(CameraPane.textureon); |
---|
304 | 314 | cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
305 | 315 | toggleLiveItem.addItemListener(this); |
---|
306 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
| 316 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
307 | 317 | cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
308 | 318 | stepItem.addActionListener(this); |
---|
309 | 319 | // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
.. | .. |
---|
596 | 606 | } |
---|
597 | 607 | } |
---|
598 | 608 | |
---|
| 609 | + void ToggleFullScreen() |
---|
| 610 | + { |
---|
| 611 | + if (CameraPane.FULLSCREEN) |
---|
| 612 | + { |
---|
| 613 | + frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 614 | + framePanel.add(bigThree); |
---|
| 615 | + frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 616 | + } else |
---|
| 617 | + { |
---|
| 618 | + frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 619 | + framePanel.remove(bigThree); |
---|
| 620 | + frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 621 | + } |
---|
| 622 | + cameraView.ToggleFullScreen(); |
---|
| 623 | + } |
---|
| 624 | + |
---|
599 | 625 | private JTextArea createTextPane() |
---|
600 | 626 | { |
---|
601 | 627 | String[] initString = |
---|
.. | .. |
---|
796 | 822 | |
---|
797 | 823 | aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
798 | 824 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
799 | | - aConstraints.gridwidth = 2; |
---|
| 825 | + aConstraints.gridwidth = 1; |
---|
800 | 826 | ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
801 | 827 | aConstraints.gridx += 1; |
---|
802 | 828 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
965 | 991 | |
---|
966 | 992 | Return(); |
---|
967 | 993 | |
---|
| 994 | + normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
---|
| 995 | + Return(); |
---|
| 996 | + |
---|
968 | 997 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
969 | 998 | // ObjEditor.aConstraints.gridx += 1; |
---|
970 | 999 | |
---|
.. | .. |
---|
1160 | 1189 | //JPanel worldPanel = |
---|
1161 | 1190 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1162 | 1191 | //worldPanel.setName("World"); |
---|
1163 | | - centralPanel = new JPanel(new BorderLayout()); |
---|
| 1192 | + centralPanel = new cGridBag(); |
---|
| 1193 | + centralPanel.preferredWidth = 20; |
---|
1164 | 1194 | timelinePanel = new JPanel(new BorderLayout()); |
---|
1165 | 1195 | timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1166 | 1196 | |
---|
| 1197 | + cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
| 1198 | + cameraPanel.setContinuousLayout(true); |
---|
| 1199 | + cameraPanel.setOneTouchExpandable(true); |
---|
| 1200 | +// cameraPanel.setDividerLocation(0.9); |
---|
| 1201 | +// cameraPanel.setDividerSize(9); |
---|
| 1202 | + cameraPanel.setResizeWeight(1.0); |
---|
| 1203 | + |
---|
1167 | 1204 | centralPanel.add(cameraView); |
---|
1168 | 1205 | //frame.setJMenuBar(timelineMenubar); |
---|
1169 | 1206 | //centralPanel.add(timelinePanel); |
---|
.. | .. |
---|
1183 | 1220 | //frontView.object = copy; |
---|
1184 | 1221 | //sideView.object = copy; |
---|
1185 | 1222 | |
---|
1186 | | - XYZPanel = new JPanel(); |
---|
1187 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1223 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1224 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1188 | 1225 | |
---|
1189 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1190 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1191 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1226 | + XYZPanel.preferredWidth = 5; |
---|
| 1227 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
| 1228 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
| 1229 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1192 | 1230 | |
---|
1193 | 1231 | /* |
---|
1194 | 1232 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1250 | 1288 | scrollpane.setWheelScrollingEnabled(true); |
---|
1251 | 1289 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1252 | 1290 | |
---|
1253 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
1254 | | - scenePanel.add(scrollpane); |
---|
| 1291 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1292 | + scenePanel.preferredWidth = 7; |
---|
| 1293 | + |
---|
| 1294 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1295 | + tabbedPane.add(scrollpane); |
---|
1255 | 1296 | |
---|
1256 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
| 1297 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1257 | 1298 | |
---|
1258 | 1299 | optionsPanel = new JPanel(new GridBagLayout()); |
---|
1259 | 1300 | |
---|
1260 | 1301 | optionsPanel.setName("Options"); |
---|
1261 | | - scenePanel.add(optionsPanel); |
---|
1262 | | - |
---|
| 1302 | + |
---|
| 1303 | + AddOptions(optionsPanel, aConstraints); |
---|
| 1304 | + |
---|
| 1305 | + tabbedPane.add(optionsPanel); |
---|
| 1306 | + |
---|
| 1307 | + scenePanel.add(tabbedPane); |
---|
1263 | 1308 | |
---|
1264 | 1309 | /* |
---|
1265 | 1310 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1293 | 1338 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1294 | 1339 | //bigPanel.add(ctrlPanel); |
---|
1295 | 1340 | //bigPanel.add(gridPanel); |
---|
| 1341 | + /** |
---|
1296 | 1342 | bigThree = new JPanel(); |
---|
1297 | 1343 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1298 | 1344 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1316 | 1362 | // aConstraints.gridheight = 3; |
---|
1317 | 1363 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1318 | 1364 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1365 | + /**/ |
---|
1319 | 1366 | |
---|
| 1367 | + bigThree = new cGridBag(); |
---|
| 1368 | + bigThree.addComponent(scenePanel); |
---|
| 1369 | + bigThree.addComponent(centralPanel); |
---|
| 1370 | + bigThree.addComponent(XYZPanel); |
---|
| 1371 | + |
---|
1320 | 1372 | // // SIDE EFFECT!!! |
---|
1321 | 1373 | // aConstraints.gridx = 0; |
---|
1322 | 1374 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1337 | 1389 | //worldPane.add(bigPanel); |
---|
1338 | 1390 | //worldPane.add(worldPanel); |
---|
1339 | 1391 | /**/ |
---|
1340 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1392 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1393 | + frame.add(/*"Center",*/framePanel); |
---|
1341 | 1394 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
---|
1342 | 1395 | |
---|
1343 | 1396 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
.. | .. |
---|
1358 | 1411 | }); |
---|
1359 | 1412 | } |
---|
1360 | 1413 | |
---|
| 1414 | + void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 1415 | + { |
---|
| 1416 | + } |
---|
| 1417 | + |
---|
1361 | 1418 | JTree GetTree() |
---|
1362 | 1419 | { |
---|
1363 | 1420 | return objEditor.jTree; |
---|
.. | .. |
---|
1428 | 1485 | aConstraints.gridx += 1; |
---|
1429 | 1486 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1430 | 1487 | //aConstraints.weightx = 0; |
---|
1431 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1488 | + ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1432 | 1489 | aConstraints.gridx = 0; |
---|
1433 | 1490 | aConstraints.gridy += 1; |
---|
1434 | 1491 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1438 | 1495 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1439 | 1496 | aConstraints.gridx += 1; |
---|
1440 | 1497 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1441 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1498 | + ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1442 | 1499 | aConstraints.gridx = 0; |
---|
1443 | 1500 | aConstraints.gridy += 1; |
---|
1444 | 1501 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1448 | 1505 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1449 | 1506 | aConstraints.gridx += 1; |
---|
1450 | 1507 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1451 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1508 | + ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1452 | 1509 | aConstraints.gridx = 0; |
---|
1453 | 1510 | aConstraints.gridy += 1; |
---|
1454 | 1511 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1458 | 1515 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1459 | 1516 | aConstraints.gridx += 1; |
---|
1460 | 1517 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1461 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1518 | + ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1462 | 1519 | aConstraints.gridx = 0; |
---|
1463 | 1520 | aConstraints.gridy += 1; |
---|
1464 | 1521 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1468 | 1525 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1469 | 1526 | aConstraints.gridx += 1; |
---|
1470 | 1527 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1471 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1528 | + ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1472 | 1529 | aConstraints.gridx = 0; |
---|
1473 | 1530 | aConstraints.gridy += 1; |
---|
1474 | 1531 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1537 | 1594 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1538 | 1595 | aConstraints.gridx += 1; |
---|
1539 | 1596 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1540 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1597 | + ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1541 | 1598 | aConstraints.gridx = 0; |
---|
1542 | 1599 | aConstraints.gridy += 1; |
---|
1543 | 1600 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1606 | 1663 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1607 | 1664 | aConstraints.gridx += 1; |
---|
1608 | 1665 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1609 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1666 | + ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1610 | 1667 | aConstraints.gridx = 0; |
---|
1611 | 1668 | aConstraints.gridy += 1; |
---|
1612 | 1669 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1677 | 1734 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1678 | 1735 | aConstraints.gridx += 1; |
---|
1679 | 1736 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1680 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1737 | + ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1681 | 1738 | aConstraints.gridx = 0; |
---|
1682 | 1739 | aConstraints.gridy += 1; |
---|
1683 | 1740 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2966 | 3023 | return; |
---|
2967 | 3024 | } else if (event.getSource() == toggleTimelineItem) |
---|
2968 | 3025 | { |
---|
2969 | | - copy.timeline ^= true; |
---|
| 3026 | + timeline ^= true; |
---|
2970 | 3027 | |
---|
2971 | | - if (copy.timeline) |
---|
| 3028 | + if (timeline) |
---|
2972 | 3029 | { |
---|
2973 | 3030 | centralPanel.remove(cameraView); |
---|
2974 | | - centralPanel.add(timelinePanel); |
---|
| 3031 | + cameraPanel.add(cameraView); |
---|
| 3032 | + centralPanel.add(cameraPanel); |
---|
2975 | 3033 | frame.setJMenuBar(timelineMenubar); |
---|
| 3034 | + wasFullScreen = CameraPane.FULLSCREEN; |
---|
| 3035 | + if (!CameraPane.FULLSCREEN) |
---|
| 3036 | + ToggleFullScreen(); |
---|
| 3037 | + toggleFullScreenItem.setEnabled(false); |
---|
2976 | 3038 | } |
---|
2977 | 3039 | else |
---|
2978 | 3040 | { |
---|
2979 | | - centralPanel.remove(timelinePanel); |
---|
| 3041 | + centralPanel.remove(cameraPanel); |
---|
2980 | 3042 | centralPanel.add(cameraView); |
---|
2981 | 3043 | frame.setJMenuBar(null); |
---|
| 3044 | + if (!wasFullScreen) |
---|
| 3045 | + ToggleFullScreen(); |
---|
| 3046 | + toggleFullScreenItem.setEnabled(true); |
---|
2982 | 3047 | } |
---|
2983 | 3048 | |
---|
2984 | 3049 | frame.validate(); |
---|
2985 | 3050 | return; |
---|
2986 | 3051 | } else if (event.getSource() == toggleFullScreenItem) |
---|
2987 | 3052 | { |
---|
2988 | | - if (CameraPane.FULLSCREEN) |
---|
2989 | | - { |
---|
2990 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
2991 | | - framePanel.add(bigThree); |
---|
2992 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
2993 | | - } else |
---|
2994 | | - { |
---|
2995 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
2996 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
2997 | | - } |
---|
| 3053 | + ToggleFullScreen(); |
---|
2998 | 3054 | frame.validate(); |
---|
2999 | | - cameraView.ToggleFullScreen(); |
---|
3000 | 3055 | |
---|
3001 | 3056 | return; |
---|
3002 | 3057 | } else if (event.getSource() == toggleRandomItem) |
---|
.. | .. |
---|
3106 | 3161 | objEditor.refreshContents(); |
---|
3107 | 3162 | } else if (event.getSource() == stepItem) |
---|
3108 | 3163 | { |
---|
3109 | | - cameraView.ONESTEP = true; |
---|
| 3164 | + //cameraView.ONESTEP = true; |
---|
| 3165 | + Globals.ONESTEP = true; |
---|
3110 | 3166 | cameraView.repaint(); |
---|
3111 | 3167 | return; |
---|
3112 | 3168 | } else if (event.getSource() == stepButton) |
---|
.. | .. |
---|
3263 | 3319 | |
---|
3264 | 3320 | void ToggleAnimation() |
---|
3265 | 3321 | { |
---|
3266 | | - if (!CameraPane.ANIMATION) |
---|
| 3322 | + if (!Globals.ANIMATION) |
---|
3267 | 3323 | { |
---|
3268 | 3324 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3269 | 3325 | browser.show(); |
---|
3270 | 3326 | String filename = browser.getFile(); |
---|
3271 | 3327 | if (filename != null && filename.length() > 0) |
---|
3272 | 3328 | { |
---|
3273 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3329 | + Globals.filename = browser.getDirectory() + filename; |
---|
3274 | 3330 | //CameraPane.framecount = 0; |
---|
3275 | | - CameraPane.imagecount = 0; |
---|
| 3331 | + Globals.imagecount = 0; |
---|
3276 | 3332 | |
---|
3277 | | - CameraPane.ANIMATION ^= true; |
---|
| 3333 | + Globals.ANIMATION ^= true; |
---|
3278 | 3334 | |
---|
3279 | 3335 | GrafreeD.wav.cursor = 0; |
---|
3280 | 3336 | GrafreeD.wav.loop = 0; |
---|
3281 | 3337 | } |
---|
3282 | 3338 | } else |
---|
3283 | 3339 | { |
---|
3284 | | - CameraPane.ANIMATION ^= true; |
---|
| 3340 | + Globals.ANIMATION ^= true; |
---|
3285 | 3341 | } |
---|
3286 | 3342 | } |
---|
3287 | 3343 | |
---|
.. | .. |
---|
3534 | 3590 | //System.out.println("PARENT = " + parent); |
---|
3535 | 3591 | //if (parent != null) |
---|
3536 | 3592 | // parent.applySelf(); |
---|
3537 | | - refreshContents(); |
---|
| 3593 | + if (e.getSource() == normalpushField) |
---|
| 3594 | + { |
---|
| 3595 | + objEditor.refreshContents(); |
---|
| 3596 | + //Refresh(); |
---|
| 3597 | + } |
---|
| 3598 | + else |
---|
| 3599 | + refreshContents(); |
---|
3538 | 3600 | // ??? client.refreshEditWindow(); |
---|
3539 | 3601 | } |
---|
3540 | 3602 | //else |
---|
.. | .. |
---|
3546 | 3608 | //group.name = nameField.getText(); |
---|
3547 | 3609 | //objEditor.applySelf(); |
---|
3548 | 3610 | |
---|
3549 | | - assert (objEditor == this); |
---|
| 3611 | + // OCT2018: assert (objEditor == this); |
---|
3550 | 3612 | if (copy.selection == null || copy.selection.size() == 0) |
---|
3551 | 3613 | //super.applySelf() |
---|
3552 | 3614 | ; else |
---|
.. | .. |
---|
3570 | 3632 | objEditor.copy = keep; |
---|
3571 | 3633 | } |
---|
3572 | 3634 | } |
---|
| 3635 | + |
---|
| 3636 | + if (normalpushField != null) |
---|
| 3637 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
3573 | 3638 | } |
---|
3574 | 3639 | |
---|
3575 | 3640 | void SnapObject() |
---|
3576 | 3641 | { |
---|
3577 | | - Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
3578 | | - SnapObject(obj); |
---|
| 3642 | + if (copy.selection.size() > 0) |
---|
| 3643 | + { |
---|
| 3644 | + Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
| 3645 | + SnapObject(obj); |
---|
| 3646 | + } |
---|
3579 | 3647 | } |
---|
3580 | 3648 | |
---|
3581 | 3649 | void SnapObject(Object3D obj) |
---|
.. | .. |
---|
4493 | 4561 | JScrollPane infoPanel; |
---|
4494 | 4562 | JPanel optionsPanel; |
---|
4495 | 4563 | JTabbedPane objectPanel; |
---|
4496 | | - JPanel XYZPanel; |
---|
| 4564 | + cGridBag XYZPanel; |
---|
4497 | 4565 | JSplitPane gridPanel; |
---|
4498 | 4566 | JSplitPane bigPanel; |
---|
4499 | | - JPanel bigThree; |
---|
4500 | | - JTabbedPane scenePanel; |
---|
4501 | | - JPanel centralPanel; |
---|
| 4567 | + cGridBag bigThree; |
---|
| 4568 | + cGridBag scenePanel; |
---|
| 4569 | + cGridBag centralPanel; |
---|
| 4570 | + JSplitPane cameraPanel; |
---|
4502 | 4571 | JPanel timelinePanel; |
---|
4503 | 4572 | JMenuBar timelineMenubar; |
---|
4504 | 4573 | JSplitPane framePanel; |
---|
.. | .. |
---|
4611 | 4680 | NumberSlider opacityPowerField; |
---|
4612 | 4681 | JTree jTree; |
---|
4613 | 4682 | //ObjectUI parent; |
---|
| 4683 | + |
---|
| 4684 | + NumberSlider normalpushField; |
---|
4614 | 4685 | } |
---|