javax.swing.plaf.metal
Class MetalInternalFrameUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.InternalFrameUI
          extended by javax.swing.plaf.basic.BasicInternalFrameUI
              extended by javax.swing.plaf.metal.MetalInternalFrameUI

public class MetalInternalFrameUI
extends BasicInternalFrameUI

A UI delegate for the JInternalFrame component.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicInternalFrameUI
BasicInternalFrameUI.BasicInternalFrameListener, BasicInternalFrameUI.BorderListener, BasicInternalFrameUI.ComponentHandler, BasicInternalFrameUI.GlassPaneDispatcher, BasicInternalFrameUI.InternalFrameLayout, BasicInternalFrameUI.InternalFramePropertyChangeListener
 
Field Summary
protected static String IS_PALETTE
          The key (JInternalFrame.isPalette) for the client property that controls whether the internal frame is displayed using the palette style.
 
Fields inherited from class javax.swing.plaf.basic.BasicInternalFrameUI
borderListener, componentListener, eastPane, frame, glassPaneDispatcher, internalFrameLayout, northPane, openMenuKey, propertyChangeListener, southPane, titlePane, westPane
 
Constructor Summary
MetalInternalFrameUI(JInternalFrame frame)
          Constructs a new instance of MetalInternalFrameUI.
 
Method Summary
protected  JComponent createNorthPane(JInternalFrame w)
          Creates and returns the component that will be used for the north pane of the JInternalFrame.
static ComponentUI createUI(JComponent component)
          Returns an instance of MetalInternalFrameUI.
protected  void installKeyboardActions()
          Installs keyboard actions.
protected  void installListeners()
          Adds the required listeners.
 void installUI(JComponent c)
          Sets the fields and properties for the component.
 void setPalette(boolean isPalette)
          Sets the state of the JInternalFrame to reflect whether or not it is using the palette style.
protected  void uninstallListeners()
          Removes the listeners used.
 
Methods inherited from class javax.swing.plaf.basic.BasicInternalFrameUI
activateFrame, closeFrame, createBorderListener, createComponentListener, createDesktopManager, createEastPane, createGlassPaneDispatcher, createInternalFrameListener, createLayoutManager, createPropertyChangeListener, createSouthPane, createWestPane, deactivateFrame, deiconifyFrame, deinstallMouseHandlers, getDesktopManager, getEastPane, getMaximumSize, getMinimumSize, getNorthPane, getPreferredSize, getSouthPane, getWestPane, iconifyFrame, installComponents, installDefaults, installMouseHandlers, isKeyBindingActive, isKeyBindingRegistered, maximizeFrame, minimizeFrame, replacePane, setEastPane, setKeyBindingActive, setKeyBindingRegistered, setNorthPane, setSouthPane, setupMenuCloseKey, setupMenuOpenKey, setWestPane, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_PALETTE

protected static String IS_PALETTE
The key (JInternalFrame.isPalette) for the client property that controls whether the internal frame is displayed using the palette style.

Constructor Detail

MetalInternalFrameUI

public MetalInternalFrameUI(JInternalFrame frame)
Constructs a new instance of MetalInternalFrameUI.

Parameters:
frame - the frame.
Method Detail

createUI

public static ComponentUI createUI(JComponent component)
Returns an instance of MetalInternalFrameUI.

Parameters:
component - the internal frame.
Returns:
an instance of MetalInternalFrameUI.

installUI

public void installUI(JComponent c)
Sets the fields and properties for the component.

Overrides:
installUI in class BasicInternalFrameUI
Parameters:
c - the component.
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

createNorthPane

protected JComponent createNorthPane(JInternalFrame w)
Creates and returns the component that will be used for the north pane of the JInternalFrame.

Overrides:
createNorthPane in class BasicInternalFrameUI
Parameters:
w - the internal frame.
Returns:
A new instance of MetalInternalFrameTitlePane.

setPalette

public void setPalette(boolean isPalette)
Sets the state of the JInternalFrame to reflect whether or not it is using the palette style. When a frame is displayed as a palette, it uses a different border and the title pane is drawn differently.

Parameters:
isPalette - use the palette style?

installListeners

protected void installListeners()
Adds the required listeners.

Overrides:
installListeners in class BasicInternalFrameUI

uninstallListeners

protected void uninstallListeners()
Removes the listeners used.

Overrides:
uninstallListeners in class BasicInternalFrameUI

installKeyboardActions

protected void installKeyboardActions()
Installs keyboard actions. This is overridden to remove the showSystemMenu Action that is installed by the BasicInternalFrameUI, since Metal JInternalFrames don't have a system menu.

Overrides:
installKeyboardActions in class BasicInternalFrameUI