.. | .. |
---|
246 | 246 | |
---|
247 | 247 | cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
248 | 248 | toggleDebugItem.addItemListener(this); |
---|
249 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
| 249 | + toggleDebugItem.setState(Globals.DEBUG); |
---|
250 | 250 | |
---|
251 | 251 | cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
252 | 252 | toggleFrustumItem.addItemListener(this); |
---|
.. | .. |
---|
535 | 535 | |
---|
536 | 536 | void SetupUI2(ObjEditor oe) |
---|
537 | 537 | { |
---|
| 538 | + // June 2019 |
---|
| 539 | + if (oe == null) |
---|
| 540 | + { |
---|
| 541 | + //super.SetupUI2(this); |
---|
| 542 | + //return; |
---|
| 543 | + } |
---|
| 544 | + |
---|
| 545 | + if (copy != group) |
---|
| 546 | + { |
---|
| 547 | + //super.SetupUI2(this); |
---|
| 548 | + } |
---|
| 549 | + |
---|
538 | 550 | //new Exception().printStackTrace(); |
---|
539 | 551 | |
---|
540 | 552 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
.. | .. |
---|
565 | 577 | */ |
---|
566 | 578 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
567 | 579 | |
---|
568 | | - oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 580 | + //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 581 | + //minButton.setToolTipText("Minimize window"); |
---|
| 582 | + //minButton.addActionListener(this); |
---|
| 583 | + |
---|
| 584 | + oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 585 | + maxButton.setToolTipText("Maximize window"); |
---|
| 586 | + maxButton.addActionListener(this); |
---|
| 587 | + |
---|
| 588 | + oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 589 | + fullButton.setToolTipText("Full-screen window"); |
---|
| 590 | + fullButton.addActionListener(this); |
---|
| 591 | + |
---|
| 592 | + oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
569 | 593 | undoButton.setToolTipText("Undo changes"); |
---|
570 | 594 | undoButton.addActionListener(this); |
---|
571 | 595 | |
---|
572 | | - oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 596 | + oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
573 | 597 | redoButton.setToolTipText("Redo changes"); |
---|
574 | 598 | redoButton.addActionListener(this); |
---|
575 | 599 | |
---|
576 | | - oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 600 | + oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
577 | 601 | saveButton.setToolTipText("Save changes"); |
---|
578 | 602 | saveButton.addActionListener(this); |
---|
579 | 603 | |
---|
.. | .. |
---|
581 | 605 | liveCB.setToolTipText("Enable animation"); |
---|
582 | 606 | liveCB.addItemListener(this); |
---|
583 | 607 | |
---|
584 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 608 | + oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
585 | 609 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
586 | 610 | oneStepButton.addActionListener(this); |
---|
587 | 611 | |
---|
.. | .. |
---|
589 | 613 | fastCB.setToolTipText("Fast mode"); |
---|
590 | 614 | fastCB.addItemListener(this); |
---|
591 | 615 | |
---|
592 | | - oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 616 | + oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
593 | 617 | trackCB.setToolTipText("Enable tracking"); |
---|
594 | 618 | trackCB.addItemListener(this); |
---|
595 | 619 | |
---|
.. | .. |
---|
817 | 841 | |
---|
818 | 842 | void SetupViews(ObjEditor oe) |
---|
819 | 843 | { |
---|
| 844 | + theFrame = this; |
---|
| 845 | + |
---|
820 | 846 | oe.SetupViews(); |
---|
821 | 847 | |
---|
822 | 848 | System.out.println("SetupViews"); |
---|
.. | .. |
---|
1978 | 2004 | { |
---|
1979 | 2005 | DumpObject(); |
---|
1980 | 2006 | } else |
---|
| 2007 | + if (source == minButton) |
---|
| 2008 | + { |
---|
| 2009 | + Minimize(); |
---|
| 2010 | + } else |
---|
| 2011 | + if (source == maxButton) |
---|
| 2012 | + { |
---|
| 2013 | + Maximize(); |
---|
| 2014 | + } else |
---|
| 2015 | + if (source == fullButton) |
---|
| 2016 | + { |
---|
| 2017 | + ToggleFullScreen(); |
---|
| 2018 | + } else |
---|
1981 | 2019 | if (source == undoButton) |
---|
1982 | 2020 | { |
---|
1983 | 2021 | Undo(); |
---|
.. | .. |
---|
2899 | 2937 | bigThree.ClearUI(); |
---|
2900 | 2938 | bigThree.add(centralPanel); |
---|
2901 | 2939 | bigThree.FlushUI(); |
---|
| 2940 | + |
---|
| 2941 | + cameraView.requestFocusInWindow(); |
---|
| 2942 | + |
---|
| 2943 | +// refreshContents(true); |
---|
| 2944 | +// |
---|
| 2945 | +// try |
---|
| 2946 | +// { |
---|
| 2947 | +// java.awt.Robot bot = new java.awt.Robot(); |
---|
| 2948 | +// int mask = InputEvent.BUTTON1_MASK; |
---|
| 2949 | +// bot.mouseMove(100, 100); |
---|
| 2950 | +// bot.mousePress(mask); |
---|
| 2951 | +// bot.mouseRelease(mask); |
---|
| 2952 | +// } |
---|
| 2953 | +// catch (Exception e) |
---|
| 2954 | +// { |
---|
| 2955 | +// |
---|
| 2956 | +// } |
---|
| 2957 | + |
---|
2902 | 2958 | } else |
---|
2903 | 2959 | if (source == threeButton) |
---|
2904 | 2960 | { |
---|
.. | .. |
---|
2935 | 2991 | bigThree.add(centralPanel); |
---|
2936 | 2992 | bigThree.add(XYZPanel); |
---|
2937 | 2993 | bigThree.FlushUI(); |
---|
| 2994 | + |
---|
| 2995 | + cameraView.requestFocusInWindow(); |
---|
2938 | 2996 | } else |
---|
2939 | 2997 | if (source == fourButton) |
---|
2940 | 2998 | { |
---|
.. | .. |
---|
2970 | 3028 | bigThree.ClearUI(); |
---|
2971 | 3029 | bigThree.add(scenePanel); |
---|
2972 | 3030 | bigThree.FlushUI(); |
---|
| 3031 | + |
---|
| 3032 | + cameraView.requestFocusInWindow(); |
---|
2973 | 3033 | } else |
---|
2974 | 3034 | if (source == sixButton) |
---|
2975 | 3035 | { |
---|
.. | .. |
---|
3006 | 3066 | bigThree.add(scenePanel); |
---|
3007 | 3067 | bigThree.add(centralPanel); |
---|
3008 | 3068 | bigThree.FlushUI(); |
---|
| 3069 | + |
---|
| 3070 | + cameraView.requestFocusInWindow(); |
---|
3009 | 3071 | } else |
---|
3010 | 3072 | if (source == sevenButton) |
---|
3011 | 3073 | { |
---|
.. | .. |
---|
3043 | 3105 | bigThree.add(centralPanel); |
---|
3044 | 3106 | bigThree.add(XYZPanel); |
---|
3045 | 3107 | bigThree.FlushUI(); |
---|
| 3108 | + |
---|
| 3109 | + cameraView.requestFocusInWindow(); |
---|
3046 | 3110 | } else |
---|
3047 | 3111 | if (source == rootButton) |
---|
3048 | 3112 | { |
---|
.. | .. |
---|
3054 | 3118 | EditObject(obj); |
---|
3055 | 3119 | } |
---|
3056 | 3120 | |
---|
| 3121 | + cameraView.requestFocusInWindow(); |
---|
3057 | 3122 | refreshContents(true); |
---|
3058 | 3123 | } else |
---|
3059 | 3124 | if (source == closeButton) |
---|
.. | .. |
---|
3075 | 3140 | break; |
---|
3076 | 3141 | } |
---|
3077 | 3142 | } |
---|
| 3143 | + |
---|
| 3144 | + cameraView.requestFocusInWindow(); |
---|
3078 | 3145 | refreshContents(true); |
---|
3079 | 3146 | } else |
---|
3080 | 3147 | if (source == editItem || source == editButton) |
---|
.. | .. |
---|
3179 | 3246 | } |
---|
3180 | 3247 | |
---|
3181 | 3248 | // fix "+" issue |
---|
3182 | | - group.editWindow = this; |
---|
| 3249 | + //group.editWindow = this; |
---|
3183 | 3250 | |
---|
3184 | 3251 | /* |
---|
3185 | 3252 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3192 | 3259 | //group.parent = null; // ROOT |
---|
3193 | 3260 | //group.attributes = -1; |
---|
3194 | 3261 | ResetModel(); |
---|
| 3262 | + |
---|
| 3263 | + cameraView.requestFocusInWindow(); |
---|
3195 | 3264 | refreshContents(true); |
---|
3196 | 3265 | } else if (event.getSource() == editCameraItem) |
---|
3197 | 3266 | { |
---|
.. | .. |
---|
3215 | 3284 | } |
---|
3216 | 3285 | |
---|
3217 | 3286 | boolean useclient = false; |
---|
3218 | | - cRadio radio; |
---|
3219 | 3287 | |
---|
3220 | 3288 | void ToggleRoot() |
---|
3221 | 3289 | { |
---|
.. | .. |
---|
5219 | 5287 | cButton clearpanelButton; |
---|
5220 | 5288 | cButton unselectButton; |
---|
5221 | 5289 | |
---|
5222 | | - cButton saveButton; |
---|
| 5290 | + cButton minButton; |
---|
| 5291 | + cButton maxButton; |
---|
| 5292 | + cButton fullButton; |
---|
5223 | 5293 | cButton undoButton; |
---|
5224 | 5294 | cButton redoButton; |
---|
| 5295 | + cButton saveButton; |
---|
5225 | 5296 | cButton oneStepButton; |
---|
5226 | 5297 | |
---|
5227 | 5298 | cButton screenfitButton; |
---|
.. | .. |
---|
5234 | 5305 | cButton closeButton; |
---|
5235 | 5306 | |
---|
5236 | 5307 | cButton setsupportButton; |
---|
5237 | | - |
---|
5238 | | - cButton twoButton; |
---|
5239 | | - cButton sixButton; |
---|
5240 | | - cButton threeButton; |
---|
5241 | | - cButton sevenButton; |
---|
5242 | | - cButton fourButton; // full panel |
---|
5243 | | - cButton oneButton; // full XYZ |
---|
5244 | | - //cButton currentLayout; |
---|
5245 | 5308 | |
---|
5246 | 5309 | // |
---|
5247 | 5310 | //Composite |
---|