javax.swing.plaf.metal

Class MetalInternalFrameTitlePane

public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane

The title pane for a {@link JInternalFrame} (see {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}). This can be displayed in two styles: one for regular internal frames, and the other for "palette" style internal frames.
Field Summary
protected booleanisPalette
A flag indicating whether the title pane uses the palette style.
protected IconpaletteCloseIcon
The icon used for the close button - this is fetched from the look and feel defaults using the key InternalFrame.paletteCloseIcon.
protected intpaletteTitleHeight
The height of the title pane when isPalette is true.
Constructor Summary
MetalInternalFrameTitlePane(JInternalFrame f)
Creates a new title pane for the specified frame.
Method Summary
protected voidaddSubComponents()
Adds the sub components of the title pane.
protected voidaddSystemMenuItems(JMenu systemMenu)
Overridden to do nothing.
protected voidcreateButtons()
Calls the super class to create the buttons, then calls setBorderPainted(false) and setContentAreaFilled(false) for each button.
protected LayoutManagercreateLayout()
Creates a new instance of MetalTitlePaneLayout (not part of the public API).
protected PropertyChangeListenercreatePropertyChangeListener()
Creates and returns a property change handler for the title pane.
protected voidinstallDefaults()
Fetches the colors used in the title pane.
voidpaintComponent(Graphics g)
Paints a representation of the current state of the internal frame.
voidpaintPalette(Graphics g)
Draws the title pane in the palette style.
voidsetPalette(boolean b)
Sets the flag that controls whether the title pane is drawn in the palette style or the regular style.
protected voidshowSystemMenu()
Overridden to do nothing.
protected voiduninstallDefaults()
Clears the colors used for the title pane.

Field Detail

isPalette

protected boolean isPalette
A flag indicating whether the title pane uses the palette style.

paletteCloseIcon

protected Icon paletteCloseIcon
The icon used for the close button - this is fetched from the look and feel defaults using the key InternalFrame.paletteCloseIcon.

paletteTitleHeight

protected int paletteTitleHeight
The height of the title pane when isPalette is true. This value is fetched from the look and feel defaults using the key InternalFrame.paletteTitleHeight.

Constructor Detail

MetalInternalFrameTitlePane

public MetalInternalFrameTitlePane(JInternalFrame f)
Creates a new title pane for the specified frame.

Parameters: f the internal frame.

Method Detail

addSubComponents

protected void addSubComponents()
Adds the sub components of the title pane.

addSystemMenuItems

protected void addSystemMenuItems(JMenu systemMenu)
Overridden to do nothing.

createButtons

protected void createButtons()
Calls the super class to create the buttons, then calls setBorderPainted(false) and setContentAreaFilled(false) for each button.

createLayout

protected LayoutManager createLayout()
Creates a new instance of MetalTitlePaneLayout (not part of the public API).

Returns: A new instance of MetalTitlePaneLayout.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates and returns a property change handler for the title pane.

Returns: The property change handler.

installDefaults

protected void installDefaults()
Fetches the colors used in the title pane.

paintComponent

public void paintComponent(Graphics g)
Paints a representation of the current state of the internal frame.

Parameters: g the graphics device.

paintPalette

public void paintPalette(Graphics g)
Draws the title pane in the palette style.

Parameters: g the graphics device.

See Also: paintComponent

setPalette

public void setPalette(boolean b)
Sets the flag that controls whether the title pane is drawn in the palette style or the regular style.

Parameters: b the new value of the flag.

showSystemMenu

protected void showSystemMenu()
Overridden to do nothing.

uninstallDefaults

protected void uninstallDefaults()
Clears the colors used for the title pane.