Normand Briere
2019-09-02 0216409e390b2005d6bc4eaf564ef9ca2e508dab
New maximize button.
2 files modified
77 ■■■■■ changed files
GroupEditor.java 45 ●●●●● patch | view | raw | blame | history
ObjEditor.java 32 ●●●● patch | view | raw | blame | history
GroupEditor.java
....@@ -368,16 +368,6 @@
368368 refreshContents();
369369 }
370370
371
- public void Show3DView()
372
- {
373
- // bug
374
- //gridPanel.setDividerLocation(1.0);
375
- //bigPanel.setDividerLocation(0.0);
376
- bigThree.ClearUI();
377
- bigThree.add(centralPanel);
378
- bigThree.FlushUI();
379
- }
380
-
381371 //ObjEditor objEditor;
382372 public void closeUI2()
383373 {
....@@ -1081,13 +1071,17 @@
10811071 // }
10821072 // });
10831073
1074
+ oe.toolbarPanel.add(fullScreenButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1075
+ fullScreenButton.setToolTipText("Full-screen window");
1076
+ fullScreenButton.addActionListener(this);
1077
+
10841078 oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10851079 collapseButton.setToolTipText("Collapse toolbar");
10861080 collapseButton.addActionListener(this);
10871081
1088
- oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1089
- maximize3DButton.setToolTipText("Maximize 3D view");
1090
- maximize3DButton.addActionListener(this);
1082
+// oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1083
+// maximize3DButton.setToolTipText("Maximize 3D view");
1084
+// maximize3DButton.addActionListener(this);
10911085
10921086 oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10931087 twoButton.setToolTipText("Show 3D view only");
....@@ -1107,10 +1101,6 @@
11071101 // sevenButton.setToolTipText("3-column layout");
11081102 // sevenButton.addActionListener(this);
11091103 //
1110
-
1111
- oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
1112
- fullButton.setToolTipText("Full-screen window");
1113
- fullButton.addActionListener(this);
11141104
11151105 oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11161106 screenfitButton.setToolTipText("Screen fit");
....@@ -2807,7 +2797,7 @@
28072797 {
28082798 Maximize();
28092799 } else
2810
- if (source == fullButton)
2800
+ if (source == fullScreenButton)
28112801 {
28122802 ToggleFullScreen();
28132803 } else
....@@ -2816,13 +2806,13 @@
28162806 this.expandedLayout = radio.layout;
28172807 CollapseToolbar();
28182808 } else
2819
- if (source == maximize3DButton)
2820
- {
2821
- this.expandedLayout = radio.layout;
2822
- radio.layout = twoButton;
2823
- Show3DView();
2824
- CollapseToolbar();
2825
- } else
2809
+// if (source == maximize3DButton)
2810
+// {
2811
+// this.expandedLayout = radio.layout;
2812
+// radio.layout = twoButton;
2813
+// CollapseToolbar();
2814
+// Show3DView();
2815
+// } else
28262816 if (source == previousVersionButton)
28272817 {
28282818 // Go to previous version
....@@ -4169,9 +4159,10 @@
41694159 // and check if any of these nodes are reachable below the root.
41704160 Grafreed.grafreed.universe.TagObjects(copy, true);
41714161
4172
- if (copy instanceof Composite && copy.versionlist == null && !copy.HasTags())
4162
+ if (copy instanceof Composite && !copy.HasTags())
41734163 {
4174
- copy.versionlist = new Object3D[100];
4164
+ if (copy.versionlist == null)
4165
+ copy.versionlist = new Object3D[100];
41754166
41764167 //Save(true);
41774168 }
ObjEditor.java
....@@ -906,10 +906,20 @@
906906
907907 cButton minButton;
908908 cButton maxButton;
909
- cButton fullButton;
909
+ cButton fullScreenButton;
910910 cButton collapseButton;
911911 cButton maximize3DButton;
912912
913
+ public void Show3DView()
914
+ {
915
+ // bug
916
+ //gridPanel.setDividerLocation(1.0);
917
+ //bigPanel.setDividerLocation(0.0);
918
+ bigThree.ClearUI();
919
+ bigThree.add(centralPanel);
920
+ bigThree.FlushUI();
921
+ }
922
+
913923 void ToggleFullScreen()
914924 {
915925 GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
....@@ -936,14 +946,18 @@
936946 // framePanel.setDividerLocation(46); // icons are 24x24
937947
938948 //frame.setVisible(true);
939
-// radio.layout = keepButton;
949
+ radio.layout = keepButton;
940950 //theFrame = null;
941951 keepButton = null;
942
-// radio.layout.doClick();
952
+ radio.layout.doClick();
943953
944954 } else
945955 {
946956 keepButton = radio.layout;
957
+
958
+ radio.layout = twoButton;
959
+ Show3DView();
960
+
947961 //keeprect = frame.getBounds();
948962 // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
949963 // frame.getToolkit().getScreenSize().height);
....@@ -965,6 +979,7 @@
965979 // radio.layout = fullscreenLayout;
966980 // radio.layout.doClick();
967981 //frame.setVisible(true);
982
+ CollapseToolbar();
968983 }
969984 frame.validate();
970985
....@@ -1985,11 +2000,16 @@
19852000 {
19862001 if ((Integer)pce.getOldValue() == 1)
19872002 {
1988
- if (radio.layout != expandedLayout)
2003
+ if (CameraPane.FULLSCREEN)
19892004 {
1990
- radio.layout = expandedLayout;
1991
- radio.layout.doClick();
2005
+ ToggleFullScreen();
19922006 }
2007
+
2008
+// if (radio.layout != expandedLayout)
2009
+// {
2010
+// radio.layout = expandedLayout;
2011
+// radio.layout.doClick();
2012
+// }
19932013 }
19942014 }
19952015 });