Changeset 1039 for trunk/src/org/expeditee
- Timestamp:
- 04/27/16 14:15:47 (8 years ago)
- Location:
- trunk/src/org/expeditee/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Browser.java
r1032 r1039 117 117 _startFrame = "home1"; 118 118 } 119 119 120 120 // Prepare all expeditee and swing data on the AWT event thread. 121 121 SwingUtilities.invokeLater(new Runnable() { … … 267 267 */ 268 268 setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); 269 269 270 270 // Expeditee handles its own repainting of AWT/Swing components 271 271 RepaintManager.setCurrentManager(ExpediteeRepaintManager.getInstance()); … … 435 435 */ 436 436 public void componentShown(ComponentEvent e) { 437 DisplayIO.fullScreenTransitionPending=false; 437 438 } 438 439 … … 447 448 448 449 public void windowClosed(WindowEvent e) { 449 exit(); 450 if (!DisplayIO.fullScreenTransitionPending) { 451 exit(); 452 } 450 453 } 451 454 -
trunk/src/org/expeditee/gui/DisplayIO.java
r977 r1039 23 23 import java.awt.Cursor; 24 24 import java.awt.Dimension; 25 import java.awt.GraphicsDevice; 26 import java.awt.GraphicsEnvironment; 25 27 import java.awt.Image; 26 28 import java.awt.Point; … … 90 92 private static HashSet<DisplayIOObserver> _displayIOObservers = new HashSet<DisplayIOObserver>(); 91 93 94 private static GraphicsDevice screen = null; 95 92 96 /** 93 97 * The title to display in the Title bar. 94 98 */ 95 public static String TITLE = "Exp Dev";99 public static String TITLE = "Expedite"; 96 100 97 101 private DisplayIO() { … … 116 120 _BackedUpFrames[0] = new Stack<String>(); 117 121 _BackedUpFrames[1] = new Stack<String>(); 118 } 119 122 123 GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); 124 screen = ge.getDefaultScreenDevice(); 125 if (!screen.isFullScreenSupported()) { 126 // Can this be printed to the MessageBuffer 127 MessageBay.errorMessage("Full-screen mode not supported"); 128 screen =null; 129 } 130 } 131 132 public static boolean fullScreenTransitionPending = false; 133 public static int beforeFullScreenWidth = 0; 134 public static int beforeFullScreenHeight = 0; 135 public static boolean fullScreenCapable() 136 { 137 return (screen!=null); 138 } 139 140 public static void enterFullScreenMode() 141 { 142 if (screen!=null) { 143 // Move all these routines to Browser? 144 beforeFullScreenWidth = _Browser.getWidth(); 145 beforeFullScreenHeight = _Browser.getHeight(); 146 147 fullScreenTransitionPending=true; 148 _Browser.dispose(); 149 _Browser.setUndecorated(true); 150 _Browser.pack(); 151 _Browser.setVisible(true); 152 153 screen.setFullScreenWindow(_Browser); 154 155 } 156 else { 157 System.err.println("Warning: DisplayIO::enterFullScreenMode() called when not available -- ignoring"); 158 } 159 } 160 161 public static void leaveFullScreenMode() 162 { 163 fullScreenTransitionPending=true; 164 _Browser.dispose(); 165 _Browser.setUndecorated(false); 166 _Browser.setSizes(new Dimension(beforeFullScreenWidth, beforeFullScreenHeight)); 167 168 screen.setFullScreenWindow(null); 169 _Browser.pack(); 170 _Browser.setVisible(true); 171 } 172 173 120 174 /** 121 175 * Notifies observers that the frame has changed. -
trunk/src/org/expeditee/gui/FrameGraphics.java
r997 r1039 24 24 import java.awt.Graphics; 25 25 import java.awt.Graphics2D; 26 import java.awt.GraphicsDevice; 26 27 import java.awt.GraphicsEnvironment; 27 28 import java.awt.Image; … … 69 70 70 71 public static final int MODE_XRAY = 2; 71 72 // Start in XRay mode so that errors aren't thrown when parsing the profile 73 // frame if it has images on it 72 73 public static final int MODE_AUDIENCE_FULLSCREEN = 4; 74 75 76 // The following used to be true in the past: 77 // Start in XRay mode so that errors aren't thrown when parsing the profile 78 // frame if it has images on it 79 // More recently, so Exploratory Search starts up correctly with images 80 // rendered (rather than their @i form) the following assignment was changed 81 // to MODE_AUDIENCE. No issue of parse errors has not been seen 74 82 private static int _Mode = MODE_AUDIENCE; 75 83 … … 87 95 ToggleXRayMode(); 88 96 } 89 90 if (_Mode == MODE_AUDIENCE) { 97 98 99 if (_Mode == MODE_AUDIENCE_FULLSCREEN) { 91 100 _Mode = MODE_NORMAL; 92 } else { 101 DisplayIO.leaveFullScreenMode(); 102 } 103 else if (_Mode == MODE_AUDIENCE) { 104 if (DisplayIO.fullScreenCapable()) { 105 // Don't need to worry about UpdateConnectedToAnnotations, as this 106 // will have already been taken care of going to the 'first stage' of 107 // audience mode (MODE_AUDIENCE) 108 _Mode = MODE_AUDIENCE_FULLSCREEN; 109 DisplayIO.enterFullScreenMode(); 110 } 111 else { 112 // return to normal mode 113 _Mode = MODE_NORMAL; 114 } 115 } 116 else { // must currently be in regular mode => move to audience mode 93 117 _Mode = MODE_AUDIENCE; 94 118 ItemUtils.UpdateConnectedToAnnotations(current.getItems()); … … 143 167 */ 144 168 public static boolean isAudienceMode() { 145 return _Mode == MODE_AUDIENCE;169 return (_Mode == MODE_AUDIENCE) || (_Mode == MODE_AUDIENCE_FULLSCREEN); 146 170 } 147 171
Note:
See TracChangeset
for help on using the changeset viewer.