javax.swing.plaf.metal

Class MetalInternalFrameUI

public class MetalInternalFrameUI extends BasicInternalFrameUI

A UI delegate for the {@link JInternalFrame} component.
Field Summary
protected static StringIS_PALETTE
The key (JInternalFrame.isPalette) for the client property that controls whether the internal frame is displayed using the palette style.
Constructor Summary
MetalInternalFrameUI(JInternalFrame frame)
Constructs a new instance of MetalInternalFrameUI.
Method Summary
protected JComponentcreateNorthPane(JInternalFrame w)
Creates and returns the component that will be used for the north pane of the {@link JInternalFrame}.
static ComponentUIcreateUI(JComponent component)
Returns an instance of MetalInternalFrameUI.
protected voidinstallKeyboardActions()
Installs keyboard actions.
protected voidinstallListeners()
Adds the required listeners.
voidinstallUI(JComponent c)
Sets the fields and properties for the component.
voidsetPalette(boolean isPalette)
Sets the state of the {@link JInternalFrame} to reflect whether or not it is using the palette style.
protected voiduninstallListeners()
Removes the listeners used.

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

createNorthPane

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

Parameters: w the internal frame.

Returns: A new instance of {@link MetalInternalFrameTitlePane}.

createUI

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

Parameters: component the internal frame.

Returns: an instance of MetalInternalFrameUI.

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.

installListeners

protected void installListeners()
Adds the required listeners.

installUI

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

Parameters: c the component.

setPalette

public void setPalette(boolean isPalette)
Sets the state of the {@link 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?

uninstallListeners

protected void uninstallListeners()
Removes the listeners used.