.. | .. |
---|
356 | 356 | this.copy = this.group = group; |
---|
357 | 357 | //selectees = this.group.selectees; |
---|
358 | 358 | |
---|
359 | | - if (copy.versions == null) |
---|
| 359 | + if (copy.versionlist == null) |
---|
360 | 360 | { |
---|
361 | | - copy.versions = new Object3D[100]; |
---|
| 361 | + copy.versionlist = new Object3D[100]; |
---|
362 | 362 | copy.versionindex = -1; |
---|
363 | 363 | } |
---|
364 | 364 | |
---|
.. | .. |
---|
383 | 383 | |
---|
384 | 384 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
385 | 385 | |
---|
386 | | - if (copy.versions == null) |
---|
| 386 | + if (copy.versionlist == null) |
---|
387 | 387 | { |
---|
388 | | - copy.versions = new Object3D[100]; |
---|
| 388 | + copy.versionlist = new Object3D[100]; |
---|
389 | 389 | copy.versionindex = -1; |
---|
390 | 390 | |
---|
391 | 391 | Save(true); |
---|
.. | .. |
---|
931 | 931 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
932 | 932 | restoreCameraButton.addActionListener(this); |
---|
933 | 933 | |
---|
934 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
935 | | - saveButton.setToolTipText("Duplicate current version"); |
---|
936 | | - saveButton.addActionListener(this); |
---|
| 934 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 935 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 936 | + saveVersionButton.addActionListener(this); |
---|
937 | 937 | |
---|
938 | | - copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
939 | | - undoButton.setToolTipText("Previous version"); |
---|
940 | | - undoButton.addActionListener(this); |
---|
941 | | - undoButton.setEnabled(false); |
---|
| 938 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 939 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 940 | + deleteVersionButton.addActionListener(this); |
---|
| 941 | + |
---|
| 942 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 943 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 944 | + previousVersionButton.addActionListener(this); |
---|
| 945 | + previousVersionButton.setEnabled(false); |
---|
942 | 946 | |
---|
943 | 947 | cGridBag updown = new cGridBag().setVertical(true); |
---|
944 | 948 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
945 | | - restoreButton.setToolTipText("Restore current version (undo latest change)"); |
---|
| 949 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
946 | 950 | restoreButton.addActionListener(this); |
---|
947 | | - restoreButton.setEnabled(false); |
---|
| 951 | + //restoreButton.setEnabled(false); |
---|
948 | 952 | |
---|
949 | 953 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
950 | | - replaceButton.setToolTipText("Replace current version (save latest change)"); |
---|
| 954 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
951 | 955 | replaceButton.addActionListener(this); |
---|
952 | | - replaceButton.setEnabled(false); |
---|
| 956 | + //replaceButton.setEnabled(false); |
---|
953 | 957 | |
---|
954 | 958 | copyOptionsPanel.add(updown); |
---|
955 | 959 | |
---|
956 | | - copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
957 | | - redoButton.setToolTipText("Next version"); |
---|
958 | | - redoButton.addActionListener(this); |
---|
959 | | - redoButton.setEnabled(false); |
---|
| 960 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 961 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 962 | + nextVersionButton.addActionListener(this); |
---|
| 963 | + nextVersionButton.setEnabled(false); |
---|
960 | 964 | |
---|
961 | 965 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
962 | 966 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
1110 | 1114 | editButton.addActionListener(this); |
---|
1111 | 1115 | |
---|
1112 | 1116 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1113 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1117 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1114 | 1118 | uneditButton.addActionListener(this); |
---|
1115 | 1119 | |
---|
1116 | 1120 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1117 | 1121 | allParamsButton.setToolTipText("Show all controle"); |
---|
1118 | 1122 | allParamsButton.addActionListener(this); |
---|
1119 | 1123 | |
---|
1120 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1124 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1121 | 1125 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
1122 | 1126 | clearPanelButton.addActionListener(this); |
---|
1123 | 1127 | |
---|
.. | .. |
---|
2571 | 2575 | if (source == invariantsItem) |
---|
2572 | 2576 | { |
---|
2573 | 2577 | System.out.println("Invariants:"); |
---|
2574 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2578 | + Grafreed.grafreed.universe.invariants(); |
---|
2575 | 2579 | } else |
---|
2576 | 2580 | if (source == memoryItem) |
---|
2577 | 2581 | { |
---|
.. | .. |
---|
2602 | 2606 | { |
---|
2603 | 2607 | ToggleFullScreen(); |
---|
2604 | 2608 | } else |
---|
2605 | | - if (source == undoButton) |
---|
| 2609 | + if (source == previousVersionButton) |
---|
2606 | 2610 | { |
---|
2607 | 2611 | // Go to previous version |
---|
2608 | 2612 | //if (!Undo()) |
---|
2609 | 2613 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2610 | | - Undo(); |
---|
| 2614 | + PreviousVersion(); |
---|
2611 | 2615 | } else |
---|
2612 | 2616 | if (source == restoreButton) |
---|
2613 | 2617 | { |
---|
2614 | 2618 | // Restore current version |
---|
2615 | 2619 | Restore(); |
---|
| 2620 | + //restoreButton.setEnabled(false); |
---|
2616 | 2621 | } else |
---|
2617 | 2622 | if (source == replaceButton) |
---|
2618 | 2623 | { |
---|
2619 | 2624 | // Overwrite current version |
---|
2620 | 2625 | Replace(); |
---|
| 2626 | + //replaceButton.setEnabled(false); |
---|
2621 | 2627 | } else |
---|
2622 | | - if (source == redoButton) |
---|
| 2628 | + if (source == nextVersionButton) |
---|
2623 | 2629 | { |
---|
2624 | 2630 | // Go to next version |
---|
2625 | | - Redo(); |
---|
| 2631 | + NextVersion(); |
---|
2626 | 2632 | } else |
---|
2627 | | - if (source == saveButton) |
---|
| 2633 | + if (source == saveVersionButton) |
---|
2628 | 2634 | { |
---|
2629 | 2635 | // Save a new version |
---|
2630 | 2636 | if (!Save(true)) |
---|
2631 | 2637 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2638 | + } else |
---|
| 2639 | + if (source == deleteVersionButton) |
---|
| 2640 | + { |
---|
| 2641 | + // Delete a new version |
---|
| 2642 | + DeleteVersion(); |
---|
2632 | 2643 | } else |
---|
2633 | 2644 | if (source == oneStepButton) |
---|
2634 | 2645 | { |
---|
.. | .. |
---|
2683 | 2694 | } else |
---|
2684 | 2695 | if (source == undoItem) |
---|
2685 | 2696 | { |
---|
2686 | | - Undo(); |
---|
| 2697 | + PreviousVersion(); |
---|
2687 | 2698 | } else |
---|
2688 | 2699 | if (source == redoItem) |
---|
2689 | 2700 | { |
---|
2690 | | - Redo(); |
---|
| 2701 | + NextVersion(); |
---|
2691 | 2702 | } else |
---|
2692 | 2703 | if (source == duplicateItem) |
---|
2693 | 2704 | { |
---|
.. | .. |
---|
3820 | 3831 | { |
---|
3821 | 3832 | Object3D child = (Object3D)e.nextElement(); |
---|
3822 | 3833 | if(child.editWindow != null) |
---|
3823 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3824 | 3834 | child.pinned = false; |
---|
3825 | 3835 | child.CloseUI(); |
---|
3826 | 3836 | listUI.remove(child); |
---|
| 3837 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3827 | 3838 | |
---|
3828 | 3839 | //child.editWindow = null; // ??????????? |
---|
3829 | 3840 | } |
---|
.. | .. |
---|
3842 | 3853 | obj.CloseUI(); |
---|
3843 | 3854 | } |
---|
3844 | 3855 | listUI.clear(); |
---|
| 3856 | + SetPinStates(group.selection.size() > 0); |
---|
3845 | 3857 | refreshContents(true); |
---|
3846 | 3858 | } else |
---|
3847 | 3859 | if (source == allParamsButton) |
---|
.. | .. |
---|
3928 | 3940 | radio.layout.doClick(); |
---|
3929 | 3941 | |
---|
3930 | 3942 | ClearUnpinned(); |
---|
| 3943 | + |
---|
3931 | 3944 | //Grafreed.Assert(group != null); |
---|
3932 | 3945 | //Grafreed.Assert(group.selection != null); |
---|
3933 | 3946 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
5083 | 5096 | |
---|
5084 | 5097 | freezemodel = false; |
---|
5085 | 5098 | } |
---|
5086 | | - |
---|
5087 | | - boolean flashIt = true; |
---|
5088 | | - |
---|
| 5099 | + |
---|
5089 | 5100 | public void valueChanged(TreeSelectionEvent e) |
---|
5090 | 5101 | //public boolean handleEvent(Event event) |
---|
5091 | 5102 | { |
---|
.. | .. |
---|
5160 | 5171 | uneditButton.setEnabled(enabled); |
---|
5161 | 5172 | unselectButton.setEnabled(enabled); |
---|
5162 | 5173 | flashSelectionButton.setEnabled(enabled); |
---|
| 5174 | + |
---|
| 5175 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
5163 | 5176 | } |
---|
5164 | 5177 | |
---|
5165 | 5178 | void refreshContents(boolean cp) |
---|
.. | .. |
---|
6000 | 6013 | |
---|
6001 | 6014 | cButton restoreCameraButton; |
---|
6002 | 6015 | |
---|
6003 | | - cButton saveButton; |
---|
6004 | 6016 | cButton oneStepButton; |
---|
6005 | 6017 | |
---|
6006 | 6018 | cButton groupButton; |
---|