.. | .. |
---|
150 | 150 | |
---|
151 | 151 | void SetupMenu2(GroupEditor oe) |
---|
152 | 152 | { |
---|
| 153 | + oe.jTree = new cTree(); |
---|
| 154 | + |
---|
153 | 155 | Menu menu; |
---|
154 | 156 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
155 | 157 | //editItem = menu.add(new MenuItem("Edit")); |
---|
.. | .. |
---|
160 | 162 | // redoItem = menu.add(new MenuItem("Redo")); |
---|
161 | 163 | // redoItem.addActionListener(this); |
---|
162 | 164 | // menu.add("-"); |
---|
163 | | - duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
| 165 | + duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
164 | 166 | duplicateItem.addActionListener(this); |
---|
165 | 167 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
166 | 168 | cloneItem.addActionListener(this); |
---|
.. | .. |
---|
334 | 336 | frontItem.addActionListener(this); |
---|
335 | 337 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
336 | 338 | compositeItem.addActionListener(this); |
---|
| 339 | + |
---|
| 340 | + if (Globals.ADVANCED) |
---|
| 341 | + { |
---|
337 | 342 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
338 | 343 | hideItem.addActionListener(this); |
---|
| 344 | + } |
---|
339 | 345 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
340 | 346 | ungroupItem.addActionListener(this); |
---|
| 347 | + |
---|
341 | 348 | menu.add("-"); |
---|
| 349 | + |
---|
342 | 350 | randomItem = menu.add(new MenuItem("Switch node")); |
---|
343 | 351 | randomItem.addActionListener(this); |
---|
| 352 | + if (Globals.ADVANCED) |
---|
| 353 | + { |
---|
344 | 354 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
345 | 355 | switchGeoItem.addActionListener(this); |
---|
346 | 356 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
.. | .. |
---|
348 | 358 | morphItem = menu.add(new MenuItem("Morph Group")); |
---|
349 | 359 | morphItem.addActionListener(this); |
---|
350 | 360 | |
---|
351 | | - if (Globals.ADVANCED) |
---|
352 | | - { |
---|
353 | 361 | menu.add("-"); |
---|
354 | 362 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
355 | 363 | physicsItem.addActionListener(this); |
---|
.. | .. |
---|
580 | 588 | //minButton.setToolTipText("Minimize window"); |
---|
581 | 589 | //minButton.addActionListener(this); |
---|
582 | 590 | |
---|
583 | | - oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 591 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
584 | 592 | maxButton.setToolTipText("Maximize window"); |
---|
585 | 593 | maxButton.addActionListener(this); |
---|
586 | 594 | |
---|
587 | | - oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 595 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
588 | 596 | fullButton.setToolTipText("Full-screen window"); |
---|
589 | 597 | fullButton.addActionListener(this); |
---|
590 | 598 | |
---|
591 | | - oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 599 | + oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
592 | 600 | undoButton.setToolTipText("Undo changes"); |
---|
593 | 601 | undoButton.addActionListener(this); |
---|
594 | 602 | |
---|
595 | | - oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 603 | + oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
596 | 604 | redoButton.setToolTipText("Redo changes"); |
---|
597 | 605 | redoButton.addActionListener(this); |
---|
598 | 606 | |
---|
599 | | - oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 607 | + oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
600 | 608 | saveButton.setToolTipText("Save changes"); |
---|
601 | 609 | saveButton.addActionListener(this); |
---|
602 | 610 | |
---|
603 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 611 | + oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
604 | 612 | liveCB.setToolTipText("Enable animation"); |
---|
605 | 613 | liveCB.addItemListener(this); |
---|
606 | 614 | |
---|
607 | | - oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 615 | + oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
608 | 616 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
609 | 617 | oneStepButton.addActionListener(this); |
---|
610 | 618 | |
---|
611 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 619 | + oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
612 | 620 | fastCB.setToolTipText("Fast mode"); |
---|
613 | 621 | fastCB.addItemListener(this); |
---|
614 | 622 | |
---|
615 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 623 | + oe.toolboxPanel.Return(); |
---|
| 624 | + |
---|
| 625 | + oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
616 | 626 | trackCB.setToolTipText("Enable tracking"); |
---|
617 | 627 | trackCB.addItemListener(this); |
---|
618 | 628 | |
---|
619 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 629 | + oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
620 | 630 | screenfitButton.setToolTipText("Screen fit"); |
---|
621 | 631 | screenfitButton.addActionListener(this); |
---|
622 | 632 | |
---|
.. | .. |
---|
630 | 640 | snapobjectButton.setToolTipText("Snap Object"); |
---|
631 | 641 | } |
---|
632 | 642 | |
---|
633 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
| 643 | + oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 644 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
635 | 645 | flashSelectionButton.addActionListener(this); |
---|
636 | 646 | |
---|
637 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 647 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
638 | 648 | |
---|
639 | 649 | oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
640 | 650 | twoButton.setToolTipText("Show center view only"); |
---|
641 | 651 | twoButton.addActionListener(this); |
---|
| 652 | + this.fullscreenLayout = twoButton; |
---|
| 653 | + |
---|
642 | 654 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
643 | 655 | fourButton.addActionListener(this); |
---|
644 | 656 | fourButton.setToolTipText("Show left panel only"); |
---|
.. | .. |
---|
653 | 665 | sevenButton.addActionListener(this); |
---|
654 | 666 | // |
---|
655 | 667 | |
---|
656 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 668 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
657 | 669 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
658 | 670 | rootButton.addActionListener(this); |
---|
659 | 671 | |
---|
660 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 672 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
661 | 673 | closeButton.setToolTipText("Close tab"); |
---|
662 | 674 | closeButton.addActionListener(this); |
---|
663 | 675 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
664 | 676 | //clearButton.addActionListener(this); |
---|
665 | | - |
---|
| 677 | + |
---|
| 678 | + // INSERT |
---|
| 679 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 680 | + gridButton.setToolTipText("Create grid"); |
---|
| 681 | + gridButton.addActionListener(this); |
---|
| 682 | + |
---|
| 683 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 684 | + boxButton.setToolTipText("Create box"); |
---|
| 685 | + boxButton.addActionListener(this); |
---|
| 686 | + |
---|
| 687 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 688 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 689 | + sphereButton.addActionListener(this); |
---|
| 690 | + |
---|
| 691 | + oe.toolboxPanel.Return(); |
---|
| 692 | + |
---|
| 693 | + oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 694 | + coneButton.setToolTipText("Create cone"); |
---|
| 695 | + coneButton.addActionListener(this); |
---|
| 696 | + |
---|
| 697 | + oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 698 | + torusButton.setToolTipText("Create torus"); |
---|
| 699 | + torusButton.addActionListener(this); |
---|
| 700 | + |
---|
| 701 | + oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 702 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 703 | + superButton.addActionListener(this); |
---|
| 704 | + |
---|
| 705 | + if (Globals.ADVANCED) |
---|
| 706 | + { |
---|
| 707 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 708 | + kleinButton.setToolTipText("Create Klein bottle"); |
---|
| 709 | + kleinButton.addActionListener(this); |
---|
| 710 | + } |
---|
| 711 | + |
---|
| 712 | + oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 713 | + particlesButton.setToolTipText("Create particle system"); |
---|
| 714 | + particlesButton.addActionListener(this); |
---|
| 715 | + |
---|
| 716 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 717 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 718 | + overlayButton.addActionListener(this); |
---|
| 719 | + |
---|
| 720 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 721 | + lightButton.setToolTipText("Create light"); |
---|
| 722 | + lightButton.addActionListener(this); |
---|
| 723 | + |
---|
| 724 | + // EDIT panel |
---|
666 | 725 | editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
667 | 726 | editButton.setToolTipText("Edit selection"); |
---|
668 | 727 | editButton.addActionListener(this); |
---|
.. | .. |
---|
703 | 762 | |
---|
704 | 763 | JScrollPane jSP; |
---|
705 | 764 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
706 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 765 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
707 | 766 | ResetModel(); |
---|
708 | 767 | |
---|
709 | 768 | oe.treePanel.add(jSPPanel); |
---|
.. | .. |
---|
815 | 874 | shadowCB.setToolTipText("Compute shadows when live"); |
---|
816 | 875 | shadowCB.addItemListener(this); |
---|
817 | 876 | |
---|
| 877 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 878 | + autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 879 | + autosaveCB.addItemListener(this); |
---|
| 880 | + |
---|
818 | 881 | if (Globals.ADVANCED) |
---|
819 | 882 | { |
---|
820 | 883 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
.. | .. |
---|
864 | 927 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
865 | 928 | } |
---|
866 | 929 | |
---|
867 | | - JCheckBox liveCB; |
---|
868 | | - JCheckBox supportCB; |
---|
869 | | - JCheckBox localCB; |
---|
870 | | - JCheckBox crowdCB; |
---|
871 | | - JCheckBox smoothCB; |
---|
872 | | - JCheckBox fastCB; |
---|
873 | | - JCheckBox slowCB; |
---|
874 | | - JCheckBox boxCB; |
---|
875 | | - JCheckBox zoomBoxCB; |
---|
876 | | - JCheckBox trackCB; |
---|
877 | | - JCheckBox smoothfocusCB; |
---|
| 930 | + cToggleButton liveCB; |
---|
| 931 | + cCheckBox supportCB; |
---|
| 932 | + cCheckBox localCB; |
---|
| 933 | + cCheckBox crowdCB; |
---|
| 934 | + cCheckBox smoothCB; |
---|
| 935 | + cToggleButton fastCB; |
---|
| 936 | + cCheckBox slowCB; |
---|
| 937 | + cCheckBox boxCB; |
---|
| 938 | + cCheckBox zoomBoxCB; |
---|
| 939 | + cToggleButton trackCB; |
---|
| 940 | + cCheckBox smoothfocusCB; |
---|
878 | 941 | // JCheckBox speakerMocapCB; |
---|
879 | | - JCheckBox speakerCameraCB; |
---|
880 | | - JCheckBox speakerFocusCB; |
---|
881 | | - JCheckBox debugCB; |
---|
| 942 | + cCheckBox speakerCameraCB; |
---|
| 943 | + cCheckBox speakerFocusCB; |
---|
| 944 | + cCheckBox debugCB; |
---|
882 | 945 | |
---|
883 | | - JCheckBox oeilCB; |
---|
884 | | - JCheckBox shadowCB; |
---|
885 | | - JCheckBox lookAtCB; |
---|
| 946 | + cCheckBox oeilCB; |
---|
| 947 | + cCheckBox shadowCB; |
---|
| 948 | + cCheckBox autosaveCB; |
---|
| 949 | + cCheckBox lookAtCB; |
---|
886 | 950 | |
---|
887 | 951 | // static int COLOR = 1; |
---|
888 | 952 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
890 | 954 | |
---|
891 | 955 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
892 | 956 | |
---|
893 | | - JCheckBox colorCB; |
---|
894 | | - JCheckBox materialCB; |
---|
895 | | - JCheckBox textureCB; |
---|
| 957 | + cCheckBox colorCB; |
---|
| 958 | + cCheckBox materialCB; |
---|
| 959 | + cCheckBox textureCB; |
---|
896 | 960 | |
---|
897 | 961 | public void itemStateChanged(ItemEvent e) |
---|
898 | 962 | { |
---|
.. | .. |
---|
989 | 1053 | { |
---|
990 | 1054 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
991 | 1055 | } |
---|
| 1056 | + else if(e.getSource() == autosaveCB) |
---|
| 1057 | + { |
---|
| 1058 | + Globals.SAVEONMAKE ^= true; |
---|
| 1059 | + } |
---|
992 | 1060 | else if(e.getSource() == lookAtCB) |
---|
993 | 1061 | { |
---|
994 | 1062 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
1005 | 1073 | |
---|
1006 | 1074 | /**/ |
---|
1007 | 1075 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
1008 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1076 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1077 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
1009 | 1078 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
1010 | 1079 | // We can't move the root node or an empty selection |
---|
1011 | 1080 | return; |
---|
.. | .. |
---|
1129 | 1198 | return; |
---|
1130 | 1199 | } |
---|
1131 | 1200 | |
---|
1132 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
1133 | | - { |
---|
| 1201 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1202 | +// { |
---|
1134 | 1203 | loadClipboard(true); |
---|
1135 | 1204 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
1136 | 1205 | pasteInto(false, false); |
---|
1137 | | - } else { |
---|
1138 | | - loadClipboard(false); |
---|
1139 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1140 | | - pasteInto(false, false); // true); // ??? |
---|
1141 | | - } |
---|
| 1206 | +// } else { |
---|
| 1207 | +// loadClipboard(false); |
---|
| 1208 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1209 | +// pasteInto(false, false); // true); // ??? |
---|
| 1210 | +// } |
---|
1142 | 1211 | } |
---|
1143 | 1212 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1144 | 1213 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1730 | 1799 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1731 | 1800 | objEditor.cameraView.repaint(); |
---|
1732 | 1801 | } else |
---|
1733 | | - if (source == rectoidItem) |
---|
| 1802 | + if (source == rectoidItem || source == boxButton) |
---|
1734 | 1803 | { |
---|
1735 | 1804 | makeSomething(new Box()); |
---|
1736 | 1805 | } else |
---|
1737 | | - if (source == particleItem) |
---|
| 1806 | + if (source == particleItem || source == particlesButton) |
---|
1738 | 1807 | { |
---|
1739 | 1808 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1740 | 1809 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1813 | 1882 | |
---|
1814 | 1883 | makeSomething(obj); |
---|
1815 | 1884 | } else |
---|
1816 | | - if (source == gridItem) |
---|
| 1885 | + if (source == gridItem || source == gridButton) |
---|
1817 | 1886 | { |
---|
1818 | 1887 | makeSomething(new Grid()); |
---|
1819 | 1888 | } else |
---|
1820 | | - if (source == ellipsoidItem) |
---|
| 1889 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1821 | 1890 | { |
---|
1822 | 1891 | makeSomething(new Sphere()); |
---|
1823 | 1892 | } else |
---|
1824 | | - if (source == coneItem) |
---|
| 1893 | + if (source == coneItem || source == coneButton) |
---|
1825 | 1894 | { |
---|
1826 | 1895 | makeSomething(new Cone()); |
---|
1827 | 1896 | } else |
---|
1828 | | - if (source == torusItem) |
---|
| 1897 | + if (source == torusItem || source == torusButton) |
---|
1829 | 1898 | { |
---|
1830 | 1899 | makeSomething(new Torus()); |
---|
1831 | 1900 | } else |
---|
1832 | | - if (source == superItem) |
---|
| 1901 | + if (source == superItem || source == superButton) |
---|
1833 | 1902 | { |
---|
1834 | 1903 | makeSomething(new Superellipsoid()); |
---|
1835 | 1904 | } else |
---|
1836 | | - if (source == kleinItem) |
---|
| 1905 | + if (source == kleinItem || source == kleinButton) |
---|
1837 | 1906 | { |
---|
1838 | 1907 | makeSomething(new Klein()); |
---|
1839 | 1908 | } else |
---|
.. | .. |
---|
1853 | 1922 | { |
---|
1854 | 1923 | makeSomething(new BezierSurface()); |
---|
1855 | 1924 | } else |
---|
1856 | | - if (source == overlayItem) |
---|
| 1925 | + if (source == overlayItem || source == overlayButton) |
---|
1857 | 1926 | { |
---|
1858 | 1927 | /* |
---|
1859 | 1928 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1901 | 1970 | s.setup(); |
---|
1902 | 1971 | makeSomething(s); |
---|
1903 | 1972 | } else |
---|
1904 | | - if (source == lightItem) |
---|
| 1973 | + if (source == lightItem || source == lightButton) |
---|
1905 | 1974 | { |
---|
1906 | 1975 | makeSomething(new Light()); |
---|
1907 | 1976 | } else |
---|
.. | .. |
---|
2587 | 2656 | { |
---|
2588 | 2657 | CastShadow(2); |
---|
2589 | 2658 | } else |
---|
2590 | | - if (source == ungroupItem) |
---|
| 2659 | + if (source == ungroupItem || source == ungroupButton) |
---|
2591 | 2660 | { |
---|
2592 | 2661 | //ungroup(); |
---|
2593 | 2662 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2925 | 2994 | if (source == twoButton) |
---|
2926 | 2995 | { |
---|
2927 | 2996 | radio.layout = twoButton; |
---|
| 2997 | + |
---|
| 2998 | + if (CameraPane.FULLSCREEN) |
---|
| 2999 | + fullscreenLayout = radio.layout; |
---|
| 3000 | + |
---|
2928 | 3001 | // bug |
---|
2929 | 3002 | //gridPanel.setDividerLocation(1.0); |
---|
2930 | 3003 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2980 | 3053 | { |
---|
2981 | 3054 | radio.layout = threeButton; |
---|
2982 | 3055 | |
---|
| 3056 | + if (CameraPane.FULLSCREEN) |
---|
| 3057 | + fullscreenLayout = radio.layout; |
---|
| 3058 | + |
---|
2983 | 3059 | // bigThree.remove(scenePanel); |
---|
2984 | 3060 | // bigThree.remove(centralPanel); |
---|
2985 | 3061 | // bigThree.remove(XYZPanel); |
---|
.. | .. |
---|
3018 | 3094 | { |
---|
3019 | 3095 | radio.layout = fourButton; |
---|
3020 | 3096 | |
---|
| 3097 | + if (CameraPane.FULLSCREEN) |
---|
| 3098 | + fullscreenLayout = radio.layout; |
---|
| 3099 | + |
---|
3021 | 3100 | // bigThree.remove(scenePanel); |
---|
3022 | 3101 | // bigThree.remove(centralPanel); |
---|
3023 | 3102 | // bigThree.remove(XYZPanel); |
---|
.. | .. |
---|
3054 | 3133 | if (source == sixButton) |
---|
3055 | 3134 | { |
---|
3056 | 3135 | radio.layout = sixButton; |
---|
| 3136 | + |
---|
| 3137 | + if (CameraPane.FULLSCREEN) |
---|
| 3138 | + fullscreenLayout = radio.layout; |
---|
3057 | 3139 | |
---|
3058 | 3140 | // bigThree.remove(scenePanel); |
---|
3059 | 3141 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3092 | 3174 | if (source == sevenButton) |
---|
3093 | 3175 | { |
---|
3094 | 3176 | radio.layout = sevenButton; |
---|
| 3177 | + |
---|
| 3178 | + if (CameraPane.FULLSCREEN) |
---|
| 3179 | + fullscreenLayout = radio.layout; |
---|
3095 | 3180 | |
---|
3096 | 3181 | // bigThree.remove(scenePanel); |
---|
3097 | 3182 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3159 | 3244 | buttonGroup.remove(ab); |
---|
3160 | 3245 | radioPanel.remove(ab); |
---|
3161 | 3246 | |
---|
3162 | | - ab.GetObject().editWindow = null; |
---|
| 3247 | + //ab.GetObject().editWindow = null; |
---|
| 3248 | + ab.GetObject().manipWindow = null; |
---|
3163 | 3249 | // ab.GetObject().objectUI = null; // ????????? |
---|
3164 | 3250 | |
---|
3165 | 3251 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
.. | .. |
---|
3273 | 3359 | |
---|
3274 | 3360 | // fix "+" issue |
---|
3275 | 3361 | //group.editWindow = this; |
---|
| 3362 | + group.manipWindow = this; |
---|
3276 | 3363 | |
---|
3277 | 3364 | /* |
---|
3278 | 3365 | currentLayout = radio.layout; |
---|
.. | .. |
---|
4358 | 4445 | { |
---|
4359 | 4446 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4360 | 4447 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4361 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4448 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4362 | 4449 | |
---|
4363 | 4450 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4364 | 4451 | if(elem != group || !newWindow) |
---|
.. | .. |
---|
4595 | 4682 | |
---|
4596 | 4683 | if (cut) |
---|
4597 | 4684 | { |
---|
| 4685 | + if (Globals.SAVEONMAKE) |
---|
4598 | 4686 | Save(); |
---|
4599 | 4687 | //int indices[] = jList.getSelectedIndices(); |
---|
4600 | 4688 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
5321 | 5409 | cButton saveButton; |
---|
5322 | 5410 | cButton oneStepButton; |
---|
5323 | 5411 | |
---|
| 5412 | + cButton groupButton; |
---|
| 5413 | + cButton ungroupButton; |
---|
| 5414 | + cButton compositeButton; |
---|
| 5415 | + |
---|
| 5416 | + cButton gridButton; |
---|
| 5417 | + cButton boxButton; |
---|
| 5418 | + cButton sphereButton; |
---|
| 5419 | + cButton coneButton; |
---|
| 5420 | + cButton torusButton; |
---|
| 5421 | + cButton superButton; |
---|
| 5422 | + cButton kleinButton; |
---|
| 5423 | + cButton particlesButton; |
---|
| 5424 | + cButton overlayButton; |
---|
| 5425 | + cButton lightButton; |
---|
| 5426 | + |
---|
5324 | 5427 | cButton screenfitButton; |
---|
5325 | 5428 | cButton screenfitpointButton; |
---|
5326 | 5429 | cButton snapobjectButton; |
---|
.. | .. |
---|
5345 | 5448 | private MenuItem cutItem; |
---|
5346 | 5449 | private MenuItem undoItem; |
---|
5347 | 5450 | private MenuItem redoItem; |
---|
5348 | | - private MenuItem duplicateItem; |
---|
| 5451 | + private JMenuItem duplicateItem; |
---|
5349 | 5452 | private MenuItem cloneItem; |
---|
5350 | 5453 | private MenuItem cloneSupportItem; |
---|
5351 | 5454 | private MenuItem overwriteGeoItem; |
---|