equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
302 } |
302 } |
303 |
303 |
304 /** |
304 /** |
305 * The default DesktopManager installed by the UI. |
305 * The default DesktopManager installed by the UI. |
306 */ |
306 */ |
|
307 @SuppressWarnings("serial") // JDK-implementation class |
307 private class BasicDesktopManager extends DefaultDesktopManager |
308 private class BasicDesktopManager extends DefaultDesktopManager |
308 implements UIResource { |
309 implements UIResource { |
309 } |
310 } |
310 |
311 |
311 private static class Actions extends UIAction { |
312 private static class Actions extends UIAction { |
630 |
631 |
631 /** |
632 /** |
632 * Handles restoring a minimized or maximized internal frame. |
633 * Handles restoring a minimized or maximized internal frame. |
633 * @since 1.3 |
634 * @since 1.3 |
634 */ |
635 */ |
|
636 @SuppressWarnings("serial") // Superclass is not serializable across versions |
635 protected class OpenAction extends AbstractAction { |
637 protected class OpenAction extends AbstractAction { |
636 public void actionPerformed(ActionEvent evt) { |
638 public void actionPerformed(ActionEvent evt) { |
637 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
639 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
638 SHARED_ACTION.setState(dp, Actions.RESTORE); |
640 SHARED_ACTION.setState(dp, Actions.RESTORE); |
639 } |
641 } |
644 } |
646 } |
645 |
647 |
646 /** |
648 /** |
647 * Handles closing an internal frame. |
649 * Handles closing an internal frame. |
648 */ |
650 */ |
|
651 @SuppressWarnings("serial") // Superclass is not serializable across versions |
649 protected class CloseAction extends AbstractAction { |
652 protected class CloseAction extends AbstractAction { |
650 public void actionPerformed(ActionEvent evt) { |
653 public void actionPerformed(ActionEvent evt) { |
651 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
654 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
652 SHARED_ACTION.setState(dp, Actions.CLOSE); |
655 SHARED_ACTION.setState(dp, Actions.CLOSE); |
653 } |
656 } |
662 } |
665 } |
663 |
666 |
664 /** |
667 /** |
665 * Handles minimizing an internal frame. |
668 * Handles minimizing an internal frame. |
666 */ |
669 */ |
|
670 @SuppressWarnings("serial") // Superclass is not serializable across versions |
667 protected class MinimizeAction extends AbstractAction { |
671 protected class MinimizeAction extends AbstractAction { |
668 public void actionPerformed(ActionEvent evt) { |
672 public void actionPerformed(ActionEvent evt) { |
669 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
673 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
670 SHARED_ACTION.setState(dp, Actions.MINIMIZE); |
674 SHARED_ACTION.setState(dp, Actions.MINIMIZE); |
671 } |
675 } |
680 } |
684 } |
681 |
685 |
682 /** |
686 /** |
683 * Handles maximizing an internal frame. |
687 * Handles maximizing an internal frame. |
684 */ |
688 */ |
|
689 @SuppressWarnings("serial") // Superclass is not serializable across versions |
685 protected class MaximizeAction extends AbstractAction { |
690 protected class MaximizeAction extends AbstractAction { |
686 public void actionPerformed(ActionEvent evt) { |
691 public void actionPerformed(ActionEvent evt) { |
687 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
692 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
688 SHARED_ACTION.setState(dp, Actions.MAXIMIZE); |
693 SHARED_ACTION.setState(dp, Actions.MAXIMIZE); |
689 } |
694 } |
698 } |
703 } |
699 |
704 |
700 /** |
705 /** |
701 * Handles navigating to the next internal frame. |
706 * Handles navigating to the next internal frame. |
702 */ |
707 */ |
|
708 @SuppressWarnings("serial") // Superclass is not serializable across versions |
703 protected class NavigateAction extends AbstractAction { |
709 protected class NavigateAction extends AbstractAction { |
704 public void actionPerformed(ActionEvent evt) { |
710 public void actionPerformed(ActionEvent evt) { |
705 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
711 JDesktopPane dp = (JDesktopPane)evt.getSource(); |
706 dp.selectFrame(true); |
712 dp.selectFrame(true); |
707 } |
713 } |