.. | .. |
---|
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); |
---|
.. | .. |
---|
359 | 360 | objectPanel = new JTabbedPane(); |
---|
360 | 361 | toolbarPanel = new JPanel(); |
---|
361 | 362 | toolbarPanel.setName("Toolbar"); |
---|
362 | | - treePanel = new JPanel(); |
---|
| 363 | + treePanel = new cGridBag(); |
---|
363 | 364 | treePanel.setName("Tree"); |
---|
364 | 365 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
365 | 366 | ctrlPanel.setName("Edit"); |
---|
.. | .. |
---|
367 | 368 | materialPanel.setName("Material"); |
---|
368 | 369 | /*JTextPane*/ |
---|
369 | 370 | infoarea = createTextPane(); |
---|
| 371 | + doc = infoarea.getStyledDocument(); |
---|
| 372 | + |
---|
370 | 373 | infoarea.setEditable(true); |
---|
371 | 374 | SetText(); |
---|
372 | 375 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
373 | 376 | // infoarea.setOpaque(false); |
---|
374 | 377 | // //infoarea.setForeground(textcolor); |
---|
375 | | - infoarea.setLineWrap(true); |
---|
376 | | - infoarea.setWrapStyleWord(true); |
---|
| 378 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 379 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
377 | 380 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
378 | 381 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
379 | 382 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
384 | 387 | mainPanel.setName("Main"); |
---|
385 | 388 | mainPanel.setContinuousLayout(true); |
---|
386 | 389 | mainPanel.setOneTouchExpandable(true); |
---|
387 | | - mainPanel.setDividerLocation(1.0); |
---|
388 | 390 | mainPanel.setDividerSize(9); |
---|
389 | | - mainPanel.setResizeWeight(0); |
---|
| 391 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 392 | + mainPanel.setResizeWeight(0.5); |
---|
390 | 393 | |
---|
391 | 394 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
392 | 395 | //mainPanel.setLayout(new GridBagLayout()); |
---|
393 | 396 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
394 | | - treePanel.setLayout(new GridBagLayout()); |
---|
| 397 | +// treePanel.setLayout(new GridBagLayout()); |
---|
395 | 398 | //ctrlPanel.setLayout(new GridBagLayout()); |
---|
396 | 399 | //materialPanel.setLayout(new GridBagLayout()); |
---|
397 | 400 | |
---|
.. | .. |
---|
432 | 435 | static String newline = "\n"; |
---|
433 | 436 | protected static final String buttonString = "JButton"; |
---|
434 | 437 | StyledDocument doc; |
---|
435 | | - JTextArea infoarea; |
---|
| 438 | + JTextPane infoarea; |
---|
436 | 439 | |
---|
437 | 440 | void ClearInfo() |
---|
438 | 441 | { |
---|
.. | .. |
---|
499 | 502 | } |
---|
500 | 503 | |
---|
501 | 504 | if (full) |
---|
502 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 505 | + { |
---|
| 506 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 507 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 508 | + } |
---|
503 | 509 | |
---|
504 | 510 | if (sel.bRep != null) |
---|
505 | 511 | { |
---|
.. | .. |
---|
597 | 603 | { |
---|
598 | 604 | CameraPane.pointflow = (PointFlow) sel; |
---|
599 | 605 | } |
---|
| 606 | + |
---|
| 607 | + si.SendInfo("_____________________", "regular"); |
---|
| 608 | + si.SendInfo("", "regular"); |
---|
600 | 609 | } |
---|
601 | 610 | } |
---|
602 | 611 | |
---|
.. | .. |
---|
628 | 637 | cameraView.ToggleFullScreen(); |
---|
629 | 638 | } |
---|
630 | 639 | |
---|
631 | | - private JTextArea createTextPane() |
---|
| 640 | + private JTextPane createTextPane() |
---|
632 | 641 | { |
---|
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 | | - }; |
---|
| 642 | +// TEXTAREA String[] initString = |
---|
| 643 | +// { |
---|
| 644 | +// "This is an editable JTextPane, ", //regular |
---|
| 645 | +// "another ", //italic |
---|
| 646 | +// "styled ", //bold |
---|
| 647 | +// "text ", //small |
---|
| 648 | +// "component, ", //large |
---|
| 649 | +// "which supports embedded components..." + newline,//regular |
---|
| 650 | +// " " + newline, //button |
---|
| 651 | +// "...and embedded icons..." + newline, //regular |
---|
| 652 | +// " ", //icon |
---|
| 653 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 654 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 655 | +// + "cover methods for interacting with those objects." |
---|
| 656 | +// }; |
---|
| 657 | +// |
---|
| 658 | +// String[] initStyles = |
---|
| 659 | +// { |
---|
| 660 | +// "regular", "italic", "bold", "small", "large", |
---|
| 661 | +// "regular", "button", "regular", "icon", |
---|
| 662 | +// "regular" |
---|
| 663 | +// }; |
---|
| 664 | +// |
---|
| 665 | +// JTextPane textPane = new JTextPane(); |
---|
| 666 | +// textPane.setEditable(true); |
---|
| 667 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 668 | +// addStylesToDocument(doc); |
---|
| 669 | +// |
---|
| 670 | +// try |
---|
| 671 | +// { |
---|
| 672 | +// for (int j = 0; j < 2; j++) |
---|
| 673 | +// { |
---|
| 674 | +// for (int i = 0; i < initString.length; i++) |
---|
| 675 | +// { |
---|
| 676 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 677 | +// doc.getStyle(initStyles[i])); |
---|
| 678 | +// } |
---|
| 679 | +// } |
---|
| 680 | +// } catch (BadLocationException ble) |
---|
| 681 | +// { |
---|
| 682 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 683 | +// } |
---|
648 | 684 | |
---|
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; |
---|
| 685 | + return new JTextPane(); // textPane; |
---|
677 | 686 | } |
---|
678 | 687 | |
---|
679 | 688 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
943 | 952 | |
---|
944 | 953 | void SetupUI2(ObjEditor oe) |
---|
945 | 954 | { |
---|
946 | | -// oe.aConstraints.weightx = 0; |
---|
947 | | -// oe.aConstraints.weighty = 0; |
---|
948 | | -// oe.aConstraints.gridx = 0; |
---|
949 | | -// oe.aConstraints.gridy = 0; |
---|
950 | 955 | //SetupName(oe); |
---|
951 | 956 | |
---|
952 | 957 | namePanel = new cGridBag(); |
---|
.. | .. |
---|
963 | 968 | setupPanel = new cGridBag().setVertical(false); |
---|
964 | 969 | |
---|
965 | 970 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
966 | | - link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master); |
---|
| 971 | + liveCB.setToolTipText("Animate object"); |
---|
967 | 972 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 973 | + hideCB.setToolTipText("Hide object"); |
---|
968 | 974 | // Return(); |
---|
969 | 975 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
970 | | - rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind); |
---|
971 | | - randomCB = AddCheckBox(setupPanel, "Rand", copy.random); |
---|
| 976 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 977 | + |
---|
| 978 | + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 979 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 980 | + |
---|
| 981 | + randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
| 982 | + randomCB.setToolTipText("Option for switch node"); |
---|
972 | 983 | |
---|
| 984 | + if (Globals.ADVANCED) |
---|
| 985 | + { |
---|
| 986 | + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 987 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 988 | + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 989 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 990 | + } |
---|
| 991 | + |
---|
973 | 992 | oe.ctrlPanel.add(setupPanel); |
---|
974 | 993 | oe.ctrlPanel.Return(); |
---|
975 | 994 | |
---|
976 | 995 | commandsPanel = new cGridBag().setVertical(false); |
---|
977 | 996 | |
---|
978 | 997 | resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 998 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
979 | 999 | stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1000 | + stepButton.setToolTipText("Step one frame"); |
---|
980 | 1001 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
981 | 1002 | // stepAllButton = AddButton(oe, "Step All"); |
---|
982 | | - speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup); |
---|
983 | 1003 | // Return(); |
---|
984 | 1004 | slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1005 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
985 | 1006 | fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1007 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
986 | 1008 | remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1009 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
987 | 1010 | |
---|
988 | 1011 | oe.ctrlPanel.add(commandsPanel); |
---|
989 | 1012 | oe.ctrlPanel.Return(); |
---|
.. | .. |
---|
1436 | 1459 | |
---|
1437 | 1460 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1438 | 1461 | |
---|
1439 | | - editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints); |
---|
| 1462 | + editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1463 | + createMaterialButton.setToolTipText("Create material"); |
---|
1440 | 1464 | |
---|
1441 | 1465 | /* |
---|
1442 | 1466 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1443 | 1467 | */ |
---|
1444 | 1468 | |
---|
1445 | | - editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints); |
---|
1446 | | - editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints); |
---|
| 1469 | + editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1470 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1471 | + |
---|
| 1472 | + editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
1447 | 1473 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1448 | 1474 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1449 | 1475 | |
---|
| 1476 | + editBar.preferredHeight = 15; |
---|
| 1477 | + |
---|
1450 | 1478 | panel.add(editBar); |
---|
1451 | 1479 | |
---|
1452 | 1480 | /**/ |
---|
.. | .. |
---|
2969 | 2997 | if (event.getSource() == randomCB) |
---|
2970 | 2998 | { |
---|
2971 | 2999 | copy.random ^= true; |
---|
| 3000 | + objEditor.refreshContents(); |
---|
2972 | 3001 | return; |
---|
2973 | 3002 | } |
---|
2974 | 3003 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3192 | 3221 | if (!Globals.ANIMATION) |
---|
3193 | 3222 | { |
---|
3194 | 3223 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3195 | | - browser.show(); |
---|
| 3224 | + browser.setVisible(true); |
---|
3196 | 3225 | String filename = browser.getFile(); |
---|
3197 | 3226 | if (filename != null && filename.length() > 0) |
---|
3198 | 3227 | { |
---|
.. | .. |
---|
4425 | 4454 | JSplitPane mainPanel; |
---|
4426 | 4455 | JScrollPane scrollpane; |
---|
4427 | 4456 | JPanel toolbarPanel; |
---|
4428 | | - JPanel treePanel; |
---|
| 4457 | + cGridBag treePanel; |
---|
4429 | 4458 | JPanel radioPanel; |
---|
4430 | 4459 | ButtonGroup buttonGroup; |
---|
4431 | 4460 | cGridBag ctrlPanel; |
---|