.. | .. |
---|
143 | 143 | //nameField.removeActionListener(this); |
---|
144 | 144 | // objEditor.ctrlPanel.remove(nameField); |
---|
145 | 145 | |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
| 147 | + |
---|
146 | 148 | if (!GroupEditor.allparams) |
---|
147 | 149 | return; |
---|
148 | 150 | |
---|
.. | .. |
---|
165 | 167 | // objEditor.ctrlPanel.remove(fasterButton); |
---|
166 | 168 | // objEditor.ctrlPanel.remove(remarkButton); |
---|
167 | 169 | |
---|
168 | | - objEditor.ctrlPanel.remove(namePanel); |
---|
169 | 170 | objEditor.ctrlPanel.remove(setupPanel); |
---|
170 | 171 | objEditor.ctrlPanel.remove(commandsPanel); |
---|
171 | 172 | objEditor.ctrlPanel.remove(pushPanel); |
---|
.. | .. |
---|
308 | 309 | //normalLensItem.addActionListener(this); |
---|
309 | 310 | cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
310 | 311 | revertCameraItem.addActionListener(this); |
---|
311 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
312 | | - toggleTimelineItem.addItemListener(this); |
---|
| 312 | + |
---|
313 | 313 | cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
314 | 314 | toggleFullScreenItem.addItemListener(this); |
---|
315 | 315 | toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
316 | 316 | cameraMenu.add("-"); |
---|
| 317 | + |
---|
317 | 318 | cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
318 | 319 | toggleTextureItem.addItemListener(this); |
---|
319 | 320 | toggleTextureItem.setState(CameraPane.textureon); |
---|
320 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
321 | | - toggleLiveItem.addItemListener(this); |
---|
322 | | - toggleLiveItem.setState(Globals.isLIVE()); |
---|
323 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
324 | | - stepItem.addActionListener(this); |
---|
325 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
326 | | -// toggleDLItem.addItemListener(this); |
---|
327 | | -// toggleDLItem.setState(false); |
---|
328 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
329 | | - toggleRenderItem.addItemListener(this); |
---|
330 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
331 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
332 | | - toggleDebugItem.addItemListener(this); |
---|
333 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
334 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
335 | | - toggleFrustumItem.addItemListener(this); |
---|
336 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
337 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
338 | | - toggleFootContactItem.addItemListener(this); |
---|
339 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
340 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
341 | | - toggleRandomItem.addItemListener(this); |
---|
342 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
| 321 | + |
---|
| 322 | + cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 323 | + toggleSwitchItem.addItemListener(this); |
---|
| 324 | + toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 325 | + |
---|
343 | 326 | cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
344 | 327 | toggleHandleItem.addItemListener(this); |
---|
345 | 328 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
| 329 | + |
---|
346 | 330 | cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
347 | 331 | togglePaintItem.addItemListener(this); |
---|
348 | 332 | togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
| 333 | + |
---|
| 334 | + if (Globals.ADVANCED) |
---|
| 335 | + { |
---|
| 336 | + cameraMenu.add("-"); |
---|
| 337 | + cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
| 338 | + toggleLiveItem.addItemListener(this); |
---|
| 339 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
| 340 | + |
---|
| 341 | + cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
| 342 | + stepItem.addActionListener(this); |
---|
| 343 | + // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
| 344 | + // toggleDLItem.addItemListener(this); |
---|
| 345 | + // toggleDLItem.setState(false); |
---|
| 346 | + |
---|
| 347 | + cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
| 348 | + toggleRenderItem.addItemListener(this); |
---|
| 349 | + toggleRenderItem.setState(!CameraPane.frozen); |
---|
| 350 | + |
---|
| 351 | + cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
| 352 | + toggleDebugItem.addItemListener(this); |
---|
| 353 | + toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 354 | + |
---|
| 355 | + cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
| 356 | + toggleFrustumItem.addItemListener(this); |
---|
| 357 | + toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
| 358 | + |
---|
| 359 | + cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
| 360 | + toggleFootContactItem.addItemListener(this); |
---|
| 361 | + toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
| 362 | + |
---|
| 363 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 364 | + toggleTimelineItem.addItemListener(this); |
---|
| 365 | + } |
---|
| 366 | + |
---|
349 | 367 | // cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
350 | 368 | // toggleRootItem.addItemListener(this); |
---|
351 | 369 | // toggleRootItem.setState(false); |
---|
.. | .. |
---|
359 | 377 | objectPanel = new JTabbedPane(); |
---|
360 | 378 | toolbarPanel = new JPanel(); |
---|
361 | 379 | toolbarPanel.setName("Toolbar"); |
---|
362 | | - treePanel = new JPanel(); |
---|
| 380 | + treePanel = new cGridBag(); |
---|
363 | 381 | treePanel.setName("Tree"); |
---|
364 | 382 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
365 | 383 | ctrlPanel.setName("Edit"); |
---|
.. | .. |
---|
367 | 385 | materialPanel.setName("Material"); |
---|
368 | 386 | /*JTextPane*/ |
---|
369 | 387 | infoarea = createTextPane(); |
---|
| 388 | + doc = infoarea.getStyledDocument(); |
---|
| 389 | + |
---|
370 | 390 | infoarea.setEditable(true); |
---|
371 | 391 | SetText(); |
---|
372 | 392 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
373 | 393 | // infoarea.setOpaque(false); |
---|
374 | 394 | // //infoarea.setForeground(textcolor); |
---|
375 | | - infoarea.setLineWrap(true); |
---|
376 | | - infoarea.setWrapStyleWord(true); |
---|
| 395 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 396 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
377 | 397 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
378 | 398 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
379 | 399 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
384 | 404 | mainPanel.setName("Main"); |
---|
385 | 405 | mainPanel.setContinuousLayout(true); |
---|
386 | 406 | mainPanel.setOneTouchExpandable(true); |
---|
387 | | - mainPanel.setDividerLocation(1.0); |
---|
388 | 407 | mainPanel.setDividerSize(9); |
---|
389 | | - mainPanel.setResizeWeight(0); |
---|
| 408 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 409 | + mainPanel.setResizeWeight(0.5); |
---|
390 | 410 | |
---|
391 | 411 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
392 | 412 | //mainPanel.setLayout(new GridBagLayout()); |
---|
393 | 413 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
394 | | - treePanel.setLayout(new GridBagLayout()); |
---|
| 414 | +// treePanel.setLayout(new GridBagLayout()); |
---|
395 | 415 | //ctrlPanel.setLayout(new GridBagLayout()); |
---|
396 | 416 | //materialPanel.setLayout(new GridBagLayout()); |
---|
397 | 417 | |
---|
.. | .. |
---|
432 | 452 | static String newline = "\n"; |
---|
433 | 453 | protected static final String buttonString = "JButton"; |
---|
434 | 454 | StyledDocument doc; |
---|
435 | | - JTextArea infoarea; |
---|
| 455 | + JTextPane infoarea; |
---|
436 | 456 | |
---|
437 | 457 | void ClearInfo() |
---|
438 | 458 | { |
---|
.. | .. |
---|
499 | 519 | } |
---|
500 | 520 | |
---|
501 | 521 | if (full) |
---|
502 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 522 | + { |
---|
| 523 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 524 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 525 | + } |
---|
503 | 526 | |
---|
504 | 527 | if (sel.bRep != null) |
---|
505 | 528 | { |
---|
.. | .. |
---|
597 | 620 | { |
---|
598 | 621 | CameraPane.pointflow = (PointFlow) sel; |
---|
599 | 622 | } |
---|
| 623 | + |
---|
| 624 | + si.SendInfo("_____________________", "regular"); |
---|
| 625 | + si.SendInfo("", "regular"); |
---|
600 | 626 | } |
---|
601 | 627 | } |
---|
602 | 628 | |
---|
.. | .. |
---|
628 | 654 | cameraView.ToggleFullScreen(); |
---|
629 | 655 | } |
---|
630 | 656 | |
---|
631 | | - private JTextArea createTextPane() |
---|
| 657 | + private JTextPane createTextPane() |
---|
632 | 658 | { |
---|
633 | | - String[] initString = |
---|
634 | | - { |
---|
635 | | - "This is an editable JTextPane, ", //regular |
---|
636 | | - "another ", //italic |
---|
637 | | - "styled ", //bold |
---|
638 | | - "text ", //small |
---|
639 | | - "component, ", //large |
---|
640 | | - "which supports embedded components..." + newline,//regular |
---|
641 | | - " " + newline, //button |
---|
642 | | - "...and embedded icons..." + newline, //regular |
---|
643 | | - " ", //icon |
---|
644 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
645 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
646 | | - + "cover methods for interacting with those objects." |
---|
647 | | - }; |
---|
| 659 | +// TEXTAREA String[] initString = |
---|
| 660 | +// { |
---|
| 661 | +// "This is an editable JTextPane, ", //regular |
---|
| 662 | +// "another ", //italic |
---|
| 663 | +// "styled ", //bold |
---|
| 664 | +// "text ", //small |
---|
| 665 | +// "component, ", //large |
---|
| 666 | +// "which supports embedded components..." + newline,//regular |
---|
| 667 | +// " " + newline, //button |
---|
| 668 | +// "...and embedded icons..." + newline, //regular |
---|
| 669 | +// " ", //icon |
---|
| 670 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 671 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 672 | +// + "cover methods for interacting with those objects." |
---|
| 673 | +// }; |
---|
| 674 | +// |
---|
| 675 | +// String[] initStyles = |
---|
| 676 | +// { |
---|
| 677 | +// "regular", "italic", "bold", "small", "large", |
---|
| 678 | +// "regular", "button", "regular", "icon", |
---|
| 679 | +// "regular" |
---|
| 680 | +// }; |
---|
| 681 | +// |
---|
| 682 | +// JTextPane textPane = new JTextPane(); |
---|
| 683 | +// textPane.setEditable(true); |
---|
| 684 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 685 | +// addStylesToDocument(doc); |
---|
| 686 | +// |
---|
| 687 | +// try |
---|
| 688 | +// { |
---|
| 689 | +// for (int j = 0; j < 2; j++) |
---|
| 690 | +// { |
---|
| 691 | +// for (int i = 0; i < initString.length; i++) |
---|
| 692 | +// { |
---|
| 693 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 694 | +// doc.getStyle(initStyles[i])); |
---|
| 695 | +// } |
---|
| 696 | +// } |
---|
| 697 | +// } catch (BadLocationException ble) |
---|
| 698 | +// { |
---|
| 699 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 700 | +// } |
---|
648 | 701 | |
---|
649 | | - String[] initStyles = |
---|
650 | | - { |
---|
651 | | - "regular", "italic", "bold", "small", "large", |
---|
652 | | - "regular", "button", "regular", "icon", |
---|
653 | | - "regular" |
---|
654 | | - }; |
---|
655 | | - |
---|
656 | | - JTextPane textPane = new JTextPane(); |
---|
657 | | - textPane.setEditable(true); |
---|
658 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
659 | | - addStylesToDocument(doc); |
---|
660 | | - |
---|
661 | | - try |
---|
662 | | - { |
---|
663 | | - for (int j = 0; j < 2; j++) |
---|
664 | | - { |
---|
665 | | - for (int i = 0; i < initString.length; i++) |
---|
666 | | - { |
---|
667 | | - doc.insertString(doc.getLength(), initString[i], |
---|
668 | | - doc.getStyle(initStyles[i])); |
---|
669 | | - } |
---|
670 | | - } |
---|
671 | | - } catch (BadLocationException ble) |
---|
672 | | - { |
---|
673 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
674 | | - } |
---|
675 | | - |
---|
676 | | - return new JTextArea(); // textPane; |
---|
| 702 | + return new JTextPane(); // textPane; |
---|
677 | 703 | } |
---|
678 | 704 | |
---|
679 | 705 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
943 | 969 | |
---|
944 | 970 | void SetupUI2(ObjEditor oe) |
---|
945 | 971 | { |
---|
946 | | -// oe.aConstraints.weightx = 0; |
---|
947 | | -// oe.aConstraints.weighty = 0; |
---|
948 | | -// oe.aConstraints.gridx = 0; |
---|
949 | | -// oe.aConstraints.gridy = 0; |
---|
950 | 972 | //SetupName(oe); |
---|
951 | 973 | |
---|
952 | 974 | namePanel = new cGridBag(); |
---|
.. | .. |
---|
963 | 985 | setupPanel = new cGridBag().setVertical(false); |
---|
964 | 986 | |
---|
965 | 987 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
966 | | - link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master); |
---|
| 988 | + liveCB.setToolTipText("Animate object"); |
---|
967 | 989 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 990 | + hideCB.setToolTipText("Hide object"); |
---|
968 | 991 | // Return(); |
---|
969 | 992 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
970 | | - rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind); |
---|
971 | | - randomCB = AddCheckBox(setupPanel, "Rand", copy.random); |
---|
| 993 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 994 | + |
---|
| 995 | + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 996 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 997 | + |
---|
| 998 | + randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
| 999 | + randomCB.setToolTipText("Option for switch node"); |
---|
972 | 1000 | |
---|
| 1001 | + if (Globals.ADVANCED) |
---|
| 1002 | + { |
---|
| 1003 | + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 1004 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1005 | + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1006 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 1007 | + } |
---|
| 1008 | + |
---|
973 | 1009 | oe.ctrlPanel.add(setupPanel); |
---|
974 | 1010 | oe.ctrlPanel.Return(); |
---|
975 | 1011 | |
---|
976 | 1012 | commandsPanel = new cGridBag().setVertical(false); |
---|
977 | 1013 | |
---|
978 | 1014 | resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1015 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
979 | 1016 | stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1017 | + stepButton.setToolTipText("Step one frame"); |
---|
980 | 1018 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
981 | 1019 | // stepAllButton = AddButton(oe, "Step All"); |
---|
982 | | - speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup); |
---|
983 | 1020 | // Return(); |
---|
984 | 1021 | slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1022 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
985 | 1023 | fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1024 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
986 | 1025 | remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1026 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
987 | 1027 | |
---|
988 | 1028 | oe.ctrlPanel.add(commandsPanel); |
---|
989 | 1029 | oe.ctrlPanel.Return(); |
---|
.. | .. |
---|
1290 | 1330 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1291 | 1331 | |
---|
1292 | 1332 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1293 | | - scenePanel.preferredWidth = 7; |
---|
| 1333 | + scenePanel.preferredWidth = 6; |
---|
1294 | 1334 | |
---|
1295 | 1335 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1296 | 1336 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1396 | 1436 | |
---|
1397 | 1437 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1398 | 1438 | |
---|
1399 | | - frame.setSize(1024, 768); |
---|
1400 | | - frame.show(); |
---|
| 1439 | + frame.setSize(1280, 860); |
---|
| 1440 | + frame.setVisible(true); |
---|
1401 | 1441 | |
---|
1402 | 1442 | gridPanel.setDividerLocation(1.0); |
---|
1403 | 1443 | |
---|
.. | .. |
---|
1436 | 1476 | |
---|
1437 | 1477 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1438 | 1478 | |
---|
1439 | | - editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints); |
---|
| 1479 | + editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1480 | + createMaterialButton.setToolTipText("Create material"); |
---|
1440 | 1481 | |
---|
1441 | 1482 | /* |
---|
1442 | 1483 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1443 | 1484 | */ |
---|
1444 | 1485 | |
---|
1445 | | - editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints); |
---|
1446 | | - editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints); |
---|
1447 | | - editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1448 | | - editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1486 | + editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1487 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1488 | + |
---|
| 1489 | + if (Globals.ADVANCED) |
---|
| 1490 | + { |
---|
| 1491 | + editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1492 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
| 1493 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1494 | + } |
---|
1449 | 1495 | |
---|
| 1496 | + editBar.preferredHeight = 15; |
---|
| 1497 | + |
---|
1450 | 1498 | panel.add(editBar); |
---|
1451 | 1499 | |
---|
1452 | 1500 | /**/ |
---|
.. | .. |
---|
1712 | 1760 | opacityPowerField.addChangeListener(this); |
---|
1713 | 1761 | /**/ |
---|
1714 | 1762 | |
---|
1715 | | - resetSlidersButton.addActionListener(this); |
---|
1716 | 1763 | clearMaterialButton.addActionListener(this); |
---|
1717 | 1764 | createMaterialButton.addActionListener(this); |
---|
1718 | | - |
---|
1719 | | - propagateToggle.addItemListener(this); |
---|
1720 | | - multiplyToggle.addItemListener(this); |
---|
| 1765 | + |
---|
| 1766 | + if (Globals.ADVANCED) |
---|
| 1767 | + { |
---|
| 1768 | + resetSlidersButton.addActionListener(this); |
---|
| 1769 | + propagateToggle.addItemListener(this); |
---|
| 1770 | + multiplyToggle.addItemListener(this); |
---|
| 1771 | + } |
---|
1721 | 1772 | } |
---|
1722 | 1773 | |
---|
1723 | 1774 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
2349 | 2400 | { |
---|
2350 | 2401 | /**/ |
---|
2351 | 2402 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2352 | | - browser.show(); |
---|
| 2403 | + browser.setVisible(true); |
---|
2353 | 2404 | String filename = browser.getFile(); |
---|
2354 | 2405 | if (filename != null && filename.length() > 0) |
---|
2355 | 2406 | { |
---|
.. | .. |
---|
2709 | 2760 | return; |
---|
2710 | 2761 | } |
---|
2711 | 2762 | |
---|
2712 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2763 | + if (multiplyToggle != null) |
---|
| 2764 | + multiplyToggle.setSelected(mat.multiply); |
---|
2713 | 2765 | |
---|
2714 | 2766 | assert (object.projectedVertices != null); |
---|
2715 | 2767 | |
---|
.. | .. |
---|
2924 | 2976 | frame.validate(); |
---|
2925 | 2977 | |
---|
2926 | 2978 | return; |
---|
2927 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 2979 | + } else if (event.getSource() == toggleSwitchItem) |
---|
2928 | 2980 | { |
---|
2929 | 2981 | cameraView.ToggleRandom(); |
---|
2930 | 2982 | cameraView.repaint(); |
---|
.. | .. |
---|
2969 | 3021 | if (event.getSource() == randomCB) |
---|
2970 | 3022 | { |
---|
2971 | 3023 | copy.random ^= true; |
---|
| 3024 | + objEditor.refreshContents(); |
---|
2972 | 3025 | return; |
---|
2973 | 3026 | } |
---|
2974 | 3027 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3192 | 3245 | if (!Globals.ANIMATION) |
---|
3193 | 3246 | { |
---|
3194 | 3247 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3195 | | - browser.show(); |
---|
| 3248 | + browser.setVisible(true); |
---|
3196 | 3249 | String filename = browser.getFile(); |
---|
3197 | 3250 | if (filename != null && filename.length() > 0) |
---|
3198 | 3251 | { |
---|
.. | .. |
---|
3224 | 3277 | callee.refreshContents(); |
---|
3225 | 3278 | } else |
---|
3226 | 3279 | { |
---|
3227 | | - new Exception().printStackTrace(); |
---|
3228 | 3280 | System.exit(0); |
---|
3229 | 3281 | } |
---|
3230 | 3282 | } |
---|
.. | .. |
---|
3254 | 3306 | void CreateMaterial() |
---|
3255 | 3307 | { |
---|
3256 | 3308 | //copy.ClearMaterial(); // PATCH |
---|
3257 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3309 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3258 | 3310 | if (copy.selection.size() > 0) |
---|
3259 | 3311 | //SetMaterial(copy); |
---|
3260 | 3312 | { |
---|
.. | .. |
---|
3313 | 3365 | { |
---|
3314 | 3366 | copy.ResetBlockLoop(); // temporary problem |
---|
3315 | 3367 | |
---|
3316 | | - boolean random = CameraPane.RANDOM; |
---|
3317 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3368 | + boolean random = CameraPane.SWITCH; |
---|
| 3369 | + CameraPane.SWITCH = false; // parse everything |
---|
3318 | 3370 | copy.ResetDisplayList(); |
---|
3319 | 3371 | copy.HardTouch(); |
---|
3320 | | - CameraPane.RANDOM = random; |
---|
| 3372 | + CameraPane.SWITCH = random; |
---|
3321 | 3373 | } |
---|
3322 | 3374 | |
---|
3323 | 3375 | // public void applySelf() |
---|
.. | .. |
---|
4417 | 4469 | CheckboxMenuItem toggleFootContactItem; |
---|
4418 | 4470 | CheckboxMenuItem toggleDLItem; |
---|
4419 | 4471 | CheckboxMenuItem toggleTextureItem; |
---|
4420 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4472 | + CheckboxMenuItem toggleSwitchItem; |
---|
4421 | 4473 | CheckboxMenuItem toggleRootItem; |
---|
4422 | 4474 | CheckboxMenuItem animationItem; |
---|
4423 | 4475 | CheckboxMenuItem toggleHandleItem; |
---|
.. | .. |
---|
4425 | 4477 | JSplitPane mainPanel; |
---|
4426 | 4478 | JScrollPane scrollpane; |
---|
4427 | 4479 | JPanel toolbarPanel; |
---|
4428 | | - JPanel treePanel; |
---|
| 4480 | + cGridBag treePanel; |
---|
4429 | 4481 | JPanel radioPanel; |
---|
4430 | 4482 | ButtonGroup buttonGroup; |
---|
4431 | 4483 | cGridBag ctrlPanel; |
---|