< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTitlePane.java

Print this page

        

*** 213,246 **** window.removePropertyChangeListener(propertyChangeListener); } } /** ! * Returns the <code>WindowListener</code> to add to the ! * <code>Window</code>. */ private WindowListener createWindowListener() { return new WindowHandler(); } /** ! * Returns the <code>PropertyChangeListener</code> to install on ! * the <code>Window</code>. */ private PropertyChangeListener createWindowPropertyChangeListener() { return new PropertyChangeHandler(); } /** ! * Returns the <code>JRootPane</code> this was created for. */ public JRootPane getRootPane() { return rootPane; } /** ! * Returns the decoration style of the <code>JRootPane</code>. */ private int getWindowDecorationStyle() { return getRootPane().getWindowDecorationStyle(); } --- 213,246 ---- window.removePropertyChangeListener(propertyChangeListener); } } /** ! * Returns the {@code WindowListener} to add to the ! * {@code Window}. */ private WindowListener createWindowListener() { return new WindowHandler(); } /** ! * Returns the {@code PropertyChangeListener} to install on ! * the {@code Window}. */ private PropertyChangeListener createWindowPropertyChangeListener() { return new PropertyChangeHandler(); } /** ! * Returns the {@code JRootPane} this was created for. */ public JRootPane getRootPane() { return rootPane; } /** ! * Returns the decoration style of the {@code JRootPane}. */ private int getWindowDecorationStyle() { return getRootPane().getWindowDecorationStyle(); }
*** 269,279 **** uninstallListeners(); window = null; } /** ! * Adds any sub-Components contained in the <code>MetalTitlePane</code>. */ private void installSubcomponents() { int decorationStyle = getWindowDecorationStyle(); if (decorationStyle == JRootPane.FRAME) { createActions(); --- 269,279 ---- uninstallListeners(); window = null; } /** ! * Adds any sub-Components contained in the {@code MetalTitlePane}. */ private void installSubcomponents() { int decorationStyle = getWindowDecorationStyle(); if (decorationStyle == JRootPane.FRAME) { createActions();
*** 356,366 **** */ private void uninstallDefaults() { } /** ! * Returns the <code>JMenuBar</code> displaying the appropriate * system menu items. */ protected JMenuBar createMenuBar() { menuBar = new SystemMenuBar(); menuBar.setFocusable(false); --- 356,366 ---- */ private void uninstallDefaults() { } /** ! * Returns the {@code JMenuBar} displaying the appropriate * system menu items. */ protected JMenuBar createMenuBar() { menuBar = new SystemMenuBar(); menuBar.setFocusable(false);
*** 417,427 **** frame.setExtendedState(state & ~Frame.MAXIMIZED_BOTH); } } /** ! * Create the <code>Action</code>s that get associated with the * buttons and menu items. */ private void createActions() { closeAction = new CloseAction(); if (getWindowDecorationStyle() == JRootPane.FRAME) { --- 417,427 ---- frame.setExtendedState(state & ~Frame.MAXIMIZED_BOTH); } } /** ! * Create the {@code Action}s that get associated with the * buttons and menu items. */ private void createActions() { closeAction = new CloseAction(); if (getWindowDecorationStyle() == JRootPane.FRAME) {
*** 430,440 **** maximizeAction = new MaximizeAction(); } } /** ! * Returns the <code>JMenu</code> displaying the appropriate menu items * for manipulating the Frame. */ private JMenu createMenu() { JMenu menu = new JMenu(""); if (getWindowDecorationStyle() == JRootPane.FRAME) { --- 430,440 ---- maximizeAction = new MaximizeAction(); } } /** ! * Returns the {@code JMenu} displaying the appropriate menu items * for manipulating the Frame. */ private JMenu createMenu() { JMenu menu = new JMenu(""); if (getWindowDecorationStyle() == JRootPane.FRAME) {
*** 442,452 **** } return menu; } /** ! * Adds the necessary <code>JMenuItem</code>s to the passed in menu. */ private void addMenuItems(JMenu menu) { Locale locale = getRootPane().getLocale(); JMenuItem mi = menu.add(restoreAction); int mnemonic = MetalUtils.getInt("MetalTitlePane.restoreMnemonic", -1); --- 442,452 ---- } return menu; } /** ! * Adds the necessary {@code JMenuItem}s to the passed in menu. */ private void addMenuItems(JMenu menu) { Locale locale = getRootPane().getLocale(); JMenuItem mi = menu.add(restoreAction); int mnemonic = MetalUtils.getInt("MetalTitlePane.restoreMnemonic", -1);
*** 479,489 **** mi.setMnemonic(mnemonic); } } /** ! * Returns a <code>JButton</code> appropriate for placement on the * TitlePane. */ private JButton createTitleButton() { JButton button = new JButton(); --- 479,489 ---- mi.setMnemonic(mnemonic); } } /** ! * Returns a {@code JButton} appropriate for placement on the * TitlePane. */ private JButton createTitleButton() { JButton button = new JButton();
*** 528,539 **** toggleButton.setIcon(maximizeIcon); } } /** ! * Returns the <code>LayoutManager</code> that should be installed on ! * the <code>MetalTitlePane</code>. */ private LayoutManager createLayout() { return new TitlePaneLayout(); } --- 528,539 ---- toggleButton.setIcon(maximizeIcon); } } /** ! * Returns the {@code LayoutManager} that should be installed on ! * the {@code MetalTitlePane}. */ private LayoutManager createLayout() { return new TitlePaneLayout(); }
*** 559,569 **** private void setState(int state) { setState(state, false); } /** ! * Sets the state of the window. If <code>updateRegardless</code> is * true and the state has not changed, this will update anyway. */ private void setState(int state, boolean updateRegardless) { Window w = getWindow(); --- 559,569 ---- private void setState(int state) { setState(state, false); } /** ! * Sets the state of the window. If {@code updateRegardless} is * true and the state has not changed, this will update anyway. */ private void setState(int state, boolean updateRegardless) { Window w = getWindow();
*** 631,652 **** this.state = state; } } /** ! * Updates the toggle button to contain the Icon <code>icon</code>, and ! * Action <code>action</code>. */ private void updateToggleButton(Action action, Icon icon) { toggleButton.setAction(action); toggleButton.setIcon(icon); toggleButton.setText(null); } /** * Returns the Frame rendering in. This will return null if the ! * <code>JRootPane</code> is not contained in a <code>Frame</code>. */ private Frame getFrame() { Window window = getWindow(); if (window instanceof Frame) { --- 631,652 ---- this.state = state; } } /** ! * Updates the toggle button to contain the Icon {@code icon}, and ! * Action {@code action}. */ private void updateToggleButton(Action action, Icon icon) { toggleButton.setAction(action); toggleButton.setIcon(icon); toggleButton.setText(null); } /** * Returns the Frame rendering in. This will return null if the ! * {@code JRootPane} is not contained in a {@code Frame}. */ private Frame getFrame() { Window window = getWindow(); if (window instanceof Frame) {
*** 654,666 **** } return null; } /** ! * Returns the <code>Window</code> the <code>JRootPane</code> is * contained in. This will return null if there is no parent ancestor ! * of the <code>JRootPane</code>. */ private Window getWindow() { return window; } --- 654,666 ---- } return null; } /** ! * Returns the {@code Window} the {@code JRootPane} is * contained in. This will return null if there is no parent ancestor ! * of the {@code JRootPane}. */ private Window getWindow() { return window; }
*** 778,788 **** bumps.setBumpArea( bumpLength, bumpHeight ); bumps.paintIcon(this, g, bumpXOffset, bumpYOffset); } /** ! * Actions used to <code>close</code> the <code>Window</code>. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class CloseAction extends AbstractAction { public CloseAction() { super(UIManager.getString("MetalTitlePane.closeTitle", --- 778,788 ---- bumps.setBumpArea( bumpLength, bumpHeight ); bumps.paintIcon(this, g, bumpXOffset, bumpYOffset); } /** ! * Actions used to {@code close} the {@code Window}. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class CloseAction extends AbstractAction { public CloseAction() { super(UIManager.getString("MetalTitlePane.closeTitle",
*** 794,804 **** } } /** ! * Actions used to <code>iconfiy</code> the <code>Frame</code>. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class IconifyAction extends AbstractAction { public IconifyAction() { super(UIManager.getString("MetalTitlePane.iconifyTitle", --- 794,804 ---- } } /** ! * Actions used to {@code iconfiy} the {@code Frame}. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class IconifyAction extends AbstractAction { public IconifyAction() { super(UIManager.getString("MetalTitlePane.iconifyTitle",
*** 810,820 **** } } /** ! * Actions used to <code>restore</code> the <code>Frame</code>. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class RestoreAction extends AbstractAction { public RestoreAction() { super(UIManager.getString --- 810,820 ---- } } /** ! * Actions used to {@code restore} the {@code Frame}. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class RestoreAction extends AbstractAction { public RestoreAction() { super(UIManager.getString
*** 826,836 **** } } /** ! * Actions used to <code>restore</code> the <code>Frame</code>. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class MaximizeAction extends AbstractAction { public MaximizeAction() { super(UIManager.getString("MetalTitlePane.maximizeTitle", --- 826,836 ---- } } /** ! * Actions used to {@code restore} the {@code Frame}. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class MaximizeAction extends AbstractAction { public MaximizeAction() { super(UIManager.getString("MetalTitlePane.maximizeTitle",
*** 844,854 **** /** * Class responsible for drawing the system menu. Looks up the * image to draw from the Frame associated with the ! * <code>JRootPane</code>. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SystemMenuBar extends JMenuBar { public void paint(Graphics g) { if (isOpaque()) { --- 844,854 ---- /** * Class responsible for drawing the system menu. Looks up the * image to draw from the Frame associated with the ! * {@code JRootPane}. */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SystemMenuBar extends JMenuBar { public void paint(Graphics g) { if (isOpaque()) {
< prev index next >