< prev index next >

src/java.desktop/share/classes/javax/swing/JInternalFrame.java

Print this page

        

*** 53,86 **** * a section in <em>The Java Tutorial</em>. * * <p> * * Generally, ! * you add <code>JInternalFrame</code>s to a <code>JDesktopPane</code>. The UI * delegates the look-and-feel-specific actions to the ! * <code>DesktopManager</code> ! * object maintained by the <code>JDesktopPane</code>. * <p> ! * The <code>JInternalFrame</code> content pane * is where you add child components. * As a convenience, the {@code add}, {@code remove}, and {@code setLayout} * methods of this class are overridden, so that they delegate calls * to the corresponding methods of the {@code ContentPane}. * For example, you can add a child component to an internal frame as follows: * <pre> * internalFrame.add(child); * </pre> * And the child will be added to the contentPane. * The content pane is actually managed by an instance of ! * <code>JRootPane</code>, * which also manages a layout pane, glass pane, and * optional menu bar for the internal frame. Please see the ! * <code>JRootPane</code> * documentation for a complete description of these components. * Refer to {@link javax.swing.RootPaneContainer} ! * for details on adding, removing and setting the <code>LayoutManager</code> ! * of a <code>JInternalFrame</code>. * <p> * <strong>Warning:</strong> Swing is not thread safe. For more * information see <a * href="package-summary.html#threading">Swing's Threading * Policy</a>. --- 53,86 ---- * a section in <em>The Java Tutorial</em>. * * <p> * * Generally, ! * you add {@code JInternalFrame}s to a {@code JDesktopPane}. The UI * delegates the look-and-feel-specific actions to the ! * {@code DesktopManager} ! * object maintained by the {@code JDesktopPane}. * <p> ! * The {@code JInternalFrame} content pane * is where you add child components. * As a convenience, the {@code add}, {@code remove}, and {@code setLayout} * methods of this class are overridden, so that they delegate calls * to the corresponding methods of the {@code ContentPane}. * For example, you can add a child component to an internal frame as follows: * <pre> * internalFrame.add(child); * </pre> * And the child will be added to the contentPane. * The content pane is actually managed by an instance of ! * {@code JRootPane}, * which also manages a layout pane, glass pane, and * optional menu bar for the internal frame. Please see the ! * {@code JRootPane} * documentation for a complete description of these components. * Refer to {@link javax.swing.RootPaneContainer} ! * for details on adding, removing and setting the {@code LayoutManager} ! * of a {@code JInternalFrame}. * <p> * <strong>Warning:</strong> Swing is not thread safe. For more * information see <a * href="package-summary.html#threading">Swing's Threading * Policy</a>.
*** 89,99 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @see InternalFrameEvent * @see JDesktopPane * @see DesktopManager --- 89,99 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. * * @see InternalFrameEvent * @see JDesktopPane * @see DesktopManager
*** 120,143 **** * @see #readObject */ private static final String uiClassID = "InternalFrameUI"; /** ! * The <code>JRootPane</code> instance that manages the * content pane * and optional menu bar for this internal frame, as well as the * glass pane. * * @see JRootPane * @see RootPaneContainer */ protected JRootPane rootPane; /** ! * If true then calls to <code>add</code> and <code>setLayout</code> ! * will be forwarded to the <code>contentPane</code>. This is initially ! * false, but is set to true when the <code>JInternalFrame</code> is * constructed. * * @see #isRootPaneCheckingEnabled * @see #setRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer --- 120,143 ---- * @see #readObject */ private static final String uiClassID = "InternalFrameUI"; /** ! * The {@code JRootPane} instance that manages the * content pane * and optional menu bar for this internal frame, as well as the * glass pane. * * @see JRootPane * @see RootPaneContainer */ protected JRootPane rootPane; /** ! * If true then calls to {@code add} and {@code setLayout} ! * will be forwarded to the {@code contentPane}. This is initially ! * false, but is set to true when the {@code JInternalFrame} is * constructed. * * @see #isRootPaneCheckingEnabled * @see #setRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer
*** 189,201 **** private int defaultCloseOperation = DISPOSE_ON_CLOSE; /** * Contains the Component that focus is to go when ! * <code>restoreSubcomponentFocus</code> is invoked, that is, ! * <code>restoreSubcomponentFocus</code> sets this to the value returned ! * from <code>getMostRecentFocusOwner</code>. */ private Component lastFocusOwner; /** Bound property name. */ public static final String CONTENT_PANE_PROPERTY = "contentPane"; --- 189,201 ---- private int defaultCloseOperation = DISPOSE_ON_CLOSE; /** * Contains the Component that focus is to go when ! * {@code restoreSubcomponentFocus} is invoked, that is, ! * {@code restoreSubcomponentFocus} sets this to the value returned ! * from {@code getMostRecentFocusOwner}. */ private Component lastFocusOwner; /** Bound property name. */ public static final String CONTENT_PANE_PROPERTY = "contentPane";
*** 263,341 **** } } /** * Creates a non-resizable, non-closable, non-maximizable, ! * non-iconifiable <code>JInternalFrame</code> with no title. */ public JInternalFrame() { this("", false, false, false, false); } /** * Creates a non-resizable, non-closable, non-maximizable, ! * non-iconifiable <code>JInternalFrame</code> with the specified title. ! * Note that passing in a <code>null</code> <code>title</code> results in * unspecified behavior and possibly an exception. * ! * @param title the non-<code>null</code> <code>String</code> * to display in the title bar */ public JInternalFrame(String title) { this(title, false, false, false, false); } /** * Creates a non-closable, non-maximizable, non-iconifiable ! * <code>JInternalFrame</code> with the specified title * and resizability. * ! * @param title the <code>String</code> to display in the title bar ! * @param resizable if <code>true</code>, the internal frame can be resized */ public JInternalFrame(String title, boolean resizable) { this(title, resizable, false, false, false); } /** ! * Creates a non-maximizable, non-iconifiable <code>JInternalFrame</code> * with the specified title, resizability, and * closability. * ! * @param title the <code>String</code> to display in the title bar ! * @param resizable if <code>true</code>, the internal frame can be resized ! * @param closable if <code>true</code>, the internal frame can be closed */ public JInternalFrame(String title, boolean resizable, boolean closable) { this(title, resizable, closable, false, false); } /** ! * Creates a non-iconifiable <code>JInternalFrame</code> * with the specified title, * resizability, closability, and maximizability. * ! * @param title the <code>String</code> to display in the title bar ! * @param resizable if <code>true</code>, the internal frame can be resized ! * @param closable if <code>true</code>, the internal frame can be closed ! * @param maximizable if <code>true</code>, the internal frame can be maximized */ public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable) { this(title, resizable, closable, maximizable, false); } /** ! * Creates a <code>JInternalFrame</code> with the specified title, * resizability, closability, maximizability, and iconifiability. ! * All <code>JInternalFrame</code> constructors use this one. * ! * @param title the <code>String</code> to display in the title bar ! * @param resizable if <code>true</code>, the internal frame can be resized ! * @param closable if <code>true</code>, the internal frame can be closed ! * @param maximizable if <code>true</code>, the internal frame can be maximized ! * @param iconifiable if <code>true</code>, the internal frame can be iconified */ public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable) { setRootPane(createRootPane()); --- 263,341 ---- } } /** * Creates a non-resizable, non-closable, non-maximizable, ! * non-iconifiable {@code JInternalFrame} with no title. */ public JInternalFrame() { this("", false, false, false, false); } /** * Creates a non-resizable, non-closable, non-maximizable, ! * non-iconifiable {@code JInternalFrame} with the specified title. ! * Note that passing in a {@code null title} results in * unspecified behavior and possibly an exception. * ! * @param title the non-{@code null String} * to display in the title bar */ public JInternalFrame(String title) { this(title, false, false, false, false); } /** * Creates a non-closable, non-maximizable, non-iconifiable ! * {@code JInternalFrame} with the specified title * and resizability. * ! * @param title the {@code String} to display in the title bar ! * @param resizable if {@code true}, the internal frame can be resized */ public JInternalFrame(String title, boolean resizable) { this(title, resizable, false, false, false); } /** ! * Creates a non-maximizable, non-iconifiable {@code JInternalFrame} * with the specified title, resizability, and * closability. * ! * @param title the {@code String} to display in the title bar ! * @param resizable if {@code true}, the internal frame can be resized ! * @param closable if {@code true}, the internal frame can be closed */ public JInternalFrame(String title, boolean resizable, boolean closable) { this(title, resizable, closable, false, false); } /** ! * Creates a non-iconifiable {@code JInternalFrame} * with the specified title, * resizability, closability, and maximizability. * ! * @param title the {@code String} to display in the title bar ! * @param resizable if {@code true}, the internal frame can be resized ! * @param closable if {@code true}, the internal frame can be closed ! * @param maximizable if {@code true}, the internal frame can be maximized */ public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable) { this(title, resizable, closable, maximizable, false); } /** ! * Creates a {@code JInternalFrame} with the specified title, * resizability, closability, maximizability, and iconifiability. ! * All {@code JInternalFrame} constructors use this one. * ! * @param title the {@code String} to display in the title bar ! * @param resizable if {@code true}, the internal frame can be resized ! * @param closable if {@code true}, the internal frame can be closed ! * @param maximizable if {@code true}, the internal frame can be maximized ! * @param iconifiable if {@code true}, the internal frame can be iconified */ public JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable) { setRootPane(createRootPane());
*** 354,383 **** sun.awt.SunToolkit.checkAndSetPolicy(this); addPropertyChangeListenerIfNecessary(); } /** ! * Called by the constructor to set up the <code>JRootPane</code>. ! * @return a new <code>JRootPane</code> * @see JRootPane */ protected JRootPane createRootPane() { return new JRootPane(); } /** * Returns the look-and-feel object that renders this component. * ! * @return the <code>InternalFrameUI</code> object that renders * this component */ public InternalFrameUI getUI() { return (InternalFrameUI)ui; } /** ! * Sets the UI delegate for this <code>JInternalFrame</code>. * @param ui the UI delegate * @beaninfo * bound: true * hidden: true * attribute: visualUpdate true --- 354,383 ---- sun.awt.SunToolkit.checkAndSetPolicy(this); addPropertyChangeListenerIfNecessary(); } /** ! * Called by the constructor to set up the {@code JRootPane}. ! * @return a new {@code JRootPane} * @see JRootPane */ protected JRootPane createRootPane() { return new JRootPane(); } /** * Returns the look-and-feel object that renders this component. * ! * @return the {@code InternalFrameUI} object that renders * this component */ public InternalFrameUI getUI() { return (InternalFrameUI)ui; } /** ! * Sets the UI delegate for this {@code JInternalFrame}. * @param ui the UI delegate * @beaninfo * bound: true * hidden: true * attribute: visualUpdate true
*** 393,406 **** setRootPaneCheckingEnabled(checkingEnabled); } } /** ! * Notification from the <code>UIManager</code> that the look and feel * has changed. * Replaces the current UI object with the latest version from the ! * <code>UIManager</code>. * * @see JComponent#updateUI */ public void updateUI() { setUI((InternalFrameUI)UIManager.getUI(this)); --- 393,406 ---- setRootPaneCheckingEnabled(checkingEnabled); } } /** ! * Notification from the {@code UIManager} that the look and feel * has changed. * Replaces the current UI object with the latest version from the ! * {@code UIManager}. * * @see JComponent#updateUI */ public void updateUI() { setUI((InternalFrameUI)UIManager.getUI(this));
*** 408,418 **** if (desktopIcon != null) { desktopIcon.updateUIWhenHidden(); } } ! /* This method is called if <code>updateUI</code> was called * on the associated * JDesktopIcon. It's necessary to avoid infinite recursion. */ void updateUIWhenHidden() { setUI((InternalFrameUI)UIManager.getUI(this)); --- 408,418 ---- if (desktopIcon != null) { desktopIcon.updateUIWhenHidden(); } } ! /* This method is called if {@code updateUI} was called * on the associated * JDesktopIcon. It's necessary to avoid infinite recursion. */ void updateUIWhenHidden() { setUI((InternalFrameUI)UIManager.getUI(this));
*** 441,454 **** public String getUIClassID() { return uiClassID; } /** ! * Returns whether calls to <code>add</code> and ! * <code>setLayout</code> are forwarded to the <code>contentPane</code>. * ! * @return true if <code>add</code> and <code>setLayout</code> * are forwarded; false otherwise * * @see #addImpl * @see #setLayout * @see #setRootPaneCheckingEnabled --- 441,454 ---- public String getUIClassID() { return uiClassID; } /** ! * Returns whether calls to {@code add} and ! * {@code setLayout} are forwarded to the {@code contentPane}. * ! * @return true if {@code add} and {@code setLayout} * are forwarded; false otherwise * * @see #addImpl * @see #setLayout * @see #setRootPaneCheckingEnabled
*** 457,472 **** protected boolean isRootPaneCheckingEnabled() { return rootPaneCheckingEnabled; } /** ! * Sets whether calls to <code>add</code> and ! * <code>setLayout</code> are forwarded to the <code>contentPane</code>. * ! * @param enabled true if <code>add</code> and <code>setLayout</code> * are forwarded, false if they should operate directly on the ! * <code>JInternalFrame</code>. * * @see #addImpl * @see #setLayout * @see #isRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer --- 457,472 ---- protected boolean isRootPaneCheckingEnabled() { return rootPaneCheckingEnabled; } /** ! * Sets whether calls to {@code add} and ! * {@code setLayout} are forwarded to the {@code contentPane}. * ! * @param enabled true if {@code add} and {@code setLayout} * are forwarded, false if they should operate directly on the ! * {@code JInternalFrame}. * * @see #addImpl * @see #setLayout * @see #isRootPaneCheckingEnabled * @see javax.swing.RootPaneContainer
*** 477,497 **** protected void setRootPaneCheckingEnabled(boolean enabled) { rootPaneCheckingEnabled = enabled; } /** ! * Adds the specified child <code>Component</code>. * This method is overridden to conditionally forward calls to the ! * <code>contentPane</code>. ! * By default, children are added to the <code>contentPane</code> instead * of the frame, refer to {@link javax.swing.RootPaneContainer} for * details. * * @param comp the component to be enhanced * @param constraints the constraints to be respected * @param index the index ! * @exception IllegalArgumentException if <code>index</code> is invalid * @exception IllegalArgumentException if adding the container's parent * to itself * @exception IllegalArgumentException if adding a window to a container * * @see #setRootPaneCheckingEnabled --- 477,497 ---- protected void setRootPaneCheckingEnabled(boolean enabled) { rootPaneCheckingEnabled = enabled; } /** ! * Adds the specified child {@code Component}. * This method is overridden to conditionally forward calls to the ! * {@code contentPane}. ! * By default, children are added to the {@code contentPane} instead * of the frame, refer to {@link javax.swing.RootPaneContainer} for * details. * * @param comp the component to be enhanced * @param constraints the constraints to be respected * @param index the index ! * @exception IllegalArgumentException if {@code index} is invalid * @exception IllegalArgumentException if adding the container's parent * to itself * @exception IllegalArgumentException if adding a window to a container * * @see #setRootPaneCheckingEnabled
*** 506,520 **** } } /** * Removes the specified component from the container. If ! * <code>comp</code> is not a child of the <code>JInternalFrame</code> ! * this will forward the call to the <code>contentPane</code>. * * @param comp the component to be removed ! * @throws NullPointerException if <code>comp</code> is null * @see #add * @see javax.swing.RootPaneContainer */ public void remove(Component comp) { int oldCount = getComponentCount(); --- 506,520 ---- } } /** * Removes the specified component from the container. If ! * {@code comp} is not a child of the {@code JInternalFrame} ! * this will forward the call to the {@code contentPane}. * * @param comp the component to be removed ! * @throws NullPointerException if {@code comp} is null * @see #add * @see javax.swing.RootPaneContainer */ public void remove(Component comp) { int oldCount = getComponentCount();
*** 526,540 **** /** * Ensures that, by default, the layout of this component cannot be set. * Overridden to conditionally forward the call to the ! * <code>contentPane</code>. * Refer to {@link javax.swing.RootPaneContainer} for * more information. * ! * @param manager the <code>LayoutManager</code> * @see #setRootPaneCheckingEnabled */ public void setLayout(LayoutManager manager) { if(isRootPaneCheckingEnabled()) { getContentPane().setLayout(manager); --- 526,540 ---- /** * Ensures that, by default, the layout of this component cannot be set. * Overridden to conditionally forward the call to the ! * {@code contentPane}. * Refer to {@link javax.swing.RootPaneContainer} for * more information. * ! * @param manager the {@code LayoutManager} * @see #setRootPaneCheckingEnabled */ public void setLayout(LayoutManager manager) { if(isRootPaneCheckingEnabled()) { getContentPane().setLayout(manager);
*** 548,601 **** ////////////////////////////////////////////////////////////////////////// /// Property Methods ////////////////////////////////////////////////////////////////////////// /** ! * Returns the current <code>JMenuBar</code> for this ! * <code>JInternalFrame</code>, or <code>null</code> * if no menu bar has been set. ! * @return the current menu bar, or <code>null</code> if none has been set * * @deprecated As of Swing version 1.0.3, ! * replaced by <code>getJMenuBar()</code>. */ @Deprecated public JMenuBar getMenuBar() { return getRootPane().getMenuBar(); } /** ! * Returns the current <code>JMenuBar</code> for this ! * <code>JInternalFrame</code>, or <code>null</code> * if no menu bar has been set. * ! * @return the <code>JMenuBar</code> used by this internal frame * @see #setJMenuBar */ public JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); } /** ! * Sets the <code>menuBar</code> property for this <code>JInternalFrame</code>. * ! * @param m the <code>JMenuBar</code> to use in this internal frame * @see #getJMenuBar * @deprecated As of Swing version 1.0.3 ! * replaced by <code>setJMenuBar(JMenuBar m)</code>. */ @Deprecated public void setMenuBar(JMenuBar m) { JMenuBar oldValue = getMenuBar(); getRootPane().setJMenuBar(m); firePropertyChange(MENU_BAR_PROPERTY, oldValue, m); } /** ! * Sets the <code>menuBar</code> property for this <code>JInternalFrame</code>. * ! * @param m the <code>JMenuBar</code> to use in this internal frame * @see #getJMenuBar * @beaninfo * bound: true * preferred: true * description: The menu bar for accessing pulldown menus --- 548,601 ---- ////////////////////////////////////////////////////////////////////////// /// Property Methods ////////////////////////////////////////////////////////////////////////// /** ! * Returns the current {@code JMenuBar} for this ! * {@code JInternalFrame}, or {@code null} * if no menu bar has been set. ! * @return the current menu bar, or {@code null} if none has been set * * @deprecated As of Swing version 1.0.3, ! * replaced by {@code getJMenuBar()}. */ @Deprecated public JMenuBar getMenuBar() { return getRootPane().getMenuBar(); } /** ! * Returns the current {@code JMenuBar} for this ! * {@code JInternalFrame}, or {@code null} * if no menu bar has been set. * ! * @return the {@code JMenuBar} used by this internal frame * @see #setJMenuBar */ public JMenuBar getJMenuBar() { return getRootPane().getJMenuBar(); } /** ! * Sets the {@code menuBar} property for this {@code JInternalFrame}. * ! * @param m the {@code JMenuBar} to use in this internal frame * @see #getJMenuBar * @deprecated As of Swing version 1.0.3 ! * replaced by {@code setJMenuBar(JMenuBar m)}. */ @Deprecated public void setMenuBar(JMenuBar m) { JMenuBar oldValue = getMenuBar(); getRootPane().setJMenuBar(m); firePropertyChange(MENU_BAR_PROPERTY, oldValue, m); } /** ! * Sets the {@code menuBar} property for this {@code JInternalFrame}. * ! * @param m the {@code JMenuBar} to use in this internal frame * @see #getJMenuBar * @beaninfo * bound: true * preferred: true * description: The menu bar for accessing pulldown menus
*** 616,632 **** return getRootPane().getContentPane(); } /** ! * Sets this <code>JInternalFrame</code>'s <code>contentPane</code> * property. * * @param c the content pane for this internal frame * * @exception java.awt.IllegalComponentStateException (a runtime ! * exception) if the content pane parameter is <code>null</code> * @see RootPaneContainer#getContentPane * @beaninfo * bound: true * hidden: true * description: The client area of the internal frame where child --- 616,632 ---- return getRootPane().getContentPane(); } /** ! * Sets this {@code JInternalFrame}'s {@code contentPane} * property. * * @param c the content pane for this internal frame * * @exception java.awt.IllegalComponentStateException (a runtime ! * exception) if the content pane parameter is {@code null} * @see RootPaneContainer#getContentPane * @beaninfo * bound: true * hidden: true * description: The client area of the internal frame where child
*** 639,664 **** } /** * Returns the layered pane for this internal frame. * ! * @return a <code>JLayeredPane</code> object * @see RootPaneContainer#setLayeredPane * @see RootPaneContainer#getLayeredPane */ public JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); } /** ! * Sets this <code>JInternalFrame</code>'s ! * <code>layeredPane</code> property. * ! * @param layered the <code>JLayeredPane</code> for this internal frame * * @exception java.awt.IllegalComponentStateException (a runtime ! * exception) if the layered pane parameter is <code>null</code> * @see RootPaneContainer#setLayeredPane * @beaninfo * hidden: true * bound: true * description: The pane which holds the various desktop layers. --- 639,664 ---- } /** * Returns the layered pane for this internal frame. * ! * @return a {@code JLayeredPane} object * @see RootPaneContainer#setLayeredPane * @see RootPaneContainer#getLayeredPane */ public JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); } /** ! * Sets this {@code JInternalFrame}'s ! * {@code layeredPane} property. * ! * @param layered the {@code JLayeredPane} for this internal frame * * @exception java.awt.IllegalComponentStateException (a runtime ! * exception) if the layered pane parameter is {@code null} * @see RootPaneContainer#setLayeredPane * @beaninfo * hidden: true * bound: true * description: The pane which holds the various desktop layers.
*** 678,689 **** public Component getGlassPane() { return getRootPane().getGlassPane(); } /** ! * Sets this <code>JInternalFrame</code>'s ! * <code>glassPane</code> property. * * @param glass the glass pane for this internal frame * @see RootPaneContainer#getGlassPane * @beaninfo * bound: true --- 678,689 ---- public Component getGlassPane() { return getRootPane().getGlassPane(); } /** ! * Sets this {@code JInternalFrame}'s ! * {@code glassPane} property. * * @param glass the glass pane for this internal frame * @see RootPaneContainer#getGlassPane * @beaninfo * bound: true
*** 695,720 **** getRootPane().setGlassPane(glass); firePropertyChange(GLASS_PANE_PROPERTY, oldValue, glass); } /** ! * Returns the <code>rootPane</code> object for this internal frame. * ! * @return the <code>rootPane</code> property * @see RootPaneContainer#getRootPane */ public JRootPane getRootPane() { return rootPane; } /** ! * Sets the <code>rootPane</code> property ! * for this <code>JInternalFrame</code>. * This method is called by the constructor. * ! * @param root the new <code>JRootPane</code> object * @beaninfo * bound: true * hidden: true * description: The root pane used by this internal frame. */ --- 695,720 ---- getRootPane().setGlassPane(glass); firePropertyChange(GLASS_PANE_PROPERTY, oldValue, glass); } /** ! * Returns the {@code rootPane} object for this internal frame. * ! * @return the {@code rootPane} property * @see RootPaneContainer#getRootPane */ public JRootPane getRootPane() { return rootPane; } /** ! * Sets the {@code rootPane} property ! * for this {@code JInternalFrame}. * This method is called by the constructor. * ! * @param root the new {@code JRootPane} object * @beaninfo * bound: true * hidden: true * description: The root pane used by this internal frame. */
*** 736,748 **** } firePropertyChange(ROOT_PANE_PROPERTY, oldValue, root); } /** ! * Sets whether this <code>JInternalFrame</code> can be closed by * some user action. ! * @param b a boolean value, where <code>true</code> means this internal frame can be closed * @beaninfo * preferred: true * bound: true * description: Indicates whether this internal frame can be closed. */ --- 736,748 ---- } firePropertyChange(ROOT_PANE_PROPERTY, oldValue, root); } /** ! * Sets whether this {@code JInternalFrame} can be closed by * some user action. ! * @param b a boolean value, where {@code true} means this internal frame can be closed * @beaninfo * preferred: true * bound: true * description: Indicates whether this internal frame can be closed. */
*** 752,809 **** closable = b; firePropertyChange("closable", oldValue, newValue); } /** ! * Returns whether this <code>JInternalFrame</code> can be closed by * some user action. ! * @return <code>true</code> if this internal frame can be closed */ public boolean isClosable() { return closable; } /** ! * Returns whether this <code>JInternalFrame</code> is currently closed. ! * @return <code>true</code> if this internal frame is closed, <code>false</code> otherwise */ public boolean isClosed() { return isClosed; } /** ! * Closes this internal frame if the argument is <code>true</code>. ! * Do not invoke this method with a <code>false</code> argument; ! * the result of invoking <code>setClosed(false)</code> * is unspecified. * * <p> * * If the internal frame is already closed, * this method does nothing and returns immediately. * Otherwise, * this method begins by firing ! * an <code>INTERNAL_FRAME_CLOSING</code> event. ! * Then this method sets the <code>closed</code> property to <code>true</code> * unless a listener vetoes the property change. * This method finishes by making the internal frame * invisible and unselected, ! * and then firing an <code>INTERNAL_FRAME_CLOSED</code> event. * * <p> * * <b>Note:</b> * To reuse an internal frame that has been closed, * you must add it to a container * (even if you never removed it from its previous container). ! * Typically, this container will be the <code>JDesktopPane</code> * that previously contained the internal frame. * ! * @param b must be <code>true</code> * * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the <code>JInternalFrame</code> * * @see #isClosed() * @see #setDefaultCloseOperation * @see #dispose * @see javax.swing.event.InternalFrameEvent#INTERNAL_FRAME_CLOSING --- 752,809 ---- closable = b; firePropertyChange("closable", oldValue, newValue); } /** ! * Returns whether this {@code JInternalFrame} can be closed by * some user action. ! * @return {@code true} if this internal frame can be closed */ public boolean isClosable() { return closable; } /** ! * Returns whether this {@code JInternalFrame} is currently closed. ! * @return {@code true} if this internal frame is closed, {@code false} otherwise */ public boolean isClosed() { return isClosed; } /** ! * Closes this internal frame if the argument is {@code true}. ! * Do not invoke this method with a {@code false} argument; ! * the result of invoking {@code setClosed(false)} * is unspecified. * * <p> * * If the internal frame is already closed, * this method does nothing and returns immediately. * Otherwise, * this method begins by firing ! * an {@code INTERNAL_FRAME_CLOSING} event. ! * Then this method sets the {@code closed} property to {@code true} * unless a listener vetoes the property change. * This method finishes by making the internal frame * invisible and unselected, ! * and then firing an {@code INTERNAL_FRAME_CLOSED} event. * * <p> * * <b>Note:</b> * To reuse an internal frame that has been closed, * you must add it to a container * (even if you never removed it from its previous container). ! * Typically, this container will be the {@code JDesktopPane} * that previously contained the internal frame. * ! * @param b must be {@code true} * * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the {@code JInternalFrame} * * @see #isClosed() * @see #setDefaultCloseOperation * @see #dispose * @see javax.swing.event.InternalFrameEvent#INTERNAL_FRAME_CLOSING
*** 838,851 **** // opened = true; } } /** ! * Sets whether the <code>JInternalFrame</code> can be resized by some * user action. * ! * @param b a boolean, where <code>true</code> means this internal frame can be resized * @beaninfo * preferred: true * bound: true * description: Determines whether this internal frame can be resized * by the user. --- 838,851 ---- // opened = true; } } /** ! * Sets whether the {@code JInternalFrame} can be resized by some * user action. * ! * @param b a boolean, where {@code true} means this internal frame can be resized * @beaninfo * preferred: true * bound: true * description: Determines whether this internal frame can be resized * by the user.
*** 856,884 **** resizable = b; firePropertyChange("resizable", oldValue, newValue); } /** ! * Returns whether the <code>JInternalFrame</code> can be resized * by some user action. * ! * @return <code>true</code> if this internal frame can be resized, <code>false</code> otherwise */ public boolean isResizable() { // don't allow resizing when maximized. return isMaximum ? false : resizable; } /** ! * Sets the <code>iconable</code> property, ! * which must be <code>true</code> * for the user to be able to ! * make the <code>JInternalFrame</code> an icon. * Some look and feels might not implement iconification; * they will ignore this property. * ! * @param b a boolean, where <code>true</code> means this internal frame can be iconified * @beaninfo * preferred: true bound: true * description: Determines whether this internal frame can be iconified. */ --- 856,884 ---- resizable = b; firePropertyChange("resizable", oldValue, newValue); } /** ! * Returns whether the {@code JInternalFrame} can be resized * by some user action. * ! * @return {@code true} if this internal frame can be resized, {@code false} otherwise */ public boolean isResizable() { // don't allow resizing when maximized. return isMaximum ? false : resizable; } /** ! * Sets the {@code iconable} property, ! * which must be {@code true} * for the user to be able to ! * make the {@code JInternalFrame} an icon. * Some look and feels might not implement iconification; * they will ignore this property. * ! * @param b a boolean, where {@code true} means this internal frame can be iconified * @beaninfo * preferred: true bound: true * description: Determines whether this internal frame can be iconified. */
*** 888,929 **** iconable = b; firePropertyChange("iconable", oldValue, newValue); } /** ! * Gets the <code>iconable</code> property, ! * which by default is <code>false</code>. * ! * @return the value of the <code>iconable</code> property. * * @see #setIconifiable */ public boolean isIconifiable() { return iconable; } /** ! * Returns whether the <code>JInternalFrame</code> is currently iconified. * ! * @return <code>true</code> if this internal frame is iconified */ public boolean isIcon() { return isIcon; } /** * Iconifies or de-iconifies this internal frame, * if the look and feel supports iconification. * If the internal frame's state changes to iconified, ! * this method fires an <code>INTERNAL_FRAME_ICONIFIED</code> event. * If the state changes to de-iconified, ! * an <code>INTERNAL_FRAME_DEICONIFIED</code> event is fired. * ! * @param b a boolean, where <code>true</code> means to iconify this internal frame and ! * <code>false</code> means to de-iconify it * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the <code>JInternalFrame</code> * * @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED * @see InternalFrameEvent#INTERNAL_FRAME_DEICONIFIED * * @beaninfo --- 888,929 ---- iconable = b; firePropertyChange("iconable", oldValue, newValue); } /** ! * Gets the {@code iconable} property, ! * which by default is {@code false}. * ! * @return the value of the {@code iconable} property. * * @see #setIconifiable */ public boolean isIconifiable() { return iconable; } /** ! * Returns whether the {@code JInternalFrame} is currently iconified. * ! * @return {@code true} if this internal frame is iconified */ public boolean isIcon() { return isIcon; } /** * Iconifies or de-iconifies this internal frame, * if the look and feel supports iconification. * If the internal frame's state changes to iconified, ! * this method fires an {@code INTERNAL_FRAME_ICONIFIED} event. * If the state changes to de-iconified, ! * an {@code INTERNAL_FRAME_DEICONIFIED} event is fired. * ! * @param b a boolean, where {@code true} means to iconify this internal frame and ! * {@code false} means to de-iconify it * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the {@code JInternalFrame} * * @see InternalFrameEvent#INTERNAL_FRAME_ICONIFIED * @see InternalFrameEvent#INTERNAL_FRAME_DEICONIFIED * * @beaninfo
*** 954,971 **** else fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED); } /** ! * Sets the <code>maximizable</code> property, ! * which determines whether the <code>JInternalFrame</code> * can be maximized by * some user action. * Some look and feels might not support maximizing internal frames; * they will ignore this property. * ! * @param b <code>true</code> to specify that this internal frame should be maximizable; <code>false</code> to specify that it should not be * @beaninfo * bound: true * preferred: true * description: Determines whether this internal frame can be maximized. */ --- 954,971 ---- else fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED); } /** ! * Sets the {@code maximizable} property, ! * which determines whether the {@code JInternalFrame} * can be maximized by * some user action. * Some look and feels might not support maximizing internal frames; * they will ignore this property. * ! * @param b {@code true} to specify that this internal frame should be maximizable; {@code false} to specify that it should not be * @beaninfo * bound: true * preferred: true * description: Determines whether this internal frame can be maximized. */
*** 975,1013 **** maximizable = b; firePropertyChange("maximizable", oldValue, newValue); } /** ! * Gets the value of the <code>maximizable</code> property. * ! * @return the value of the <code>maximizable</code> property * @see #setMaximizable */ public boolean isMaximizable() { return maximizable; } /** ! * Returns whether the <code>JInternalFrame</code> is currently maximized. * ! * @return <code>true</code> if this internal frame is maximized, <code>false</code> otherwise */ public boolean isMaximum() { return isMaximum; } /** * Maximizes and restores this internal frame. A maximized frame is resized to ! * fully fit the <code>JDesktopPane</code> area associated with the ! * <code>JInternalFrame</code>. ! * A restored frame's size is set to the <code>JInternalFrame</code>'s * actual size. * ! * @param b a boolean, where <code>true</code> maximizes this internal frame and <code>false</code> * restores it * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the <code>JInternalFrame</code> * @beaninfo * bound: true * constrained: true * description: Indicates whether this internal frame is maximized. */ --- 975,1013 ---- maximizable = b; firePropertyChange("maximizable", oldValue, newValue); } /** ! * Gets the value of the {@code maximizable} property. * ! * @return the value of the {@code maximizable} property * @see #setMaximizable */ public boolean isMaximizable() { return maximizable; } /** ! * Returns whether the {@code JInternalFrame} is currently maximized. * ! * @return {@code true} if this internal frame is maximized, {@code false} otherwise */ public boolean isMaximum() { return isMaximum; } /** * Maximizes and restores this internal frame. A maximized frame is resized to ! * fully fit the {@code JDesktopPane} area associated with the ! * {@code JInternalFrame}. ! * A restored frame's size is set to the {@code JInternalFrame}'s * actual size. * ! * @param b a boolean, where {@code true} maximizes this internal frame and {@code false} * restores it * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the {@code JInternalFrame} * @beaninfo * bound: true * constrained: true * description: Indicates whether this internal frame is maximized. */
*** 1025,1049 **** isMaximum = b; firePropertyChange(IS_MAXIMUM_PROPERTY, oldValue, newValue); } /** ! * Returns the title of the <code>JInternalFrame</code>. * ! * @return a <code>String</code> containing this internal frame's title * @see #setTitle */ public String getTitle() { return title; } /** ! * Sets the <code>JInternalFrame</code> title. <code>title</code> ! * may have a <code>null</code> value. * @see #getTitle * ! * @param title the <code>String</code> to display in the title bar * @beaninfo * preferred: true * bound: true * description: The text displayed in the title bar. */ --- 1025,1049 ---- isMaximum = b; firePropertyChange(IS_MAXIMUM_PROPERTY, oldValue, newValue); } /** ! * Returns the title of the {@code JInternalFrame}. * ! * @return a {@code String} containing this internal frame's title * @see #setTitle */ public String getTitle() { return title; } /** ! * Sets the {@code JInternalFrame} title. {@code title} ! * may have a {@code null} value. * @see #getTitle * ! * @param title the {@code String} to display in the title bar * @beaninfo * preferred: true * bound: true * description: The text displayed in the title bar. */
*** 1054,1079 **** } /** * Selects or deselects the internal frame * if it's showing. ! * A <code>JInternalFrame</code> normally draws its title bar * differently if it is * the selected frame, which indicates to the user that this * internal frame has the focus. * When this method changes the state of the internal frame * from deselected to selected, it fires an ! * <code>InternalFrameEvent.INTERNAL_FRAME_ACTIVATED</code> event. * If the change is from selected to deselected, ! * an <code>InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED</code> event * is fired. * ! * @param selected a boolean, where <code>true</code> means this internal frame * should become selected (currently active) ! * and <code>false</code> means it should become deselected * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the <code>JInternalFrame</code> * * @see #isShowing * @see InternalFrameEvent#INTERNAL_FRAME_ACTIVATED * @see InternalFrameEvent#INTERNAL_FRAME_DEACTIVATED * --- 1054,1079 ---- } /** * Selects or deselects the internal frame * if it's showing. ! * A {@code JInternalFrame} normally draws its title bar * differently if it is * the selected frame, which indicates to the user that this * internal frame has the focus. * When this method changes the state of the internal frame * from deselected to selected, it fires an ! * {@code InternalFrameEvent.INTERNAL_FRAME_ACTIVATED} event. * If the change is from selected to deselected, ! * an {@code InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED} event * is fired. * ! * @param selected a boolean, where {@code true} means this internal frame * should become selected (currently active) ! * and {@code false} means it should become deselected * @exception PropertyVetoException when the attempt to set the ! * property is vetoed by the {@code JInternalFrame} * * @see #isShowing * @see InternalFrameEvent#INTERNAL_FRAME_ACTIVATED * @see InternalFrameEvent#INTERNAL_FRAME_DEACTIVATED *
*** 1125,1138 **** fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED); repaint(); } /** ! * Returns whether the <code>JInternalFrame</code> is the * currently "selected" or active frame. * ! * @return <code>true</code> if this internal frame is currently selected (active) * @see #setSelected */ public boolean isSelected() { return isSelected; } --- 1125,1138 ---- fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED); repaint(); } /** ! * Returns whether the {@code JInternalFrame} is the * currently "selected" or active frame. * ! * @return {@code true} if this internal frame is currently selected (active) * @see #setSelected */ public boolean isSelected() { return isSelected; }
*** 1140,1159 **** /** * Sets an image to be displayed in the titlebar of this internal frame (usually * in the top-left corner). * Some look and feels might not support displaying an icon in the titlebar. * ! * This image is not the <code>desktopIcon</code> object, which ! * is the image displayed in the <code>JDesktop</code> when * this internal frame is iconified. * ! * Passing <code>null</code> to this function is valid, * but the look and feel can choose the appropriate behavior * for that situation, such as displaying no icon * or a default icon for the look and feel. * ! * @param icon the <code>Icon</code> to display in the title bar * @see #getFrameIcon * @beaninfo * bound: true * description: The icon shown in the top-left corner of this internal frame. */ --- 1140,1159 ---- /** * Sets an image to be displayed in the titlebar of this internal frame (usually * in the top-left corner). * Some look and feels might not support displaying an icon in the titlebar. * ! * This image is not the {@code desktopIcon} object, which ! * is the image displayed in the {@code JDesktop} when * this internal frame is iconified. * ! * Passing {@code null} to this function is valid, * but the look and feel can choose the appropriate behavior * for that situation, such as displaying no icon * or a default icon for the look and feel. * ! * @param icon the {@code Icon} to display in the title bar * @see #getFrameIcon * @beaninfo * bound: true * description: The icon shown in the top-left corner of this internal frame. */
*** 1165,1184 **** /** * Returns the image displayed in the title bar of this internal frame (usually * in the top-left corner). * ! * @return the <code>Icon</code> displayed in the title bar * @see #setFrameIcon */ public Icon getFrameIcon() { return frameIcon; } /** * Convenience method that moves this component to position 0 if its ! * parent is a <code>JLayeredPane</code>. */ public void moveToFront() { if (isIcon()) { if (getDesktopIcon().getParent() instanceof JLayeredPane) { ((JLayeredPane)getDesktopIcon().getParent()). --- 1165,1184 ---- /** * Returns the image displayed in the title bar of this internal frame (usually * in the top-left corner). * ! * @return the {@code Icon} displayed in the title bar * @see #setFrameIcon */ public Icon getFrameIcon() { return frameIcon; } /** * Convenience method that moves this component to position 0 if its ! * parent is a {@code JLayeredPane}. */ public void moveToFront() { if (isIcon()) { if (getDesktopIcon().getParent() instanceof JLayeredPane) { ((JLayeredPane)getDesktopIcon().getParent()).
*** 1190,1200 **** } } /** * Convenience method that moves this component to position -1 if its ! * parent is a <code>JLayeredPane</code>. */ public void moveToBack() { if (isIcon()) { if (getDesktopIcon().getParent() instanceof JLayeredPane) { ((JLayeredPane)getDesktopIcon().getParent()). --- 1190,1200 ---- } } /** * Convenience method that moves this component to position -1 if its ! * parent is a {@code JLayeredPane}. */ public void moveToBack() { if (isIcon()) { if (getDesktopIcon().getParent() instanceof JLayeredPane) { ((JLayeredPane)getDesktopIcon().getParent()).
*** 1205,1219 **** ((JLayeredPane)getParent()).moveToBack(this); } } /** ! * Returns the last <code>Cursor</code> that was set by the ! * <code>setCursor</code> method that is not a resizable ! * <code>Cursor</code>. * ! * @return the last non-resizable <code>Cursor</code> * @since 1.6 */ public Cursor getLastCursor() { return lastCursor; } --- 1205,1219 ---- ((JLayeredPane)getParent()).moveToBack(this); } } /** ! * Returns the last {@code Cursor} that was set by the ! * {@code setCursor} method that is not a resizable ! * {@code Cursor}. * ! * @return the last non-resizable {@code Cursor} * @since 1.6 */ public Cursor getLastCursor() { return lastCursor; }
*** 1243,1253 **** } /** * Convenience method for setting the layer attribute of this component. * ! * @param layer an <code>Integer</code> object specifying this * frame's desktop layer * @throws NullPointerException if {@code layer} is {@code null} * @see JLayeredPane * @beaninfo * expert: true --- 1243,1253 ---- } /** * Convenience method for setting the layer attribute of this component. * ! * @param layer an {@code Integer} object specifying this * frame's desktop layer * @throws NullPointerException if {@code layer} is {@code null} * @see JLayeredPane * @beaninfo * expert: true
*** 1267,1279 **** } } /** * Convenience method for setting the layer attribute of this component. ! * The method <code>setLayer(Integer)</code> should be used for ! * layer values predefined in <code>JLayeredPane</code>. ! * When using <code>setLayer(int)</code>, care must be taken not to * accidentally clash with those values. * * @param layer an integer specifying this internal frame's desktop layer * * @since 1.3 --- 1267,1279 ---- } } /** * Convenience method for setting the layer attribute of this component. ! * The method {@code setLayer(Integer)} should be used for ! * layer values predefined in {@code JLayeredPane}. ! * When using {@code setLayer(int)}, care must be taken not to * accidentally clash with those values. * * @param layer an integer specifying this internal frame's desktop layer * * @since 1.3
*** 1289,1313 **** } /** * Convenience method for getting the layer attribute of this component. * ! * @return an <code>Integer</code> object specifying this * frame's desktop layer * @see JLayeredPane */ public int getLayer() { return JLayeredPane.getLayer(this); } /** * Convenience method that searches the ancestor hierarchy for a ! * <code>JDesktop</code> instance. If <code>JInternalFrame</code> ! * finds none, the <code>desktopIcon</code> tree is searched. * ! * @return the <code>JDesktopPane</code> this internal frame belongs to, ! * or <code>null</code> if none is found */ public JDesktopPane getDesktopPane() { Container p; // Search upward for desktop --- 1289,1313 ---- } /** * Convenience method for getting the layer attribute of this component. * ! * @return an {@code Integer} object specifying this * frame's desktop layer * @see JLayeredPane */ public int getLayer() { return JLayeredPane.getLayer(this); } /** * Convenience method that searches the ancestor hierarchy for a ! * {@code JDesktop} instance. If {@code JInternalFrame} ! * finds none, the {@code desktopIcon} tree is searched. * ! * @return the {@code JDesktopPane} this internal frame belongs to, ! * or {@code null} if none is found */ public JDesktopPane getDesktopPane() { Container p; // Search upward for desktop
*** 1324,1337 **** return (JDesktopPane)p; } /** ! * Sets the <code>JDesktopIcon</code> associated with this ! * <code>JInternalFrame</code>. * ! * @param d the <code>JDesktopIcon</code> to display on the desktop * @see #getDesktopIcon * @beaninfo * bound: true * description: The icon shown when this internal frame is minimized. */ --- 1324,1337 ---- return (JDesktopPane)p; } /** ! * Sets the {@code JDesktopIcon} associated with this ! * {@code JInternalFrame}. * ! * @param d the {@code JDesktopIcon} to display on the desktop * @see #getDesktopIcon * @beaninfo * bound: true * description: The icon shown when this internal frame is minimized. */
*** 1340,1365 **** desktopIcon = d; firePropertyChange("desktopIcon", oldValue, d); } /** ! * Returns the <code>JDesktopIcon</code> used when this ! * <code>JInternalFrame</code> is iconified. * ! * @return the <code>JDesktopIcon</code> displayed on the desktop * @see #setDesktopIcon */ public JDesktopIcon getDesktopIcon() { return desktopIcon; } /** ! * If the <code>JInternalFrame</code> is not in maximized state, returns ! * <code>getBounds()</code>; otherwise, returns the bounds that the ! * <code>JInternalFrame</code> would be restored to. * ! * @return a <code>Rectangle</code> containing the bounds of this * frame when in the normal state * @since 1.3 */ public Rectangle getNormalBounds() { --- 1340,1365 ---- desktopIcon = d; firePropertyChange("desktopIcon", oldValue, d); } /** ! * Returns the {@code JDesktopIcon} used when this ! * {@code JInternalFrame} is iconified. * ! * @return the {@code JDesktopIcon} displayed on the desktop * @see #setDesktopIcon */ public JDesktopIcon getDesktopIcon() { return desktopIcon; } /** ! * If the {@code JInternalFrame} is not in maximized state, returns ! * {@code getBounds()}; otherwise, returns the bounds that the ! * {@code JInternalFrame} would be restored to. * ! * @return a {@code Rectangle} containing the bounds of this * frame when in the normal state * @since 1.3 */ public Rectangle getNormalBounds() {
*** 1387,1427 **** public void setNormalBounds(Rectangle r) { normalBounds = r; } /** ! * If this <code>JInternalFrame</code> is active, * returns the child that has focus. ! * Otherwise, returns <code>null</code>. * ! * @return the component with focus, or <code>null</code> if no children have focus * @since 1.3 */ public Component getFocusOwner() { if (isSelected()) { return lastFocusOwner; } return null; } /** ! * Returns the child component of this <code>JInternalFrame</code> * that will receive the ! * focus when this <code>JInternalFrame</code> is selected. ! * If this <code>JInternalFrame</code> is * currently selected, this method returns the same component as ! * the <code>getFocusOwner</code> method. ! * If this <code>JInternalFrame</code> is not selected, * then the child component that most recently requested focus will be * returned. If no child component has ever requested focus, then this ! * <code>JInternalFrame</code>'s initial focusable component is returned. * If no such ! * child exists, then this <code>JInternalFrame</code>'s default component * to focus is returned. * * @return the child component that will receive focus when this ! * <code>JInternalFrame</code> is selected * @see #getFocusOwner * @see #isSelected * @since 1.4 */ public Component getMostRecentFocusOwner() { --- 1387,1427 ---- public void setNormalBounds(Rectangle r) { normalBounds = r; } /** ! * If this {@code JInternalFrame} is active, * returns the child that has focus. ! * Otherwise, returns {@code null}. * ! * @return the component with focus, or {@code null} if no children have focus * @since 1.3 */ public Component getFocusOwner() { if (isSelected()) { return lastFocusOwner; } return null; } /** ! * Returns the child component of this {@code JInternalFrame} * that will receive the ! * focus when this {@code JInternalFrame} is selected. ! * If this {@code JInternalFrame} is * currently selected, this method returns the same component as ! * the {@code getFocusOwner} method. ! * If this {@code JInternalFrame} is not selected, * then the child component that most recently requested focus will be * returned. If no child component has ever requested focus, then this ! * {@code JInternalFrame}'s initial focusable component is returned. * If no such ! * child exists, then this {@code JInternalFrame}'s default component * to focus is returned. * * @return the child component that will receive focus when this ! * {@code JInternalFrame} is selected * @see #getFocusOwner * @see #isSelected * @since 1.4 */ public Component getMostRecentFocusOwner() {
*** 1526,1540 **** public void removeInternalFrameListener(InternalFrameListener l) { // remind: sync?? listenerList.remove(InternalFrameListener.class, l); } /** ! * Returns an array of all the <code>InternalFrameListener</code>s added ! * to this <code>JInternalFrame</code> with ! * <code>addInternalFrameListener</code>. * ! * @return all of the <code>InternalFrameListener</code>s added or an empty * array if no listeners have been added * @since 1.4 * * @see #addInternalFrameListener */ --- 1526,1540 ---- public void removeInternalFrameListener(InternalFrameListener l) { // remind: sync?? listenerList.remove(InternalFrameListener.class, l); } /** ! * Returns an array of all the {@code InternalFrameListener}s added ! * to this {@code JInternalFrame} with ! * {@code addInternalFrameListener}. * ! * @return all of the {@code InternalFrameListener}s added or an empty * array if no listeners have been added * @since 1.4 * * @see #addInternalFrameListener */
*** 1546,1562 **** /** * Fires an internal frame event. * * @param id the type of the event being fired; one of the following: * <ul> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_OPENED</code> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_CLOSING</code> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_CLOSED</code> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_ICONIFIED</code> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED</code> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_ACTIVATED</code> ! * <li><code>InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED</code> * </ul> * If the event type is not one of the above, nothing happens. */ protected void fireInternalFrameEvent(int id){ Object[] listeners = listenerList.getListenerList(); --- 1546,1562 ---- /** * Fires an internal frame event. * * @param id the type of the event being fired; one of the following: * <ul> ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_OPENED} ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_CLOSING} ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_CLOSED} ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_ICONIFIED} ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED} ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_ACTIVATED} ! * <li>{@code InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED} * </ul> * If the event type is not one of the above, nothing happens. */ protected void fireInternalFrameEvent(int id){ Object[] listeners = listenerList.getListenerList();
*** 1601,1611 **** // } } /** * Fires an ! * <code>INTERNAL_FRAME_CLOSING</code> event * and then performs the action specified by * the internal frame's default close operation. * This method is typically invoked by the * look-and-feel-implemented action handler * for the internal frame's close button. --- 1601,1611 ---- // } } /** * Fires an ! * {@code INTERNAL_FRAME_CLOSING} event * and then performs the action specified by * the internal frame's default close operation. * This method is typically invoked by the * look-and-feel-implemented action handler * for the internal frame's close button.
*** 1649,1681 **** * Sets the operation that will happen by default when * the user initiates a "close" on this internal frame. * The possible choices are: * <br><br> * <dl> ! * <dt><code>DO_NOTHING_ON_CLOSE</code> * <dd> Do nothing. * This requires the program to handle the operation ! * in the <code>internalFrameClosing</code> method ! * of a registered <code>InternalFrameListener</code> object. ! * <dt><code>HIDE_ON_CLOSE</code> * <dd> Automatically make the internal frame invisible. ! * <dt><code>DISPOSE_ON_CLOSE</code> * <dd> Automatically dispose of the internal frame. * </dl> * <p> ! * The default value is <code>DISPOSE_ON_CLOSE</code>. * Before performing the specified close operation, * the internal frame fires ! * an <code>INTERNAL_FRAME_CLOSING</code> event. * * @param operation one of the following constants defined in ! * <code>javax.swing.WindowConstants</code> * (an interface implemented by ! * <code>JInternalFrame</code>): ! * <code>DO_NOTHING_ON_CLOSE</code>, ! * <code>HIDE_ON_CLOSE</code>, or ! * <code>DISPOSE_ON_CLOSE</code> * * @see #addInternalFrameListener * @see #getDefaultCloseOperation * @see #setVisible * @see #dispose --- 1649,1681 ---- * Sets the operation that will happen by default when * the user initiates a "close" on this internal frame. * The possible choices are: * <br><br> * <dl> ! * <dt>{@code DO_NOTHING_ON_CLOSE} * <dd> Do nothing. * This requires the program to handle the operation ! * in the {@code internalFrameClosing} method ! * of a registered {@code InternalFrameListener} object. ! * <dt>{@code HIDE_ON_CLOSE} * <dd> Automatically make the internal frame invisible. ! * <dt>{@code DISPOSE_ON_CLOSE} * <dd> Automatically dispose of the internal frame. * </dl> * <p> ! * The default value is {@code DISPOSE_ON_CLOSE}. * Before performing the specified close operation, * the internal frame fires ! * an {@code INTERNAL_FRAME_CLOSING} event. * * @param operation one of the following constants defined in ! * {@code javax.swing.WindowConstants} * (an interface implemented by ! * {@code JInternalFrame}): ! * {@code DO_NOTHING_ON_CLOSE}, ! * {@code HIDE_ON_CLOSE}, or ! * {@code DISPOSE_ON_CLOSE} * * @see #addInternalFrameListener * @see #getDefaultCloseOperation * @see #setVisible * @see #dispose
*** 1695,1705 **** public int getDefaultCloseOperation() { return defaultCloseOperation; } /** ! * Causes subcomponents of this <code>JInternalFrame</code> * to be laid out at their preferred size. Internal frames that are * iconized or maximized are first restored and then packed. If the * internal frame is unable to be restored its state is not changed * and will not be packed. * --- 1695,1705 ---- public int getDefaultCloseOperation() { return defaultCloseOperation; } /** ! * Causes subcomponents of this {@code JInternalFrame} * to be laid out at their preferred size. Internal frames that are * iconized or maximized are first restored and then packed. If the * internal frame is unable to be restored its state is not changed * and will not be packed. *
*** 1723,1737 **** * If the internal frame is not visible, * brings the internal frame to the front, * makes it visible, * and attempts to select it. * The first time the internal frame is made visible, ! * this method also fires an <code>INTERNAL_FRAME_OPENED</code> event. * This method does nothing if the internal frame is already visible. * Invoking this method * has the same result as invoking ! * <code>setVisible(true)</code>. * * @see #moveToFront * @see #setSelected * @see InternalFrameEvent#INTERNAL_FRAME_OPENED * @see #setVisible --- 1723,1737 ---- * If the internal frame is not visible, * brings the internal frame to the front, * makes it visible, * and attempts to select it. * The first time the internal frame is made visible, ! * this method also fires an {@code INTERNAL_FRAME_OPENED} event. * This method does nothing if the internal frame is already visible. * Invoking this method * has the same result as invoking ! * {@code setVisible(true)}. * * @see #moveToFront * @see #setSelected * @see InternalFrameEvent#INTERNAL_FRAME_OPENED * @see #setVisible
*** 1779,1794 **** /** * Makes this internal frame * invisible, unselected, and closed. * If the frame is not already closed, * this method fires an ! * <code>INTERNAL_FRAME_CLOSED</code> event. * The results of invoking this method are similar to ! * <code>setClosed(true)</code>, ! * but <code>dispose</code> always succeeds in closing * the internal frame and does not fire ! * an <code>INTERNAL_FRAME_CLOSING</code> event. * * @see javax.swing.event.InternalFrameEvent#INTERNAL_FRAME_CLOSED * @see #setVisible * @see #setSelected * @see #setClosed --- 1779,1794 ---- /** * Makes this internal frame * invisible, unselected, and closed. * If the frame is not already closed, * this method fires an ! * {@code INTERNAL_FRAME_CLOSED} event. * The results of invoking this method are similar to ! * {@code setClosed(true)}, ! * but {@code dispose} always succeeds in closing * the internal frame and does not fire ! * an {@code INTERNAL_FRAME_CLOSING} event. * * @see javax.swing.event.InternalFrameEvent#INTERNAL_FRAME_CLOSED * @see #setVisible * @see #setSelected * @see #setClosed
*** 1834,1844 **** public void toBack() { moveToBack(); } /** ! * Does nothing because <code>JInternalFrame</code>s must always be roots of a focus * traversal cycle. * * @param focusCycleRoot this value is ignored * @see #isFocusCycleRoot * @see java.awt.Container#setFocusTraversalPolicy --- 1834,1844 ---- public void toBack() { moveToBack(); } /** ! * Does nothing because {@code JInternalFrame}s must always be roots of a focus * traversal cycle. * * @param focusCycleRoot this value is ignored * @see #isFocusCycleRoot * @see java.awt.Container#setFocusTraversalPolicy
*** 1847,1875 **** */ public final void setFocusCycleRoot(boolean focusCycleRoot) { } /** ! * Always returns <code>true</code> because all <code>JInternalFrame</code>s must be * roots of a focus traversal cycle. * ! * @return <code>true</code> * @see #setFocusCycleRoot * @see java.awt.Container#setFocusTraversalPolicy * @see java.awt.Container#getFocusTraversalPolicy * @since 1.4 */ public final boolean isFocusCycleRoot() { return true; } /** ! * Always returns <code>null</code> because <code>JInternalFrame</code>s * must always be roots of a focus * traversal cycle. * ! * @return <code>null</code> * @see java.awt.Container#isFocusCycleRoot() * @since 1.4 */ public final Container getFocusCycleRootAncestor() { return null; --- 1847,1875 ---- */ public final void setFocusCycleRoot(boolean focusCycleRoot) { } /** ! * Always returns {@code true} because all {@code JInternalFrame}s must be * roots of a focus traversal cycle. * ! * @return {@code true} * @see #setFocusCycleRoot * @see java.awt.Container#setFocusTraversalPolicy * @see java.awt.Container#getFocusTraversalPolicy * @since 1.4 */ public final boolean isFocusCycleRoot() { return true; } /** ! * Always returns {@code null} because {@code JInternalFrame}s * must always be roots of a focus * traversal cycle. * ! * @return {@code null} * @see java.awt.Container#isFocusCycleRoot() * @since 1.4 */ public final Container getFocusCycleRootAncestor() { return null;
*** 1877,1897 **** /** * Gets the warning string that is displayed with this internal frame. * Since an internal frame is always secure (since it's fully * contained within a window that might need a warning string) ! * this method always returns <code>null</code>. ! * @return <code>null</code> * @see java.awt.Window#getWarningString */ public final String getWarningString() { return null; } /** ! * See <code>readObject</code> and <code>writeObject</code> ! * in <code>JComponent</code> for more * information about serialization in Swing. */ private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); if (getUIClassID().equals(uiClassID)) { --- 1877,1897 ---- /** * Gets the warning string that is displayed with this internal frame. * Since an internal frame is always secure (since it's fully * contained within a window that might need a warning string) ! * this method always returns {@code null}. ! * @return {@code null} * @see java.awt.Window#getWarningString */ public final String getWarningString() { return null; } /** ! * See {@code readObject} and {@code writeObject} ! * in {@code JComponent} for more * information about serialization in Swing. */ private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); if (getUIClassID().equals(uiClassID)) {
*** 1923,1940 **** setRootPaneCheckingEnabled(old); } } /** ! * Returns a string representation of this <code>JInternalFrame</code>. * This method * is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not ! * be <code>null</code>. * ! * @return a string representation of this <code>JInternalFrame</code> */ protected String paramString() { String rootPaneString = (rootPane != null ? rootPane.toString() : ""); String rootPaneCheckingEnabledString = (rootPaneCheckingEnabled ? --- 1923,1940 ---- setRootPaneCheckingEnabled(old); } } /** ! * Returns a string representation of this {@code JInternalFrame}. * This method * is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not ! * be {@code null}. * ! * @return a string representation of this {@code JInternalFrame} */ protected String paramString() { String rootPaneString = (rootPane != null ? rootPane.toString() : ""); String rootPaneCheckingEnabledString = (rootPaneCheckingEnabled ?
*** 2004,2023 **** ///////////////// // Accessibility support //////////////// /** ! * Gets the <code>AccessibleContext</code> associated with this ! * <code>JInternalFrame</code>. ! * For internal frames, the <code>AccessibleContext</code> * takes the form of an ! * <code>AccessibleJInternalFrame</code> object. ! * A new <code>AccessibleJInternalFrame</code> instance is created if necessary. * ! * @return an <code>AccessibleJInternalFrame</code> that serves as the ! * <code>AccessibleContext</code> of this ! * <code>JInternalFrame</code> * @see AccessibleJInternalFrame */ public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJInternalFrame(); --- 2004,2023 ---- ///////////////// // Accessibility support //////////////// /** ! * Gets the {@code AccessibleContext} associated with this ! * {@code JInternalFrame}. ! * For internal frames, the {@code AccessibleContext} * takes the form of an ! * {@code AccessibleJInternalFrame} object. ! * A new {@code AccessibleJInternalFrame} instance is created if necessary. * ! * @return an {@code AccessibleJInternalFrame} that serves as the ! * {@code AccessibleContext} of this ! * {@code JInternalFrame} * @see AccessibleJInternalFrame */ public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJInternalFrame();
*** 2025,2055 **** return accessibleContext; } /** * This class implements accessibility support for the ! * <code>JInternalFrame</code> class. It provides an implementation of the * Java Accessibility API appropriate to internal frame user-interface * elements. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJInternalFrame extends AccessibleJComponent implements AccessibleValue { /** * Get the accessible name of this object. * ! * @return the localized name of the object -- can be <code>null</code> if this * object does not have a name * @see #setAccessibleName */ public String getAccessibleName() { String name = accessibleName; --- 2025,2055 ---- return accessibleContext; } /** * This class implements accessibility support for the ! * {@code JInternalFrame} class. It provides an implementation of the * Java Accessibility API appropriate to internal frame user-interface * elements. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJInternalFrame extends AccessibleJComponent implements AccessibleValue { /** * Get the accessible name of this object. * ! * @return the localized name of the object -- can be {@code null} if this * object does not have a name * @see #setAccessibleName */ public String getAccessibleName() { String name = accessibleName;
*** 2076,2086 **** /** * Gets the AccessibleValue associated with this object. In the * implementation of the Java Accessibility API for this class, * returns this object, which is responsible for implementing the ! * <code>AccessibleValue</code> interface on behalf of itself. * * @return this object */ public AccessibleValue getAccessibleValue() { return this; --- 2076,2086 ---- /** * Gets the AccessibleValue associated with this object. In the * implementation of the Java Accessibility API for this class, * returns this object, which is responsible for implementing the ! * {@code AccessibleValue} interface on behalf of itself. * * @return this object */ public AccessibleValue getAccessibleValue() { return this;
*** 2092,2112 **** // /** * Get the value of this object as a Number. * ! * @return value of the object -- can be <code>null</code> if this object does not * have a value */ public Number getCurrentAccessibleValue() { return Integer.valueOf(getLayer()); } /** * Set the value of this object as a Number. * ! * @return <code>true</code> if the value was set */ public boolean setCurrentAccessibleValue(Number n) { // TIGER - 4422535 if (n == null) { return false; --- 2092,2112 ---- // /** * Get the value of this object as a Number. * ! * @return value of the object -- can be {@code null} if this object does not * have a value */ public Number getCurrentAccessibleValue() { return Integer.valueOf(getLayer()); } /** * Set the value of this object as a Number. * ! * @return {@code true} if the value was set */ public boolean setCurrentAccessibleValue(Number n) { // TIGER - 4422535 if (n == null) { return false;
*** 2116,2161 **** } /** * Get the minimum value of this object as a Number. * ! * @return Minimum value of the object; <code>null</code> if this object does not * have a minimum value */ public Number getMinimumAccessibleValue() { return Integer.MIN_VALUE; } /** * Get the maximum value of this object as a Number. * ! * @return Maximum value of the object; <code>null</code> if this object does not * have a maximum value */ public Number getMaximumAccessibleValue() { return Integer.MAX_VALUE; } } // AccessibleJInternalFrame /** * This component represents an iconified version of a ! * <code>JInternalFrame</code>. * This API should NOT BE USED by Swing applications, as it will go * away in future versions of Swing as its functionality is moved into ! * <code>JInternalFrame</code>. This class is public only so that * UI objects can display a desktop icon. If an application * wants to display a desktop icon, it should create a ! * <code>JInternalFrame</code> instance and iconify it. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @author David Kloba */ @SuppressWarnings("serial") // Same-version serialization only --- 2116,2161 ---- } /** * Get the minimum value of this object as a Number. * ! * @return Minimum value of the object; {@code null} if this object does not * have a minimum value */ public Number getMinimumAccessibleValue() { return Integer.MIN_VALUE; } /** * Get the maximum value of this object as a Number. * ! * @return Maximum value of the object; {@code null} if this object does not * have a maximum value */ public Number getMaximumAccessibleValue() { return Integer.MAX_VALUE; } } // AccessibleJInternalFrame /** * This component represents an iconified version of a ! * {@code JInternalFrame}. * This API should NOT BE USED by Swing applications, as it will go * away in future versions of Swing as its functionality is moved into ! * {@code JInternalFrame}. This class is public only so that * UI objects can display a desktop icon. If an application * wants to display a desktop icon, it should create a ! * {@code JInternalFrame} instance and iconify it. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. * * @author David Kloba */ @SuppressWarnings("serial") // Same-version serialization only
*** 2164,2174 **** JInternalFrame internalFrame; /** * Creates an icon for an internal frame. * ! * @param f the <code>JInternalFrame</code> * for which the icon is created */ public JDesktopIcon(JInternalFrame f) { setVisible(false); setInternalFrame(f); --- 2164,2174 ---- JInternalFrame internalFrame; /** * Creates an icon for an internal frame. * ! * @param f the {@code JInternalFrame} * for which the icon is created */ public JDesktopIcon(JInternalFrame f) { setVisible(false); setInternalFrame(f);
*** 2176,2242 **** } /** * Returns the look-and-feel object that renders this component. * ! * @return the <code>DesktopIconUI</code> object that renders * this component */ public DesktopIconUI getUI() { return (DesktopIconUI)ui; } /** * Sets the look-and-feel object that renders this component. * ! * @param ui the <code>DesktopIconUI</code> look-and-feel object * @see UIDefaults#getUI */ public void setUI(DesktopIconUI ui) { super.setUI(ui); } /** ! * Returns the <code>JInternalFrame</code> that this ! * <code>DesktopIcon</code> is associated with. * ! * @return the <code>JInternalFrame</code> with which this icon * is associated */ public JInternalFrame getInternalFrame() { return internalFrame; } /** ! * Sets the <code>JInternalFrame</code> with which this ! * <code>DesktopIcon</code> is associated. * ! * @param f the <code>JInternalFrame</code> with which this icon * is associated */ public void setInternalFrame(JInternalFrame f) { internalFrame = f; } /** ! * Convenience method to ask the icon for the <code>Desktop</code> * object it belongs to. * ! * @return the <code>JDesktopPane</code> that contains this ! * icon's internal frame, or <code>null</code> if none found */ public JDesktopPane getDesktopPane() { if(getInternalFrame() != null) return getInternalFrame().getDesktopPane(); return null; } /** ! * Notification from the <code>UIManager</code> that the look and feel * has changed. * Replaces the current UI object with the latest version from the ! * <code>UIManager</code>. * * @see JComponent#updateUI */ public void updateUI() { boolean hadUI = (ui != null); --- 2176,2242 ---- } /** * Returns the look-and-feel object that renders this component. * ! * @return the {@code DesktopIconUI} object that renders * this component */ public DesktopIconUI getUI() { return (DesktopIconUI)ui; } /** * Sets the look-and-feel object that renders this component. * ! * @param ui the {@code DesktopIconUI} look-and-feel object * @see UIDefaults#getUI */ public void setUI(DesktopIconUI ui) { super.setUI(ui); } /** ! * Returns the {@code JInternalFrame} that this ! * {@code DesktopIcon} is associated with. * ! * @return the {@code JInternalFrame} with which this icon * is associated */ public JInternalFrame getInternalFrame() { return internalFrame; } /** ! * Sets the {@code JInternalFrame} with which this ! * {@code DesktopIcon} is associated. * ! * @param f the {@code JInternalFrame} with which this icon * is associated */ public void setInternalFrame(JInternalFrame f) { internalFrame = f; } /** ! * Convenience method to ask the icon for the {@code Desktop} * object it belongs to. * ! * @return the {@code JDesktopPane} that contains this ! * icon's internal frame, or {@code null} if none found */ public JDesktopPane getDesktopPane() { if(getInternalFrame() != null) return getInternalFrame().getDesktopPane(); return null; } /** ! * Notification from the {@code UIManager} that the look and feel * has changed. * Replaces the current UI object with the latest version from the ! * {@code UIManager}. * * @see JComponent#updateUI */ public void updateUI() { boolean hadUI = (ui != null);
*** 2316,2336 **** return accessibleContext; } /** * This class implements accessibility support for the ! * <code>JInternalFrame.JDesktopIcon</code> class. It provides an * implementation of the Java Accessibility API appropriate to * desktop icon user-interface elements. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJDesktopIcon extends AccessibleJComponent implements AccessibleValue { --- 2316,2336 ---- return accessibleContext; } /** * This class implements accessibility support for the ! * {@code JInternalFrame.JDesktopIcon} class. It provides an * implementation of the Java Accessibility API appropriate to * desktop icon user-interface elements. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJDesktopIcon extends AccessibleJComponent implements AccessibleValue {
*** 2348,2358 **** /** * Gets the AccessibleValue associated with this object. In the * implementation of the Java Accessibility API for this class, * returns this object, which is responsible for implementing the ! * <code>AccessibleValue</code> interface on behalf of itself. * * @return this object */ public AccessibleValue getAccessibleValue() { return this; --- 2348,2358 ---- /** * Gets the AccessibleValue associated with this object. In the * implementation of the Java Accessibility API for this class, * returns this object, which is responsible for implementing the ! * {@code AccessibleValue} interface on behalf of itself. * * @return this object */ public AccessibleValue getAccessibleValue() { return this;
*** 2361,2373 **** // // AccessibleValue methods // /** ! * Gets the value of this object as a <code>Number</code>. * ! * @return value of the object -- can be <code>null</code> if this object does not * have a value */ public Number getCurrentAccessibleValue() { AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); AccessibleValue v = a.getAccessibleValue(); --- 2361,2373 ---- // // AccessibleValue methods // /** ! * Gets the value of this object as a {@code Number}. * ! * @return value of the object -- can be {@code null} if this object does not * have a value */ public Number getCurrentAccessibleValue() { AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); AccessibleValue v = a.getAccessibleValue();
*** 2377,2389 **** return null; } } /** ! * Sets the value of this object as a <code>Number</code>. * ! * @return <code>true</code> if the value was set */ public boolean setCurrentAccessibleValue(Number n) { // TIGER - 4422535 if (n == null) { return false; --- 2377,2389 ---- return null; } } /** ! * Sets the value of this object as a {@code Number}. * ! * @return {@code true} if the value was set */ public boolean setCurrentAccessibleValue(Number n) { // TIGER - 4422535 if (n == null) { return false;
*** 2396,2408 **** return false; } } /** ! * Gets the minimum value of this object as a <code>Number</code>. * ! * @return minimum value of the object; <code>null</code> if this object does not * have a minimum value */ public Number getMinimumAccessibleValue() { AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); if (a instanceof AccessibleValue) { --- 2396,2408 ---- return false; } } /** ! * Gets the minimum value of this object as a {@code Number}. * ! * @return minimum value of the object; {@code null} if this object does not * have a minimum value */ public Number getMinimumAccessibleValue() { AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); if (a instanceof AccessibleValue) {
*** 2411,2423 **** return null; } } /** ! * Gets the maximum value of this object as a <code>Number</code>. * ! * @return maximum value of the object; <code>null</code> if this object does not * have a maximum value */ public Number getMaximumAccessibleValue() { AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); if (a instanceof AccessibleValue) { --- 2411,2423 ---- return null; } } /** ! * Gets the maximum value of this object as a {@code Number}. * ! * @return maximum value of the object; {@code null} if this object does not * have a maximum value */ public Number getMaximumAccessibleValue() { AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); if (a instanceof AccessibleValue) {
< prev index next >