public class BasicInternalFrameUI extends InternalFrameUI
A basic L&F implementation of JInternalFrame.
Modifier and Type | Class and Description |
---|---|
protected class |
BasicInternalFrameUI.BasicInternalFrameListener |
protected class |
BasicInternalFrameUI.BorderListener Listens for border adjustments. |
protected class |
BasicInternalFrameUI.ComponentHandler |
protected class |
BasicInternalFrameUI.GlassPaneDispatcher |
class |
BasicInternalFrameUI.InternalFrameLayout |
class |
BasicInternalFrameUI.InternalFramePropertyChangeListener |
protected JInternalFrame frame
protected MouseInputAdapter borderListener
protected PropertyChangeListener propertyChangeListener
protected LayoutManager internalFrameLayout
protected ComponentListener componentListener
protected MouseInputListener glassPaneDispatcher
protected JComponent northPane
protected JComponent southPane
protected JComponent westPane
protected JComponent eastPane
protected BasicInternalFrameTitlePane titlePane
@Deprecated protected KeyStroke openMenuKey
Deprecated. As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
public BasicInternalFrameUI(JInternalFrame b)
public static ComponentUI createUI(JComponent b)
public void installUI(JComponent c)
Description copied from class: ComponentUI
Configures the specified component appropriately for the look and feel. This method is invoked when the ComponentUI
instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
LayoutManager
on the component if necessary. PropertyChangeListener
on the component in order to detect and respond to component property changes appropriately. installUI
in class ComponentUI
c
- the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent)
, JComponent.setUI(javax.swing.plaf.ComponentUI)
, JComponent.updateUI()
public void uninstallUI(JComponent c)
Description copied from class: ComponentUI
Reverses configuration which was done on the specified component during installUI
. This method is invoked when this UIComponent
instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI
, being careful to leave the JComponent
instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
uninstallUI
in class ComponentUI
c
- the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsComponentUI.installUI(javax.swing.JComponent)
, JComponent.updateUI()
protected void installDefaults()
protected void installKeyboardActions()
protected void installComponents()
protected void installListeners()
protected void uninstallDefaults()
protected void uninstallComponents()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
protected LayoutManager createLayoutManager()
protected PropertyChangeListener createPropertyChangeListener()
public Dimension getPreferredSize(JComponent x)
Description copied from class: ComponentUI
Returns the specified component's preferred size appropriate for the look and feel. If null
is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null
.
getPreferredSize
in class ComponentUI
x
- the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsJComponent.getPreferredSize()
, LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent x)
Description copied from class: ComponentUI
Returns the specified component's minimum size appropriate for the look and feel. If null
is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize
and returns that value.
getMinimumSize
in class ComponentUI
x
- the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsDimension
object or null
JComponent.getMinimumSize()
, LayoutManager.minimumLayoutSize(java.awt.Container)
, ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent x)
Description copied from class: ComponentUI
Returns the specified component's maximum size appropriate for the look and feel. If null
is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize
and returns that value.
getMaximumSize
in class ComponentUI
x
- the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsDimension
object or null
JComponent.getMaximumSize()
, LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void replacePane(JComponent currentPane, JComponent newPane)
Installs necessary mouse handlers on newPane
and adds it to the frame. Reverse process for the currentPane
.
protected void deinstallMouseHandlers(JComponent c)
protected void installMouseHandlers(JComponent c)
protected JComponent createNorthPane(JInternalFrame w)
protected JComponent createSouthPane(JInternalFrame w)
protected JComponent createWestPane(JInternalFrame w)
protected JComponent createEastPane(JInternalFrame w)
protected MouseInputAdapter createBorderListener(JInternalFrame w)
protected void createInternalFrameListener()
protected final boolean isKeyBindingRegistered()
protected final void setKeyBindingRegistered(boolean b)
public final boolean isKeyBindingActive()
protected final void setKeyBindingActive(boolean b)
protected void setupMenuOpenKey()
protected void setupMenuCloseKey()
public JComponent getNorthPane()
public void setNorthPane(JComponent c)
public JComponent getSouthPane()
public void setSouthPane(JComponent c)
public JComponent getWestPane()
public void setWestPane(JComponent c)
public JComponent getEastPane()
public void setEastPane(JComponent c)
protected DesktopManager getDesktopManager()
Returns the proper DesktopManager. Calls getDesktopPane() to find the JDesktop component and returns the desktopManager from it. If this fails, it will return a default DesktopManager that should work in arbitrary parents.
protected DesktopManager createDesktopManager()
protected void closeFrame(JInternalFrame f)
This method is called when the user wants to close the frame. The playCloseSound
Action is fired. This action is delegated to the desktopManager.
protected void maximizeFrame(JInternalFrame f)
This method is called when the user wants to maximize the frame. The playMaximizeSound
Action is fired. This action is delegated to the desktopManager.
protected void minimizeFrame(JInternalFrame f)
This method is called when the user wants to minimize the frame. The playRestoreDownSound
Action is fired. This action is delegated to the desktopManager.
protected void iconifyFrame(JInternalFrame f)
This method is called when the user wants to iconify the frame. The playMinimizeSound
Action is fired. This action is delegated to the desktopManager.
protected void deiconifyFrame(JInternalFrame f)
This method is called when the user wants to deiconify the frame. The playRestoreUpSound
Action is fired. This action is delegated to the desktopManager.
protected void activateFrame(JInternalFrame f)
This method is called when the frame becomes selected. This action is delegated to the desktopManager.
protected void deactivateFrame(JInternalFrame f)
This method is called when the frame is no longer selected. This action is delegated to the desktopManager.
protected ComponentListener createComponentListener()
protected MouseInputListener createGlassPaneDispatcher()
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.