.. | .. |
---|
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); |
---|
.. | .. |
---|
202 | 204 | //zBufferItem.addActionListener(this); |
---|
203 | 205 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
204 | 206 | //normalLensItem.addActionListener(this); |
---|
205 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
206 | | - revertCameraItem.addActionListener(this); |
---|
| 207 | + cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint")); |
---|
| 208 | + restoreCameraItem.addActionListener(this); |
---|
207 | 209 | |
---|
208 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
209 | | - toggleFullScreenItem.addItemListener(this); |
---|
210 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
211 | | - cameraMenu.add("-"); |
---|
212 | | - |
---|
213 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
214 | | - toggleTextureItem.addItemListener(this); |
---|
215 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
216 | | - |
---|
217 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
218 | | - toggleSwitchItem.addItemListener(this); |
---|
219 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
| 210 | +// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 211 | +// toggleFullScreenItem.addItemListener(this); |
---|
| 212 | +// toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
| 213 | +// cameraMenu.add("-"); |
---|
| 214 | +// |
---|
| 215 | +// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
| 216 | +// toggleTextureItem.addItemListener(this); |
---|
| 217 | +// toggleTextureItem.setState(CameraPane.textureon); |
---|
| 218 | +// |
---|
| 219 | +// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
| 220 | +// toggleSwitchItem.addItemListener(this); |
---|
| 221 | +// toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
220 | 222 | |
---|
221 | 223 | cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
222 | 224 | toggleHandleItem.addItemListener(this); |
---|
.. | .. |
---|
273 | 275 | { |
---|
274 | 276 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
275 | 277 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
276 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 278 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
277 | 279 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
278 | 280 | oe.cameraMenu.add("-"); |
---|
279 | 281 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
281 | 283 | editLeafItem.addActionListener(this); |
---|
282 | 284 | lookAtItem.addActionListener(this); |
---|
283 | 285 | //lookFromItem.addActinoListener(this); |
---|
284 | | - //switchItem.addActionListener(this); |
---|
| 286 | + //switchViewItem.addActionListener(this); |
---|
285 | 287 | } |
---|
286 | 288 | |
---|
287 | 289 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
326 | 328 | } |
---|
327 | 329 | |
---|
328 | 330 | oe.menuBar.add(menu = new Menu("Group")); |
---|
329 | | - grabItem = menu.add(new MenuItem("Grab")); |
---|
330 | | - grabItem.addActionListener(this); |
---|
| 331 | +// grabItem = menu.add(new MenuItem("Grab")); |
---|
| 332 | +// grabItem.addActionListener(this); |
---|
331 | 333 | backItem = menu.add(new MenuItem("Back")); |
---|
332 | 334 | backItem.addActionListener(this); |
---|
333 | 335 | frontItem = menu.add(new MenuItem("Front")); |
---|
334 | 336 | frontItem.addActionListener(this); |
---|
335 | | - compositeItem = menu.add(new MenuItem("Composite")); |
---|
336 | | - compositeItem.addActionListener(this); |
---|
| 337 | +// compositeItem = menu.add(new MenuItem("Composite")); |
---|
| 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); |
---|
341 | | - menu.add("-"); |
---|
342 | | - randomItem = menu.add(new MenuItem("Switch node")); |
---|
343 | | - randomItem.addActionListener(this); |
---|
| 347 | + |
---|
| 348 | +// menu.add("-"); |
---|
| 349 | +// |
---|
| 350 | +// switchItem = menu.add(new MenuItem("Switch node")); |
---|
| 351 | +// switchItem.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); |
---|
.. | .. |
---|
357 | 365 | frameselectorItem.addActionListener(this); |
---|
358 | 366 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
359 | 367 | scriptNodeItem.addActionListener(this); |
---|
360 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
361 | | - cameraItem.addActionListener(this); |
---|
362 | 368 | } |
---|
363 | 369 | |
---|
364 | 370 | oe.menuBar.add(menu = new Menu("Object")); |
---|
365 | | - textureItem = menu.add(new MenuItem("Texture")); |
---|
366 | | - textureItem.addActionListener(this); |
---|
| 371 | +// textureItem = menu.add(new MenuItem("Texture")); |
---|
| 372 | +// textureItem.addActionListener(this); |
---|
367 | 373 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
368 | 374 | billboardItem.addActionListener(this); |
---|
369 | 375 | csgItem = menu.add(new MenuItem("CSG")); |
---|
.. | .. |
---|
574 | 580 | oe.radioPanel.add(dummyButton); |
---|
575 | 581 | oe.buttonGroup.add(dummyButton); |
---|
576 | 582 | */ |
---|
| 583 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 584 | + |
---|
| 585 | + copyOptionsPanel.preferredHeight = 2; |
---|
| 586 | + |
---|
577 | 587 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
578 | 588 | |
---|
579 | 589 | //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
580 | 590 | //minButton.setToolTipText("Minimize window"); |
---|
581 | 591 | //minButton.addActionListener(this); |
---|
582 | 592 | |
---|
583 | | - oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 593 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
584 | 594 | maxButton.setToolTipText("Maximize window"); |
---|
585 | 595 | maxButton.addActionListener(this); |
---|
586 | 596 | |
---|
587 | | - oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 597 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
588 | 598 | fullButton.setToolTipText("Full-screen window"); |
---|
589 | 599 | fullButton.addActionListener(this); |
---|
590 | 600 | |
---|
591 | | - oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 601 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
| 603 | + restoreCameraButton.addActionListener(this); |
---|
| 604 | + |
---|
| 605 | + copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
592 | 606 | undoButton.setToolTipText("Undo changes"); |
---|
593 | 607 | undoButton.addActionListener(this); |
---|
594 | 608 | |
---|
595 | | - oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 609 | + copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
596 | 610 | redoButton.setToolTipText("Redo changes"); |
---|
597 | 611 | redoButton.addActionListener(this); |
---|
598 | 612 | |
---|
599 | | - oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 613 | + copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
600 | 614 | saveButton.setToolTipText("Save changes"); |
---|
601 | 615 | saveButton.addActionListener(this); |
---|
602 | 616 | |
---|
603 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 617 | + copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
604 | 618 | liveCB.setToolTipText("Enable animation"); |
---|
605 | 619 | liveCB.addItemListener(this); |
---|
606 | 620 | |
---|
607 | | - oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 621 | + copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
608 | 622 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
609 | 623 | oneStepButton.addActionListener(this); |
---|
610 | 624 | |
---|
611 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 625 | + copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
612 | 626 | fastCB.setToolTipText("Fast mode"); |
---|
613 | 627 | fastCB.addItemListener(this); |
---|
614 | 628 | |
---|
615 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
616 | | - trackCB.setToolTipText("Enable tracking"); |
---|
617 | | - trackCB.addItemListener(this); |
---|
618 | | - |
---|
619 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 629 | + //oe.toolboxPanel.Return(); |
---|
| 630 | + |
---|
| 631 | + copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
620 | 632 | screenfitButton.setToolTipText("Screen fit"); |
---|
621 | 633 | screenfitButton.addActionListener(this); |
---|
| 634 | + |
---|
| 635 | +// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 636 | +// trackCB.setToolTipText("Enable tracking"); |
---|
| 637 | +// trackCB.addItemListener(this); |
---|
622 | 638 | |
---|
623 | 639 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
624 | 640 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
630 | 646 | snapobjectButton.setToolTipText("Snap Object"); |
---|
631 | 647 | } |
---|
632 | 648 | |
---|
633 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
635 | | - flashSelectionButton.addActionListener(this); |
---|
636 | | - |
---|
637 | | - oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 649 | + //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
638 | 650 | |
---|
639 | 651 | oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
640 | 652 | twoButton.setToolTipText("Show center view only"); |
---|
641 | 653 | twoButton.addActionListener(this); |
---|
| 654 | + this.fullscreenLayout = twoButton; |
---|
| 655 | + |
---|
642 | 656 | oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
643 | 657 | fourButton.addActionListener(this); |
---|
644 | 658 | fourButton.setToolTipText("Show left panel only"); |
---|
.. | .. |
---|
653 | 667 | sevenButton.addActionListener(this); |
---|
654 | 668 | // |
---|
655 | 669 | |
---|
656 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 670 | + oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
657 | 671 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
658 | 672 | rootButton.addActionListener(this); |
---|
659 | 673 | |
---|
660 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 674 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
661 | 675 | closeButton.setToolTipText("Close tab"); |
---|
662 | 676 | closeButton.addActionListener(this); |
---|
663 | 677 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
664 | 678 | //clearButton.addActionListener(this); |
---|
665 | | - |
---|
| 679 | + |
---|
| 680 | + // INSERT |
---|
| 681 | + oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 682 | + gridButton.setToolTipText("Create grid"); |
---|
| 683 | + gridButton.addActionListener(this); |
---|
| 684 | + |
---|
| 685 | + oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 686 | + boxButton.setToolTipText("Create box"); |
---|
| 687 | + boxButton.addActionListener(this); |
---|
| 688 | + |
---|
| 689 | + oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 690 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 691 | + sphereButton.addActionListener(this); |
---|
| 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.Return(); |
---|
| 717 | + |
---|
| 718 | + oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 719 | + groupButton.setToolTipText("Create group"); |
---|
| 720 | + groupButton.addActionListener(this); |
---|
| 721 | + |
---|
| 722 | + oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 723 | + compositeButton.setToolTipText("Create composite"); |
---|
| 724 | + compositeButton.addActionListener(this); |
---|
| 725 | + |
---|
| 726 | + oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 727 | + switchButton.setToolTipText("Create switch"); |
---|
| 728 | + switchButton.addActionListener(this); |
---|
| 729 | + |
---|
| 730 | + oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 731 | + loopButton.setToolTipText("Create loop"); |
---|
| 732 | + loopButton.addActionListener(this); |
---|
| 733 | + |
---|
| 734 | + oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 735 | + textureButton.setToolTipText("Create texture"); |
---|
| 736 | + textureButton.addActionListener(this); |
---|
| 737 | + |
---|
| 738 | + oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 739 | + overlayButton.setToolTipText("Create overlay"); |
---|
| 740 | + overlayButton.addActionListener(this); |
---|
| 741 | + |
---|
| 742 | + oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 743 | + lightButton.setToolTipText("Create light"); |
---|
| 744 | + lightButton.addActionListener(this); |
---|
| 745 | + |
---|
| 746 | + // EDIT panel |
---|
666 | 747 | editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
667 | 748 | editButton.setToolTipText("Edit selection"); |
---|
668 | 749 | editButton.addActionListener(this); |
---|
.. | .. |
---|
683 | 764 | unselectButton.setToolTipText("Unselect"); |
---|
684 | 765 | unselectButton.addActionListener(this); |
---|
685 | 766 | |
---|
| 767 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 768 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 769 | + flashSelectionButton.addActionListener(this); |
---|
| 770 | + |
---|
686 | 771 | editCommandsPanel.preferredHeight = 1; |
---|
687 | 772 | |
---|
688 | 773 | // oe.treePanel.add(commandsPanel); |
---|
.. | .. |
---|
703 | 788 | |
---|
704 | 789 | JScrollPane jSP; |
---|
705 | 790 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
706 | | - jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
| 791 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
707 | 792 | ResetModel(); |
---|
708 | 793 | |
---|
709 | 794 | oe.treePanel.add(jSPPanel); |
---|
710 | 795 | oe.treePanel.Return(); |
---|
711 | 796 | |
---|
712 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
713 | | - |
---|
714 | | - copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
715 | | - colorCB.setToolTipText("Copy color when dropped"); |
---|
716 | | - colorCB.addItemListener(this); |
---|
717 | | - |
---|
718 | | - copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
719 | | - materialCB.setToolTipText("Copy material when dropped"); |
---|
720 | | - materialCB.addItemListener(this); |
---|
721 | | - |
---|
722 | | - copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
723 | | - textureCB.setToolTipText("Copy texture when dropped"); |
---|
724 | | - textureCB.addItemListener(this); |
---|
725 | | - |
---|
726 | | - copyOptionsPanel.preferredHeight = 1; |
---|
727 | 797 | oe.treePanel.add(copyOptionsPanel); |
---|
728 | 798 | oe.treePanel.Return(); |
---|
729 | 799 | |
---|
.. | .. |
---|
754 | 824 | |
---|
755 | 825 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
756 | 826 | { |
---|
| 827 | + panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 828 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
| 829 | + colorCB.addItemListener(this); |
---|
| 830 | + |
---|
| 831 | + panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 832 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
| 833 | + materialCB.addItemListener(this); |
---|
| 834 | + |
---|
| 835 | + panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 836 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
| 837 | + textureCB.addItemListener(this); |
---|
| 838 | + |
---|
| 839 | + panel.Return(); |
---|
| 840 | + |
---|
757 | 841 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
758 | 842 | boxCB.setToolTipText("Display bounding boxes"); |
---|
759 | 843 | boxCB.addItemListener(this); |
---|
.. | .. |
---|
771 | 855 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
772 | 856 | // localCB.addItemListener(this); |
---|
773 | 857 | |
---|
| 858 | + panel.Return(); |
---|
| 859 | + |
---|
774 | 860 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
775 | 861 | crowdCB.setToolTipText("Used for crowds"); |
---|
776 | 862 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
787 | 873 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
788 | 874 | // speakerMocapCB.addItemListener(this); |
---|
789 | 875 | |
---|
| 876 | + panel.Return(); |
---|
| 877 | + |
---|
790 | 878 | if (false) |
---|
791 | 879 | { |
---|
792 | 880 | // handled in scripts |
---|
.. | .. |
---|
801 | 889 | //constraints.gridy += 1; |
---|
802 | 890 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
803 | 891 | smoothfocusCB.addItemListener(this); |
---|
| 892 | + panel.Return(); |
---|
804 | 893 | } |
---|
805 | 894 | |
---|
806 | 895 | //constraints.gridx += 1; |
---|
807 | 896 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
808 | 897 | // debugCB.addItemListener(this); |
---|
809 | 898 | |
---|
| 899 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 900 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 901 | + trackCB.addItemListener(this); |
---|
| 902 | + |
---|
810 | 903 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
811 | | - oeilCB.setToolTipText("Move camera when tracking target"); |
---|
| 904 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
812 | 905 | oeilCB.addItemListener(this); |
---|
813 | 906 | |
---|
814 | 907 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
815 | 908 | shadowCB.setToolTipText("Compute shadows when live"); |
---|
816 | 909 | shadowCB.addItemListener(this); |
---|
817 | 910 | |
---|
| 911 | + panel.Return(); |
---|
| 912 | + panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints); |
---|
| 913 | + toggleTextureCB.setToolTipText("Load textures"); |
---|
| 914 | + toggleTextureCB.addItemListener(this); |
---|
| 915 | + |
---|
| 916 | + panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
| 917 | + toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 918 | + toggleSwitchCB.addItemListener(this); |
---|
| 919 | + |
---|
| 920 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 921 | + autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 922 | + autosaveCB.addItemListener(this); |
---|
| 923 | + |
---|
| 924 | + panel.Return(); |
---|
818 | 925 | if (Globals.ADVANCED) |
---|
819 | 926 | { |
---|
820 | 927 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
.. | .. |
---|
825 | 932 | } |
---|
826 | 933 | |
---|
827 | 934 | cGridBag fill = new cGridBag(); |
---|
828 | | - |
---|
829 | 935 | fill.preferredHeight = 200; |
---|
| 936 | + cGridBag fill2 = new cGridBag(); |
---|
| 937 | + fill2.preferredHeight = 200; |
---|
| 938 | + cGridBag fill3 = new cGridBag(); |
---|
| 939 | + fill3.preferredHeight = 200; |
---|
830 | 940 | |
---|
831 | 941 | panel.add(fill); |
---|
| 942 | + panel.add(fill2); |
---|
| 943 | + panel.add(fill3); |
---|
832 | 944 | |
---|
833 | 945 | } |
---|
834 | 946 | |
---|
.. | .. |
---|
864 | 976 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
865 | 977 | } |
---|
866 | 978 | |
---|
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; |
---|
| 979 | + cToggleButton liveCB; |
---|
| 980 | + cCheckBox supportCB; |
---|
| 981 | + cCheckBox localCB; |
---|
| 982 | + cCheckBox crowdCB; |
---|
| 983 | + cCheckBox smoothCB; |
---|
| 984 | + cToggleButton fastCB; |
---|
| 985 | + cCheckBox slowCB; |
---|
| 986 | + cCheckBox boxCB; |
---|
| 987 | + cCheckBox zoomBoxCB; |
---|
| 988 | + //cToggleButton trackCB; |
---|
| 989 | + cCheckBox trackCB; |
---|
| 990 | + cCheckBox smoothfocusCB; |
---|
878 | 991 | // JCheckBox speakerMocapCB; |
---|
879 | | - JCheckBox speakerCameraCB; |
---|
880 | | - JCheckBox speakerFocusCB; |
---|
881 | | - JCheckBox debugCB; |
---|
| 992 | + cCheckBox speakerCameraCB; |
---|
| 993 | + cCheckBox speakerFocusCB; |
---|
| 994 | + cCheckBox debugCB; |
---|
882 | 995 | |
---|
883 | | - JCheckBox oeilCB; |
---|
884 | | - JCheckBox shadowCB; |
---|
885 | | - JCheckBox lookAtCB; |
---|
| 996 | + cCheckBox oeilCB; |
---|
| 997 | + cCheckBox shadowCB; |
---|
| 998 | + cCheckBox autosaveCB; |
---|
| 999 | + cCheckBox lookAtCB; |
---|
886 | 1000 | |
---|
887 | 1001 | // static int COLOR = 1; |
---|
888 | 1002 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
890 | 1004 | |
---|
891 | 1005 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
892 | 1006 | |
---|
893 | | - JCheckBox colorCB; |
---|
894 | | - JCheckBox materialCB; |
---|
895 | | - JCheckBox textureCB; |
---|
| 1007 | + cCheckBox colorCB; |
---|
| 1008 | + cCheckBox materialCB; |
---|
| 1009 | + cCheckBox textureCB; |
---|
896 | 1010 | |
---|
897 | 1011 | public void itemStateChanged(ItemEvent e) |
---|
898 | 1012 | { |
---|
.. | .. |
---|
989 | 1103 | { |
---|
990 | 1104 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
991 | 1105 | } |
---|
| 1106 | + else if(e.getSource() == autosaveCB) |
---|
| 1107 | + { |
---|
| 1108 | + Globals.SAVEONMAKE ^= true; |
---|
| 1109 | + } |
---|
992 | 1110 | else if(e.getSource() == lookAtCB) |
---|
993 | 1111 | { |
---|
994 | 1112 | cameraView.ToggleLookAt(); |
---|
.. | .. |
---|
1005 | 1123 | |
---|
1006 | 1124 | /**/ |
---|
1007 | 1125 | //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this); |
---|
1008 | | - TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1126 | + //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent()); |
---|
| 1127 | + TreePath path = objEditor.jTree.getSelectionPath(); |
---|
1009 | 1128 | if ((path == null) || (path.getPathCount() <= 1)) { |
---|
1010 | 1129 | // We can't move the root node or an empty selection |
---|
1011 | 1130 | return; |
---|
.. | .. |
---|
1122 | 1241 | |
---|
1123 | 1242 | assert target == objEditor.jTree; |
---|
1124 | 1243 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1244 | + Object3D destinationLeaf; |
---|
1125 | 1245 | try { |
---|
1126 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1246 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1127 | 1247 | } catch (Exception e) { |
---|
1128 | 1248 | System.out.println("destinationPath : " + destinationPath); |
---|
1129 | 1249 | return; |
---|
1130 | 1250 | } |
---|
1131 | 1251 | |
---|
1132 | | - if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1252 | + for (int i=group.selection.size(); --i>=0;) |
---|
1133 | 1253 | { |
---|
| 1254 | + Object3D child = (Object3D)group.selection.elementAt(i); |
---|
| 1255 | + |
---|
| 1256 | + // Cannot move into itself |
---|
| 1257 | + if (child == destinationLeaf) |
---|
| 1258 | + return; |
---|
| 1259 | + } |
---|
| 1260 | + |
---|
| 1261 | +// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
| 1262 | +// { |
---|
1134 | 1263 | loadClipboard(true); |
---|
1135 | 1264 | objEditor.jTree.setSelectionPath(destinationPath); |
---|
1136 | 1265 | pasteInto(false, false); |
---|
1137 | | - } else { |
---|
1138 | | - loadClipboard(false); |
---|
1139 | | - objEditor.jTree.setSelectionPath(destinationPath); |
---|
1140 | | - pasteInto(false, false); // true); // ??? |
---|
1141 | | - } |
---|
| 1266 | +// } else { |
---|
| 1267 | +// loadClipboard(false); |
---|
| 1268 | +// objEditor.jTree.setSelectionPath(destinationPath); |
---|
| 1269 | +// pasteInto(false, false); // true); // ??? |
---|
| 1270 | +// } |
---|
1142 | 1271 | } |
---|
1143 | 1272 | public void dropActionChanged(DropTargetDragEvent dtde) |
---|
1144 | 1273 | // Called if the user has modified the current drop gesture |
---|
.. | .. |
---|
1243 | 1372 | { |
---|
1244 | 1373 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1245 | 1374 | //heightFieldItem.addActionListener(this); |
---|
1246 | | - gridItem = menu.add(new MenuItem("Grid")); |
---|
1247 | | - gridItem.addActionListener(this); |
---|
1248 | | - rectoidItem = menu.add(new MenuItem("Box")); |
---|
1249 | | - rectoidItem.addActionListener(this); |
---|
1250 | | - ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
1251 | | - ellipsoidItem.addActionListener(this); |
---|
1252 | | - coneItem = menu.add(new MenuItem("Cone")); |
---|
1253 | | - coneItem.addActionListener(this); |
---|
1254 | | - torusItem = menu.add(new MenuItem("Torus")); |
---|
1255 | | - torusItem.addActionListener(this); |
---|
1256 | | - superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1257 | | - superItem.addActionListener(this); |
---|
| 1375 | +// gridItem = menu.add(new MenuItem("Grid")); |
---|
| 1376 | +// gridItem.addActionListener(this); |
---|
| 1377 | +// rectoidItem = menu.add(new MenuItem("Box")); |
---|
| 1378 | +// rectoidItem.addActionListener(this); |
---|
| 1379 | +// ellipsoidItem = menu.add(new MenuItem("Sphere")); |
---|
| 1380 | +// ellipsoidItem.addActionListener(this); |
---|
| 1381 | +// coneItem = menu.add(new MenuItem("Cone")); |
---|
| 1382 | +// coneItem.addActionListener(this); |
---|
| 1383 | +// torusItem = menu.add(new MenuItem("Torus")); |
---|
| 1384 | +// torusItem.addActionListener(this); |
---|
| 1385 | +// superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
| 1386 | +// superItem.addActionListener(this); |
---|
| 1387 | + |
---|
| 1388 | + cameraItem = menu.add(new MenuItem("Camera")); |
---|
| 1389 | + cameraItem.addActionListener(this); |
---|
| 1390 | + |
---|
| 1391 | + if (!Globals.ADVANCED) |
---|
| 1392 | + { |
---|
1258 | 1393 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1259 | 1394 | kleinItem.addActionListener(this); |
---|
1260 | | - particleItem = menu.add(new MenuItem("Particle system")); |
---|
1261 | | - particleItem.addActionListener(this); |
---|
| 1395 | + } |
---|
| 1396 | + |
---|
| 1397 | +// particleItem = menu.add(new MenuItem("Particle system")); |
---|
| 1398 | +// particleItem.addActionListener(this); |
---|
1262 | 1399 | if (Globals.ADVANCED) |
---|
1263 | 1400 | { |
---|
1264 | 1401 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1284 | 1421 | } |
---|
1285 | 1422 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1286 | 1423 | bezierItem.addActionListener(this); |
---|
1287 | | - overlayItem = menu.add(new MenuItem("Overlay")); |
---|
1288 | | - overlayItem.addActionListener(this); |
---|
1289 | | - lightItem = menu.add(new MenuItem("Light")); |
---|
1290 | | - lightItem.addActionListener(this); |
---|
| 1424 | +// overlayItem = menu.add(new MenuItem("Overlay")); |
---|
| 1425 | +// overlayItem.addActionListener(this); |
---|
| 1426 | +// lightItem = menu.add(new MenuItem("Light")); |
---|
| 1427 | +// lightItem.addActionListener(this); |
---|
1291 | 1428 | menu.add("-"); |
---|
1292 | 1429 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1293 | 1430 | //superLoopItem.addActionListener(this); |
---|
1294 | | - loopItem = menu.add(new MenuItem("Loop")); |
---|
1295 | | - loopItem.addActionListener(this); |
---|
| 1431 | +// loopItem = menu.add(new MenuItem("Loop")); |
---|
| 1432 | +// loopItem.addActionListener(this); |
---|
1296 | 1433 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1297 | 1434 | doubleItem.addActionListener(this); |
---|
1298 | 1435 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1721 | 1858 | { |
---|
1722 | 1859 | ScreenFit(); |
---|
1723 | 1860 | } else |
---|
1724 | | - if (source == switchItem) |
---|
| 1861 | + if (source == switchViewItem) |
---|
1725 | 1862 | { |
---|
1726 | 1863 | cVector v1 = new cVector(); |
---|
1727 | 1864 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1730 | 1867 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1731 | 1868 | objEditor.cameraView.repaint(); |
---|
1732 | 1869 | } else |
---|
1733 | | - if (source == rectoidItem) |
---|
| 1870 | + if (source == rectoidItem || source == boxButton) |
---|
1734 | 1871 | { |
---|
1735 | 1872 | makeSomething(new Box()); |
---|
1736 | 1873 | } else |
---|
1737 | | - if (source == particleItem) |
---|
| 1874 | + if (source == particleItem || source == particlesButton) |
---|
1738 | 1875 | { |
---|
1739 | 1876 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1740 | 1877 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1813 | 1950 | |
---|
1814 | 1951 | makeSomething(obj); |
---|
1815 | 1952 | } else |
---|
1816 | | - if (source == gridItem) |
---|
| 1953 | + if (source == gridItem || source == gridButton) |
---|
1817 | 1954 | { |
---|
1818 | 1955 | makeSomething(new Grid()); |
---|
1819 | 1956 | } else |
---|
1820 | | - if (source == ellipsoidItem) |
---|
| 1957 | + if (source == ellipsoidItem || source == sphereButton) |
---|
1821 | 1958 | { |
---|
1822 | 1959 | makeSomething(new Sphere()); |
---|
1823 | 1960 | } else |
---|
1824 | | - if (source == coneItem) |
---|
| 1961 | + if (source == coneItem || source == coneButton) |
---|
1825 | 1962 | { |
---|
1826 | 1963 | makeSomething(new Cone()); |
---|
1827 | 1964 | } else |
---|
1828 | | - if (source == torusItem) |
---|
| 1965 | + if (source == torusItem || source == torusButton) |
---|
1829 | 1966 | { |
---|
1830 | 1967 | makeSomething(new Torus()); |
---|
1831 | 1968 | } else |
---|
1832 | | - if (source == superItem) |
---|
| 1969 | + if (source == superItem || source == superButton) |
---|
1833 | 1970 | { |
---|
1834 | 1971 | makeSomething(new Superellipsoid()); |
---|
1835 | 1972 | } else |
---|
1836 | | - if (source == kleinItem) |
---|
| 1973 | + if (source == kleinItem || source == kleinButton) |
---|
1837 | 1974 | { |
---|
1838 | 1975 | makeSomething(new Klein()); |
---|
1839 | 1976 | } else |
---|
.. | .. |
---|
1853 | 1990 | { |
---|
1854 | 1991 | makeSomething(new BezierSurface()); |
---|
1855 | 1992 | } else |
---|
1856 | | - if (source == overlayItem) |
---|
| 1993 | + if (source == overlayItem || source == overlayButton) |
---|
1857 | 1994 | { |
---|
1858 | 1995 | /* |
---|
1859 | 1996 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1901 | 2038 | s.setup(); |
---|
1902 | 2039 | makeSomething(s); |
---|
1903 | 2040 | } else |
---|
1904 | | - if (source == lightItem) |
---|
| 2041 | + if (source == lightItem || source == lightButton) |
---|
1905 | 2042 | { |
---|
1906 | 2043 | makeSomething(new Light()); |
---|
1907 | 2044 | } else |
---|
.. | .. |
---|
1951 | 2088 | |
---|
1952 | 2089 | group(g); |
---|
1953 | 2090 | } else |
---|
1954 | | - if (source == loopItem) |
---|
| 2091 | + if (source == loopItem || source == loopButton) |
---|
1955 | 2092 | { |
---|
1956 | 2093 | Composite csg = new GroupLeaf(); |
---|
1957 | 2094 | csg.count = 5; |
---|
.. | .. |
---|
2441 | 2578 | { |
---|
2442 | 2579 | ClearSelection(true); |
---|
2443 | 2580 | } else |
---|
2444 | | - if (source == grabItem) |
---|
| 2581 | + if (source == grabItem || source == groupButton) |
---|
2445 | 2582 | { |
---|
2446 | | - group(new cGroup(), true); |
---|
| 2583 | + group(new cGroup(), false); // true); |
---|
2447 | 2584 | } else |
---|
2448 | 2585 | if (source == hideItem) |
---|
2449 | 2586 | { |
---|
.. | .. |
---|
2461 | 2598 | { |
---|
2462 | 2599 | makeSomething(new Camera()); |
---|
2463 | 2600 | } else |
---|
2464 | | - if (source == compositeItem) |
---|
| 2601 | + if (source == compositeItem || source == compositeButton) |
---|
2465 | 2602 | { |
---|
2466 | 2603 | group(new Composite()); |
---|
2467 | 2604 | } else |
---|
2468 | | - if (source == randomItem) |
---|
| 2605 | + if (source == switchItem || source == switchButton) |
---|
2469 | 2606 | { |
---|
2470 | 2607 | RandomNode random = new RandomNode(); |
---|
2471 | 2608 | group(random); |
---|
.. | .. |
---|
2567 | 2704 | { |
---|
2568 | 2705 | group(new cLinker()); |
---|
2569 | 2706 | } else |
---|
2570 | | - if (source == textureItem) |
---|
| 2707 | + if (source == textureItem || source == textureButton) |
---|
2571 | 2708 | { |
---|
2572 | 2709 | group(new TextureNode()); |
---|
2573 | 2710 | } else |
---|
.. | .. |
---|
2587 | 2724 | { |
---|
2588 | 2725 | CastShadow(2); |
---|
2589 | 2726 | } else |
---|
2590 | | - if (source == ungroupItem) |
---|
| 2727 | + if (source == ungroupItem || source == ungroupButton) |
---|
2591 | 2728 | { |
---|
2592 | 2729 | //ungroup(); |
---|
2593 | 2730 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2925 | 3062 | if (source == twoButton) |
---|
2926 | 3063 | { |
---|
2927 | 3064 | radio.layout = twoButton; |
---|
| 3065 | + |
---|
| 3066 | + if (CameraPane.FULLSCREEN) |
---|
| 3067 | + fullscreenLayout = radio.layout; |
---|
| 3068 | + |
---|
2928 | 3069 | // bug |
---|
2929 | 3070 | //gridPanel.setDividerLocation(1.0); |
---|
2930 | 3071 | //bigPanel.setDividerLocation(0.0); |
---|
.. | .. |
---|
2980 | 3121 | { |
---|
2981 | 3122 | radio.layout = threeButton; |
---|
2982 | 3123 | |
---|
| 3124 | + if (CameraPane.FULLSCREEN) |
---|
| 3125 | + fullscreenLayout = radio.layout; |
---|
| 3126 | + |
---|
2983 | 3127 | // bigThree.remove(scenePanel); |
---|
2984 | 3128 | // bigThree.remove(centralPanel); |
---|
2985 | 3129 | // bigThree.remove(XYZPanel); |
---|
.. | .. |
---|
3018 | 3162 | { |
---|
3019 | 3163 | radio.layout = fourButton; |
---|
3020 | 3164 | |
---|
| 3165 | + if (CameraPane.FULLSCREEN) |
---|
| 3166 | + fullscreenLayout = radio.layout; |
---|
| 3167 | + |
---|
3021 | 3168 | // bigThree.remove(scenePanel); |
---|
3022 | 3169 | // bigThree.remove(centralPanel); |
---|
3023 | 3170 | // bigThree.remove(XYZPanel); |
---|
.. | .. |
---|
3054 | 3201 | if (source == sixButton) |
---|
3055 | 3202 | { |
---|
3056 | 3203 | radio.layout = sixButton; |
---|
| 3204 | + |
---|
| 3205 | + if (CameraPane.FULLSCREEN) |
---|
| 3206 | + fullscreenLayout = radio.layout; |
---|
3057 | 3207 | |
---|
3058 | 3208 | // bigThree.remove(scenePanel); |
---|
3059 | 3209 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3092 | 3242 | if (source == sevenButton) |
---|
3093 | 3243 | { |
---|
3094 | 3244 | radio.layout = sevenButton; |
---|
| 3245 | + |
---|
| 3246 | + if (CameraPane.FULLSCREEN) |
---|
| 3247 | + fullscreenLayout = radio.layout; |
---|
3095 | 3248 | |
---|
3096 | 3249 | // bigThree.remove(scenePanel); |
---|
3097 | 3250 | // bigThree.remove(centralPanel); |
---|
.. | .. |
---|
3159 | 3312 | buttonGroup.remove(ab); |
---|
3160 | 3313 | radioPanel.remove(ab); |
---|
3161 | 3314 | |
---|
3162 | | - ab.GetObject().editWindow = null; |
---|
| 3315 | + //ab.GetObject().editWindow = null; |
---|
| 3316 | + ab.GetObject().manipWindow = null; |
---|
3163 | 3317 | // ab.GetObject().objectUI = null; // ????????? |
---|
3164 | 3318 | |
---|
3165 | 3319 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
.. | .. |
---|
3273 | 3427 | |
---|
3274 | 3428 | // fix "+" issue |
---|
3275 | 3429 | //group.editWindow = this; |
---|
| 3430 | + group.manipWindow = this; |
---|
3276 | 3431 | |
---|
3277 | 3432 | /* |
---|
3278 | 3433 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3293 | 3448 | cameraView.ProtectCamera(); |
---|
3294 | 3449 | cameraView.repaint(); |
---|
3295 | 3450 | return; |
---|
3296 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3451 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3297 | 3452 | { |
---|
3298 | 3453 | cameraView.RevertCamera(); |
---|
3299 | 3454 | cameraView.repaint(); |
---|
.. | .. |
---|
4358 | 4513 | { |
---|
4359 | 4514 | //System.out.println("edit : " + objectPanel.indexOfTab("Material")); |
---|
4360 | 4515 | //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false); |
---|
4361 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
| 4516 | + //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
4362 | 4517 | |
---|
4363 | 4518 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4364 | 4519 | if(elem != group || !newWindow) |
---|
.. | .. |
---|
4496 | 4651 | |
---|
4497 | 4652 | void refreshContents(boolean cp) |
---|
4498 | 4653 | { |
---|
4499 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 4654 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4655 | + if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
4500 | 4656 | { |
---|
4501 | 4657 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4502 | 4658 | |
---|
.. | .. |
---|
4595 | 4751 | |
---|
4596 | 4752 | if (cut) |
---|
4597 | 4753 | { |
---|
| 4754 | + if (Globals.SAVEONMAKE) |
---|
4598 | 4755 | Save(); |
---|
4599 | 4756 | //int indices[] = jList.getSelectedIndices(); |
---|
4600 | 4757 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
5313 | 5470 | cButton clearpanelButton; |
---|
5314 | 5471 | cButton unselectButton; |
---|
5315 | 5472 | |
---|
| 5473 | + cButton restoreCameraButton; |
---|
| 5474 | + |
---|
5316 | 5475 | cButton minButton; |
---|
5317 | 5476 | cButton maxButton; |
---|
5318 | 5477 | cButton fullButton; |
---|
.. | .. |
---|
5320 | 5479 | cButton redoButton; |
---|
5321 | 5480 | cButton saveButton; |
---|
5322 | 5481 | cButton oneStepButton; |
---|
| 5482 | + |
---|
| 5483 | + cButton groupButton; |
---|
| 5484 | + cButton ungroupButton; |
---|
| 5485 | + cButton compositeButton; |
---|
| 5486 | + cButton switchButton; |
---|
| 5487 | + cButton loopButton; |
---|
| 5488 | + cButton textureButton; |
---|
| 5489 | + |
---|
| 5490 | + cButton gridButton; |
---|
| 5491 | + cButton boxButton; |
---|
| 5492 | + cButton sphereButton; |
---|
| 5493 | + cButton coneButton; |
---|
| 5494 | + cButton torusButton; |
---|
| 5495 | + cButton superButton; |
---|
| 5496 | + cButton kleinButton; |
---|
| 5497 | + cButton particlesButton; |
---|
| 5498 | + cButton overlayButton; |
---|
| 5499 | + cButton lightButton; |
---|
5323 | 5500 | |
---|
5324 | 5501 | cButton screenfitButton; |
---|
5325 | 5502 | cButton screenfitpointButton; |
---|
.. | .. |
---|
5341 | 5518 | //JTree jTree; |
---|
5342 | 5519 | private MenuItem lookAtItem; |
---|
5343 | 5520 | private MenuItem lookFromItem; |
---|
5344 | | - private MenuItem switchItem; |
---|
| 5521 | + private MenuItem switchViewItem; |
---|
5345 | 5522 | private MenuItem cutItem; |
---|
5346 | 5523 | private MenuItem undoItem; |
---|
5347 | 5524 | private MenuItem redoItem; |
---|
5348 | | - private MenuItem duplicateItem; |
---|
| 5525 | + private JMenuItem duplicateItem; |
---|
5349 | 5526 | private MenuItem cloneItem; |
---|
5350 | 5527 | private MenuItem cloneSupportItem; |
---|
5351 | 5528 | private MenuItem overwriteGeoItem; |
---|
.. | .. |
---|
5433 | 5610 | private MenuItem frontItem; |
---|
5434 | 5611 | private MenuItem cameraItem; |
---|
5435 | 5612 | private MenuItem compositeItem; |
---|
5436 | | - private MenuItem randomItem; |
---|
| 5613 | + private MenuItem switchItem; |
---|
5437 | 5614 | private MenuItem physicsItem; |
---|
5438 | 5615 | private MenuItem frameselectorItem; |
---|
5439 | 5616 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5507 | 5684 | |
---|
5508 | 5685 | Menu cameraMenu; |
---|
5509 | 5686 | MenuItem editCameraItem; |
---|
5510 | | - MenuItem revertCameraItem; |
---|
| 5687 | + MenuItem restoreCameraItem; |
---|
5511 | 5688 | } |
---|