Lines 82-90
Link Here
|
82 |
* |
82 |
* |
83 |
* @author Ian Formanek, Petr Hamernik |
83 |
* @author Ian Formanek, Petr Hamernik |
84 |
*/ |
84 |
*/ |
85 |
public final class MainWindow extends JFrame { |
85 |
public final class MainWindow { |
86 |
/** generated Serialized Version UID */ |
86 |
/** generated Serialized Version UID */ |
87 |
static final long serialVersionUID = -1160791973145645501L; |
87 |
static final long serialVersionUID = -1160791973145645501L; |
|
|
88 |
|
89 |
private final JFrame frame; |
90 |
|
88 |
private static JMenuBar mainMenuBar; |
91 |
private static JMenuBar mainMenuBar; |
89 |
|
92 |
|
90 |
/** Desktop. */ |
93 |
/** Desktop. */ |
Lines 101-143
Link Here
|
101 |
private Lookup.Result <SaveCookie> saveResult; |
104 |
private Lookup.Result <SaveCookie> saveResult; |
102 |
private Lookup.Result <DataObject> dobResult; |
105 |
private Lookup.Result <DataObject> dobResult; |
103 |
private LookupListener saveListener; |
106 |
private LookupListener saveListener; |
|
|
107 |
|
108 |
private static MainWindow theInstance; |
104 |
|
109 |
|
105 |
|
110 |
|
106 |
/** Constructs main window. */ |
111 |
/** Constructs main window. */ |
107 |
public MainWindow() { |
112 |
private MainWindow(JFrame frame) { |
108 |
if( "Aqua".equals(UIManager.getLookAndFeel().getID()) |
113 |
this.frame = frame; |
109 |
&& null == System.getProperty("apple.awt.brushMetalLook") ) //NOI18N |
|
|
110 |
getRootPane().putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE); //NOI18N |
111 |
} |
114 |
} |
112 |
|
115 |
|
113 |
/** Overrides superclass method, adds help context to the new root pane. */ |
116 |
public static MainWindow install( JFrame frame ) { |
114 |
@Override |
117 |
synchronized( MainWindow.class ) { |
115 |
protected void setRootPane(JRootPane root) { |
118 |
if( null != theInstance ) { |
116 |
super.setRootPane(root); |
119 |
Logger.getLogger(MainWindow.class.getName()).log(Level.INFO, "Installing MainWindow again, existing frame is: " + theInstance.frame); //NOI18N |
117 |
if(root != null) { |
120 |
} |
118 |
HelpCtx.setHelpIDString( |
121 |
theInstance = new MainWindow(frame); |
119 |
root, new HelpCtx(MainWindow.class).getHelpID()); |
122 |
return theInstance; |
120 |
} |
123 |
} |
121 |
//Optimization related to jdk bug 4939857 - on pre 1.5 jdk's an |
124 |
} |
122 |
//extra repaint is caused by the search for an opaque component up |
125 |
|
123 |
//to the component root. Post 1.5, root pane will automatically be |
126 |
public static MainWindow getInstance() { |
124 |
//opaque. |
127 |
synchronized( MainWindow.class ) { |
125 |
root.setOpaque(true); |
128 |
if( null == theInstance ) { |
126 |
if (Utilities.isWindows()) { |
129 |
Logger.getLogger(MainWindow.class.getName()).log(Level.INFO, "Accessing uninitialized MainWindow, using dummy JFrame instead." ); //NOI18N |
127 |
// use glass pane that will not cause repaint/revalidate of parent when set visible |
130 |
theInstance = new MainWindow(new JFrame()); |
128 |
// is called (when setting wait cursor in ModuleActions) #40689 |
131 |
} |
129 |
JComponent c = new JPanel() { |
132 |
return theInstance; |
130 |
@Override |
|
|
131 |
public void setVisible(boolean flag) { |
132 |
if (flag != isVisible ()) { |
133 |
super.setVisible(flag); |
134 |
} |
135 |
} |
136 |
}; |
137 |
c.setName(root.getName()+".nbGlassPane"); // NOI18N |
138 |
c.setVisible(false); |
139 |
((JPanel)c).setOpaque(false); |
140 |
root.setGlassPane(c); |
141 |
} |
133 |
} |
142 |
} |
134 |
} |
143 |
|
135 |
|
Lines 155-177
Link Here
|
155 |
} |
147 |
} |
156 |
inited = true; |
148 |
inited = true; |
157 |
|
149 |
|
|
|
150 |
JPanel contentPane = new JPanel(new BorderLayout()) { |
151 |
@Override |
152 |
public void paint(Graphics g) { |
153 |
super.paint(g); |
154 |
Logger.getLogger(MainWindow.class.getName()).log(Level.FINE, |
155 |
"Paint method of main window invoked normally."); //NOI18N |
156 |
// XXX is this only needed by obsolete #24291 hack, or now needed independently? |
157 |
WindowManagerImpl.getInstance().mainWindowPainted(); |
158 |
} |
159 |
|
160 |
}; |
161 |
frame.setContentPane(contentPane); |
162 |
|
158 |
init(); |
163 |
init(); |
|
|
164 |
|
165 |
initRootPane(); |
159 |
|
166 |
|
160 |
// initialize frame |
167 |
// initialize frame |
161 |
initFrameIcons(this); |
168 |
initFrameIcons(frame); |
162 |
|
169 |
|
163 |
initListeners(); |
170 |
initListeners(); |
164 |
|
171 |
|
165 |
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
172 |
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
166 |
|
173 |
|
167 |
getAccessibleContext().setAccessibleDescription( |
174 |
frame.getAccessibleContext().setAccessibleDescription( |
168 |
NbBundle.getBundle(MainWindow.class).getString("ACSD_MainWindow")); |
175 |
NbBundle.getBundle(MainWindow.class).getString("ACSD_MainWindow")); |
169 |
|
176 |
|
170 |
setJMenuBar(mainMenuBar); |
177 |
frame.setJMenuBar(mainMenuBar); |
171 |
|
178 |
|
172 |
if (!Constants.NO_TOOLBARS) { |
179 |
if (!Constants.NO_TOOLBARS) { |
173 |
JComponent tb = getToolbarComponent(); |
180 |
JComponent tb = getToolbarComponent(); |
174 |
getContentPane().add(tb, BorderLayout.NORTH); |
181 |
frame.getContentPane().add(tb, BorderLayout.NORTH); |
175 |
} |
182 |
} |
176 |
|
183 |
|
177 |
if(!Constants.SWITCH_STATUSLINE_IN_MENUBAR) { |
184 |
if(!Constants.SWITCH_STATUSLINE_IN_MENUBAR) { |
Lines 207-239
Link Here
|
207 |
|
214 |
|
208 |
decoratePanel (statusLinePanel, false); |
215 |
decoratePanel (statusLinePanel, false); |
209 |
statusLinePanel.setName("statusLine"); //NOI18N |
216 |
statusLinePanel.setName("statusLine"); //NOI18N |
210 |
getContentPane().add (statusLinePanel, BorderLayout.SOUTH); |
217 |
frame.getContentPane().add (statusLinePanel, BorderLayout.SOUTH); |
211 |
} else { // custom status line provided |
218 |
} else { // custom status line provided |
212 |
JComponent status = getCustomStatusLine(); |
219 |
JComponent status = getCustomStatusLine(); |
213 |
if (status != null) { |
220 |
if (status != null) { |
214 |
getContentPane().add(status, BorderLayout.SOUTH); |
221 |
frame.getContentPane().add(status, BorderLayout.SOUTH); |
215 |
} |
222 |
} |
216 |
} |
223 |
} |
217 |
} |
224 |
} |
218 |
|
225 |
|
219 |
getContentPane().add(getDesktopPanel(), BorderLayout.CENTER); |
226 |
frame.getContentPane().add(getDesktopPanel(), BorderLayout.CENTER); |
220 |
|
227 |
|
221 |
//#38810 start - focusing the main window in case it's not active and the menu is |
228 |
//#38810 start - focusing the main window in case it's not active and the menu is |
222 |
// selected.. |
229 |
// selected.. |
223 |
MenuSelectionManager.defaultManager().addChangeListener(new ChangeListener(){ |
230 |
MenuSelectionManager.defaultManager().addChangeListener(new ChangeListener(){ |
|
|
231 |
@Override |
224 |
public void stateChanged(ChangeEvent e) { |
232 |
public void stateChanged(ChangeEvent e) { |
225 |
MenuElement[] elems = MenuSelectionManager.defaultManager().getSelectedPath(); |
233 |
MenuElement[] elems = MenuSelectionManager.defaultManager().getSelectedPath(); |
226 |
if (elems != null && elems.length > 0) { |
234 |
if (elems != null && elems.length > 0) { |
227 |
if (elems[0] == getJMenuBar()) { |
235 |
if (elems[0] == frame.getJMenuBar()) { |
228 |
if (!isActive()) { |
236 |
if (!frame.isActive()) { |
229 |
toFront(); |
237 |
frame.toFront(); |
230 |
} |
238 |
} |
231 |
} |
239 |
} |
232 |
} |
240 |
} |
233 |
} |
241 |
} |
234 |
}); |
242 |
}); |
235 |
//#38810 end |
243 |
//#38810 end |
236 |
setTitle(NbBundle.getMessage(MainWindow.class, "CTL_MainWindow_Title_No_Project", System.getProperty("netbeans.buildnumber"))); |
244 |
frame.setTitle(NbBundle.getMessage(MainWindow.class, "CTL_MainWindow_Title_No_Project", System.getProperty("netbeans.buildnumber"))); |
237 |
if (Utilities.getOperatingSystem() == Utilities.OS_MAC) { |
245 |
if (Utilities.getOperatingSystem() == Utilities.OS_MAC) { |
238 |
//Show a "save dot" in the close button if a modified file is |
246 |
//Show a "save dot" in the close button if a modified file is |
239 |
//being edited |
247 |
//being edited |
Lines 243-252
Link Here
|
243 |
dobResult = Utilities.actionsGlobalContext().lookupResult (DataObject.class); |
251 |
dobResult = Utilities.actionsGlobalContext().lookupResult (DataObject.class); |
244 |
if( null != saveResult && null != dobResult ) { |
252 |
if( null != saveResult && null != dobResult ) { |
245 |
saveListener = new LookupListener() { |
253 |
saveListener = new LookupListener() { |
|
|
254 |
@Override |
246 |
public void resultChanged(LookupEvent ev) { |
255 |
public void resultChanged(LookupEvent ev) { |
247 |
if (ev.getSource() == saveResult) { |
256 |
if (ev.getSource() == saveResult) { |
248 |
boolean modified = saveResult.allItems().size() > 0; |
257 |
boolean modified = saveResult.allItems().size() > 0; |
249 |
getRootPane().putClientProperty ("Window.documentModified", //NOI18N |
258 |
frame.getRootPane().putClientProperty ("Window.documentModified", //NOI18N |
250 |
modified ? Boolean.TRUE : Boolean.FALSE); |
259 |
modified ? Boolean.TRUE : Boolean.FALSE); |
251 |
} else if (ev.getSource() == dobResult) { |
260 |
} else if (ev.getSource() == dobResult) { |
252 |
int count = dobResult.allItems().size(); |
261 |
int count = dobResult.allItems().size(); |
Lines 256-269
Link Here
|
256 |
FileObject file = dob.getPrimaryFile(); |
265 |
FileObject file = dob.getPrimaryFile(); |
257 |
File f = FileUtil.toFile(file); |
266 |
File f = FileUtil.toFile(file); |
258 |
if (f != null) { |
267 |
if (f != null) { |
259 |
getRootPane().putClientProperty("Window.documentFile", f); //NOI18N |
268 |
frame.getRootPane().putClientProperty("Window.documentFile", f); //NOI18N |
260 |
break; |
269 |
break; |
261 |
} |
270 |
} |
262 |
//Fall through |
271 |
//Fall through |
263 |
case 0 : |
272 |
case 0 : |
264 |
//Fall through |
273 |
//Fall through |
265 |
default : |
274 |
default : |
266 |
getRootPane().putClientProperty("Window.documentFile", null); //NOI18N |
275 |
frame.getRootPane().putClientProperty("Window.documentFile", null); //NOI18N |
267 |
} |
276 |
} |
268 |
} |
277 |
} |
269 |
} |
278 |
} |
Lines 315-328
Link Here
|
315 |
} |
324 |
} |
316 |
return some ? icons : null; |
325 |
return some ? icons : null; |
317 |
} |
326 |
} |
|
|
327 |
|
328 |
protected void initRootPane() { |
329 |
JRootPane root = frame.getRootPane(); |
330 |
if( null == root ) |
331 |
return; |
332 |
if( "Aqua".equals(UIManager.getLookAndFeel().getID()) |
333 |
&& null == System.getProperty("apple.awt.brushMetalLook") ) //NOI18N |
334 |
root.putClientProperty("apple.awt.brushMetalLook", Boolean.TRUE); //NOI18N |
335 |
HelpCtx.setHelpIDString( |
336 |
root, new HelpCtx(MainWindow.class).getHelpID()); |
337 |
if (Utilities.isWindows()) { |
338 |
// use glass pane that will not cause repaint/revalidate of parent when set visible |
339 |
// is called (when setting wait cursor in ModuleActions) #40689 |
340 |
JComponent c = new JPanel() { |
341 |
@Override |
342 |
public void setVisible(boolean flag) { |
343 |
if (flag != isVisible ()) { |
344 |
super.setVisible(flag); |
345 |
} |
346 |
} |
347 |
}; |
348 |
c.setName(root.getName()+".nbGlassPane"); // NOI18N |
349 |
c.setVisible(false); |
350 |
((JPanel)c).setOpaque(false); |
351 |
root.setGlassPane(c); |
352 |
} |
353 |
} |
354 |
|
355 |
|
356 |
//delegate some JFrame methods for convenience |
357 |
|
358 |
public void setBounds(Rectangle bounds) { |
359 |
frame.setBounds(bounds); |
360 |
} |
361 |
|
362 |
public void setExtendedState(int extendedState) { |
363 |
frame.setExtendedState(extendedState); |
364 |
} |
365 |
|
366 |
public void setVisible(boolean visible) { |
367 |
frame.setVisible(visible); |
368 |
} |
369 |
|
370 |
public int getExtendedState() { |
371 |
return frame.getExtendedState(); |
372 |
} |
373 |
|
374 |
public JMenuBar getJMenuBar() { |
375 |
return frame.getJMenuBar(); |
376 |
} |
318 |
|
377 |
|
319 |
static private class StatusLineElementsListener implements LookupListener { |
378 |
static private class StatusLineElementsListener implements LookupListener { |
320 |
private JPanel decoratingPanel; |
379 |
private JPanel decoratingPanel; |
321 |
StatusLineElementsListener (JPanel decoratingPanel) { |
380 |
StatusLineElementsListener (JPanel decoratingPanel) { |
322 |
this.decoratingPanel = decoratingPanel; |
381 |
this.decoratingPanel = decoratingPanel; |
323 |
} |
382 |
} |
|
|
383 |
@Override |
324 |
public void resultChanged (LookupEvent ev) { |
384 |
public void resultChanged (LookupEvent ev) { |
325 |
SwingUtilities.invokeLater (new Runnable () { |
385 |
SwingUtilities.invokeLater (new Runnable () { |
|
|
386 |
@Override |
326 |
public void run () { |
387 |
public void run () { |
327 |
decoratePanel (decoratingPanel, false); |
388 |
decoratePanel (decoratingPanel, false); |
328 |
} |
389 |
} |
Lines 352-358
Link Here
|
352 |
} |
413 |
} |
353 |
|
414 |
|
354 |
private void initListeners() { |
415 |
private void initListeners() { |
355 |
addWindowListener (new WindowAdapter() { |
416 |
frame.addWindowListener (new WindowAdapter() { |
356 |
@Override |
417 |
@Override |
357 |
public void windowClosing(WindowEvent evt) { |
418 |
public void windowClosing(WindowEvent evt) { |
358 |
LifecycleManager.getDefault().exit(); |
419 |
LifecycleManager.getDefault().exit(); |
Lines 362-368
Link Here
|
362 |
public void windowActivated (WindowEvent evt) { |
423 |
public void windowActivated (WindowEvent evt) { |
363 |
// #19685. Cancel foreigner popup when |
424 |
// #19685. Cancel foreigner popup when |
364 |
// activated main window. |
425 |
// activated main window. |
365 |
org.netbeans.core.windows.RegistryImpl.cancelMenu(MainWindow.this); |
426 |
org.netbeans.core.windows.RegistryImpl.cancelMenu(frame); |
366 |
} |
427 |
} |
367 |
} |
428 |
} |
368 |
); |
429 |
); |
Lines 475-486
Link Here
|
475 |
} |
536 |
} |
476 |
if( null != forcedBounds ) { |
537 |
if( null != forcedBounds ) { |
477 |
bounds = new Rectangle( forcedBounds ); |
538 |
bounds = new Rectangle( forcedBounds ); |
478 |
setPreferredSize( bounds.getSize() ); |
539 |
frame.setPreferredSize( bounds.getSize() ); |
479 |
forcedBounds = null; |
540 |
forcedBounds = null; |
480 |
} |
541 |
} |
481 |
|
542 |
|
482 |
if(!bounds.isEmpty()) { |
543 |
if(!bounds.isEmpty()) { |
483 |
setBounds(bounds); |
544 |
frame.setBounds(bounds); |
484 |
} |
545 |
} |
485 |
} |
546 |
} |
486 |
|
547 |
|
Lines 510-519
Link Here
|
510 |
if(desktop != null) { |
571 |
if(desktop != null) { |
511 |
getDesktopPanel().add(desktop, BorderLayout.CENTER); |
572 |
getDesktopPanel().add(desktop, BorderLayout.CENTER); |
512 |
} |
573 |
} |
513 |
invalidate(); |
574 |
frame.invalidate(); |
514 |
validate(); |
575 |
frame.validate(); |
515 |
|
576 |
|
516 |
repaint(); |
577 |
frame.repaint(); |
517 |
} |
578 |
} |
518 |
|
579 |
|
519 |
// XXX PENDING used in DnD only. |
580 |
// XXX PENDING used in DnD only. |
Lines 539-545
Link Here
|
539 |
// XXX |
600 |
// XXX |
540 |
/** Gets bounds of main window without the dektop component. */ |
601 |
/** Gets bounds of main window without the dektop component. */ |
541 |
public Rectangle getPureMainWindowBounds() { |
602 |
public Rectangle getPureMainWindowBounds() { |
542 |
Rectangle bounds = getBounds(); |
603 |
Rectangle bounds = frame.getBounds(); |
543 |
|
604 |
|
544 |
// XXX Substract the desktop height, we know the pure main window |
605 |
// XXX Substract the desktop height, we know the pure main window |
545 |
// is always at the top, the width is same. |
606 |
// is always at the top, the width is same. |
Lines 551-565
Link Here
|
551 |
return bounds; |
612 |
return bounds; |
552 |
} |
613 |
} |
553 |
|
614 |
|
554 |
@Override |
|
|
555 |
public void paint(Graphics g) { |
556 |
super.paint(g); |
557 |
Logger.getLogger(MainWindow.class.getName()).log(Level.FINE, |
558 |
"Paint method of main window invoked normally."); //NOI18N |
559 |
// XXX is this only needed by obsolete #24291 hack, or now needed independently? |
560 |
WindowManagerImpl.getInstance().mainWindowPainted(); |
561 |
} |
562 |
|
563 |
// Full Screen Mode |
615 |
// Full Screen Mode |
564 |
private boolean isFullScreenMode = false; |
616 |
private boolean isFullScreenMode = false; |
565 |
private Rectangle restoreBounds; |
617 |
private Rectangle restoreBounds; |
Lines 575-596
Link Here
|
575 |
} |
627 |
} |
576 |
isSwitchingFullScreenMode = true; |
628 |
isSwitchingFullScreenMode = true; |
577 |
if( !isFullScreenMode ) { |
629 |
if( !isFullScreenMode ) { |
578 |
restoreExtendedState = getExtendedState(); |
630 |
restoreExtendedState = frame.getExtendedState(); |
579 |
restoreBounds = getBounds(); |
631 |
restoreBounds = frame.getBounds(); |
580 |
isUndecorated = isUndecorated(); |
632 |
isUndecorated = frame.isUndecorated(); |
581 |
windowDecorationStyle = getRootPane().getWindowDecorationStyle(); |
633 |
windowDecorationStyle = frame.getRootPane().getWindowDecorationStyle(); |
582 |
} |
634 |
} |
583 |
isFullScreenMode = fullScreenMode; |
635 |
isFullScreenMode = fullScreenMode; |
584 |
if( Utilities.isWindows() ) |
636 |
if( Utilities.isWindows() ) |
585 |
setVisible( false ); |
637 |
frame.setVisible( false ); |
586 |
else |
638 |
else |
587 |
WindowManagerImpl.getInstance().setVisible(false); |
639 |
WindowManagerImpl.getInstance().setVisible(false); |
588 |
|
640 |
|
589 |
dispose(); |
641 |
frame.dispose(); |
590 |
|
642 |
|
591 |
setUndecorated( isFullScreenMode || isUndecorated ); |
643 |
frame.setUndecorated( isFullScreenMode || isUndecorated ); |
592 |
// Added to support Custom Look and Feel with Decorations |
644 |
// Added to support Custom Look and Feel with Decorations |
593 |
getRootPane().setWindowDecorationStyle( isFullScreenMode ? JRootPane.NONE : windowDecorationStyle ); |
645 |
frame.getRootPane().setWindowDecorationStyle( isFullScreenMode ? JRootPane.NONE : windowDecorationStyle ); |
594 |
|
646 |
|
595 |
final String toolbarConfigName = ToolbarPool.getDefault().getConfiguration(); |
647 |
final String toolbarConfigName = ToolbarPool.getDefault().getConfiguration(); |
596 |
if( null != toolbarConfigName ) { |
648 |
if( null != toolbarConfigName ) { |
Lines 602-617
Link Here
|
602 |
final boolean updateBounds = ( !isFullScreenMode );//&& restoreExtendedState != JFrame.MAXIMIZED_BOTH ); |
654 |
final boolean updateBounds = ( !isFullScreenMode );//&& restoreExtendedState != JFrame.MAXIMIZED_BOTH ); |
603 |
|
655 |
|
604 |
GraphicsDevice device = null; |
656 |
GraphicsDevice device = null; |
605 |
Graphics gc = getGraphics(); |
657 |
Graphics gc = frame.getGraphics(); |
606 |
if( gc instanceof Graphics2D ) { |
658 |
if( gc instanceof Graphics2D ) { |
607 |
GraphicsConfiguration conf = ((Graphics2D)gc).getDeviceConfiguration(); |
659 |
GraphicsConfiguration conf = ((Graphics2D)gc).getDeviceConfiguration(); |
608 |
if( null != conf ) |
660 |
if( null != conf ) |
609 |
device = conf.getDevice(); |
661 |
device = conf.getDevice(); |
610 |
} |
662 |
} |
611 |
if( null != device && device.isFullScreenSupported() ) { |
663 |
if( null != device && device.isFullScreenSupported() ) { |
612 |
device.setFullScreenWindow( isFullScreenMode ? this : null ); |
664 |
device.setFullScreenWindow( isFullScreenMode ? frame : null ); |
613 |
} else { |
665 |
} else { |
614 |
setExtendedState( isFullScreenMode ? JFrame.MAXIMIZED_BOTH : restoreExtendedState ); |
666 |
frame.setExtendedState( isFullScreenMode ? JFrame.MAXIMIZED_BOTH : restoreExtendedState ); |
615 |
} |
667 |
} |
616 |
|
668 |
|
617 |
if( updateBounds || (isFullScreenMode() && !Utilities.isWindows()) ) { |
669 |
if( updateBounds || (isFullScreenMode() && !Utilities.isWindows()) ) { |
Lines 623-637
Link Here
|
623 |
} |
675 |
} |
624 |
} |
676 |
} |
625 |
if( Utilities.isWindows() ) { |
677 |
if( Utilities.isWindows() ) { |
626 |
setVisible( true ); |
678 |
frame.setVisible( true ); |
627 |
SwingUtilities.invokeLater( new Runnable() { |
679 |
SwingUtilities.invokeLater( new Runnable() { |
|
|
680 |
@Override |
628 |
public void run() { |
681 |
public void run() { |
629 |
invalidate(); |
682 |
frame.invalidate(); |
630 |
validate(); |
683 |
frame.validate(); |
631 |
repaint(); |
684 |
frame.repaint(); |
632 |
if( updateBounds ) { |
685 |
if( updateBounds ) { |
633 |
setPreferredSize( restoreBounds.getSize() ); |
686 |
frame.setPreferredSize( restoreBounds.getSize() ); |
634 |
setBounds( restoreBounds ); |
687 |
frame.setBounds( restoreBounds ); |
635 |
} |
688 |
} |
636 |
ToolbarPool.getDefault().setConfiguration( toolbarConfigName ); |
689 |
ToolbarPool.getDefault().setConfiguration( toolbarConfigName ); |
637 |
isSwitchingFullScreenMode = false; |
690 |
isSwitchingFullScreenMode = false; |
Lines 640-649
Link Here
|
640 |
} else { |
693 |
} else { |
641 |
WindowManagerImpl.getInstance().setVisible(true); |
694 |
WindowManagerImpl.getInstance().setVisible(true); |
642 |
SwingUtilities.invokeLater( new Runnable() { |
695 |
SwingUtilities.invokeLater( new Runnable() { |
|
|
696 |
@Override |
643 |
public void run() { |
697 |
public void run() { |
644 |
invalidate(); |
698 |
frame.invalidate(); |
645 |
validate(); |
699 |
frame.validate(); |
646 |
repaint(); |
700 |
frame.repaint(); |
647 |
ToolbarPool.getDefault().setConfiguration( toolbarConfigName ); |
701 |
ToolbarPool.getDefault().setConfiguration( toolbarConfigName ); |
648 |
isSwitchingFullScreenMode = false; |
702 |
isSwitchingFullScreenMode = false; |
649 |
} |
703 |
} |
Lines 655-660
Link Here
|
655 |
return isFullScreenMode; |
709 |
return isFullScreenMode; |
656 |
} |
710 |
} |
657 |
|
711 |
|
|
|
712 |
public JFrame getFrame() { |
713 |
return frame; |
714 |
} |
715 |
|
658 |
private static class HeavyWeightPopupFactory extends PopupFactory { |
716 |
private static class HeavyWeightPopupFactory extends PopupFactory { |
659 |
|
717 |
|
660 |
@Override |
718 |
@Override |