.. | .. |
---|
359 | 359 | objectPanel = new JTabbedPane(); |
---|
360 | 360 | toolbarPanel = new JPanel(); |
---|
361 | 361 | toolbarPanel.setName("Toolbar"); |
---|
362 | | - treePanel = new JPanel(); |
---|
| 362 | + treePanel = new cGridBag(); |
---|
363 | 363 | treePanel.setName("Tree"); |
---|
364 | 364 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
365 | 365 | ctrlPanel.setName("Edit"); |
---|
.. | .. |
---|
367 | 367 | materialPanel.setName("Material"); |
---|
368 | 368 | /*JTextPane*/ |
---|
369 | 369 | infoarea = createTextPane(); |
---|
| 370 | + doc = infoarea.getStyledDocument(); |
---|
| 371 | + |
---|
370 | 372 | infoarea.setEditable(true); |
---|
371 | 373 | SetText(); |
---|
372 | 374 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
373 | 375 | // infoarea.setOpaque(false); |
---|
374 | 376 | // //infoarea.setForeground(textcolor); |
---|
375 | | - infoarea.setLineWrap(true); |
---|
376 | | - infoarea.setWrapStyleWord(true); |
---|
| 377 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 378 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
377 | 379 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
378 | 380 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
379 | 381 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
384 | 386 | mainPanel.setName("Main"); |
---|
385 | 387 | mainPanel.setContinuousLayout(true); |
---|
386 | 388 | mainPanel.setOneTouchExpandable(true); |
---|
387 | | - mainPanel.setDividerLocation(1.0); |
---|
388 | 389 | mainPanel.setDividerSize(9); |
---|
389 | | - mainPanel.setResizeWeight(0); |
---|
| 390 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 391 | + mainPanel.setResizeWeight(0.5); |
---|
390 | 392 | |
---|
391 | 393 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
392 | 394 | //mainPanel.setLayout(new GridBagLayout()); |
---|
393 | 395 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
394 | | - treePanel.setLayout(new GridBagLayout()); |
---|
| 396 | +// treePanel.setLayout(new GridBagLayout()); |
---|
395 | 397 | //ctrlPanel.setLayout(new GridBagLayout()); |
---|
396 | 398 | //materialPanel.setLayout(new GridBagLayout()); |
---|
397 | 399 | |
---|
.. | .. |
---|
432 | 434 | static String newline = "\n"; |
---|
433 | 435 | protected static final String buttonString = "JButton"; |
---|
434 | 436 | StyledDocument doc; |
---|
435 | | - JTextArea infoarea; |
---|
| 437 | + JTextPane infoarea; |
---|
436 | 438 | |
---|
437 | 439 | void ClearInfo() |
---|
438 | 440 | { |
---|
.. | .. |
---|
499 | 501 | } |
---|
500 | 502 | |
---|
501 | 503 | if (full) |
---|
502 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 504 | + { |
---|
| 505 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 506 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 507 | + } |
---|
503 | 508 | |
---|
504 | 509 | if (sel.bRep != null) |
---|
505 | 510 | { |
---|
.. | .. |
---|
597 | 602 | { |
---|
598 | 603 | CameraPane.pointflow = (PointFlow) sel; |
---|
599 | 604 | } |
---|
| 605 | + |
---|
| 606 | + si.SendInfo("_____________________", "regular"); |
---|
| 607 | + si.SendInfo("", "regular"); |
---|
600 | 608 | } |
---|
601 | 609 | } |
---|
602 | 610 | |
---|
.. | .. |
---|
628 | 636 | cameraView.ToggleFullScreen(); |
---|
629 | 637 | } |
---|
630 | 638 | |
---|
631 | | - private JTextArea createTextPane() |
---|
| 639 | + private JTextPane createTextPane() |
---|
632 | 640 | { |
---|
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 | | - }; |
---|
| 641 | +// TEXTAREA String[] initString = |
---|
| 642 | +// { |
---|
| 643 | +// "This is an editable JTextPane, ", //regular |
---|
| 644 | +// "another ", //italic |
---|
| 645 | +// "styled ", //bold |
---|
| 646 | +// "text ", //small |
---|
| 647 | +// "component, ", //large |
---|
| 648 | +// "which supports embedded components..." + newline,//regular |
---|
| 649 | +// " " + newline, //button |
---|
| 650 | +// "...and embedded icons..." + newline, //regular |
---|
| 651 | +// " ", //icon |
---|
| 652 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 653 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 654 | +// + "cover methods for interacting with those objects." |
---|
| 655 | +// }; |
---|
| 656 | +// |
---|
| 657 | +// String[] initStyles = |
---|
| 658 | +// { |
---|
| 659 | +// "regular", "italic", "bold", "small", "large", |
---|
| 660 | +// "regular", "button", "regular", "icon", |
---|
| 661 | +// "regular" |
---|
| 662 | +// }; |
---|
| 663 | +// |
---|
| 664 | +// JTextPane textPane = new JTextPane(); |
---|
| 665 | +// textPane.setEditable(true); |
---|
| 666 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 667 | +// addStylesToDocument(doc); |
---|
| 668 | +// |
---|
| 669 | +// try |
---|
| 670 | +// { |
---|
| 671 | +// for (int j = 0; j < 2; j++) |
---|
| 672 | +// { |
---|
| 673 | +// for (int i = 0; i < initString.length; i++) |
---|
| 674 | +// { |
---|
| 675 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 676 | +// doc.getStyle(initStyles[i])); |
---|
| 677 | +// } |
---|
| 678 | +// } |
---|
| 679 | +// } catch (BadLocationException ble) |
---|
| 680 | +// { |
---|
| 681 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 682 | +// } |
---|
648 | 683 | |
---|
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; |
---|
| 684 | + return new JTextPane(); // textPane; |
---|
677 | 685 | } |
---|
678 | 686 | |
---|
679 | 687 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
943 | 951 | |
---|
944 | 952 | void SetupUI2(ObjEditor oe) |
---|
945 | 953 | { |
---|
946 | | -// oe.aConstraints.weightx = 0; |
---|
947 | | -// oe.aConstraints.weighty = 0; |
---|
948 | | -// oe.aConstraints.gridx = 0; |
---|
949 | | -// oe.aConstraints.gridy = 0; |
---|
950 | 954 | //SetupName(oe); |
---|
951 | 955 | |
---|
952 | 956 | namePanel = new cGridBag(); |
---|
.. | .. |
---|
963 | 967 | setupPanel = new cGridBag().setVertical(false); |
---|
964 | 968 | |
---|
965 | 969 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
966 | | - link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master); |
---|
| 970 | + if (Globals.ADVANCED) |
---|
| 971 | + link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master); |
---|
967 | 972 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
968 | 973 | // Return(); |
---|
969 | 974 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
.. | .. |
---|
1436 | 1441 | |
---|
1437 | 1442 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1438 | 1443 | |
---|
1439 | | - editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints); |
---|
| 1444 | + editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1445 | + createMaterialButton.setToolTipText("Create material"); |
---|
1440 | 1446 | |
---|
1441 | 1447 | /* |
---|
1442 | 1448 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1443 | 1449 | */ |
---|
1444 | 1450 | |
---|
1445 | | - editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints); |
---|
1446 | | - editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints); |
---|
| 1451 | + editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1452 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1453 | + |
---|
| 1454 | + editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
1447 | 1455 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1448 | 1456 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1449 | 1457 | |
---|
| 1458 | + editBar.preferredHeight = 15; |
---|
| 1459 | + |
---|
1450 | 1460 | panel.add(editBar); |
---|
1451 | 1461 | |
---|
1452 | 1462 | /**/ |
---|
.. | .. |
---|
3192 | 3202 | if (!Globals.ANIMATION) |
---|
3193 | 3203 | { |
---|
3194 | 3204 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3195 | | - browser.show(); |
---|
| 3205 | + browser.setVisible(true); |
---|
3196 | 3206 | String filename = browser.getFile(); |
---|
3197 | 3207 | if (filename != null && filename.length() > 0) |
---|
3198 | 3208 | { |
---|
.. | .. |
---|
4425 | 4435 | JSplitPane mainPanel; |
---|
4426 | 4436 | JScrollPane scrollpane; |
---|
4427 | 4437 | JPanel toolbarPanel; |
---|
4428 | | - JPanel treePanel; |
---|
| 4438 | + cGridBag treePanel; |
---|
4429 | 4439 | JPanel radioPanel; |
---|
4430 | 4440 | ButtonGroup buttonGroup; |
---|
4431 | 4441 | cGridBag ctrlPanel; |
---|