Top Description Inners Fields Constructors Methods
javax.swing.plaf.metal

public Class MetalInternalFrameTitlePane

extends BasicInternalFrameTitlePane
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
sun.swing.SwingUtilities2, java.awt.*, java.awt.event.*, javax.swing.*, javax.swing.border.*, javax.swing.event.InternalFrameEvent, java.util.EventListener, java.beans.PropertyChangeListener, .PropertyChangeEvent, javax.swing.plaf.basic.BasicInternalFrameTitlePane

Class that manages a JLF title bar
Authors
Steve Wilson, Brian Beck
Since
1.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv MetalBumps
private Color
private Color
pack-priv int
private static final Border
pack-priv MetalBumps
protected boolean
isPalette

The value isPalette

pack-priv MetalBumps
protected Icon
paletteCloseIcon

The palette close icon.

protected int
paletteTitleHeight

The height of the palette title.

private String
selectedBackgroundKey

Key used to lookup Color from UIManager.

private String
selectedForegroundKey

Key used to lookup Color from UIManager.

private String
selectedShadowKey

Key used to lookup shadow color from UIManager.

private boolean
wasClosable

Boolean indicating the state of the JInternalFrames closable property at updateUI time.

Inherited from javax.swing.plaf.basic.BasicInternalFrameTitlePane:
CLOSE_CMDcloseActioncloseButtoncloseIconframeiconButtoniconIconICONIFY_CMDiconifyActionmaxButtonmaxIconMAXIMIZE_CMDmaximizeActionmenuBarminIconMOVE_CMDmoveActionnotSelectedTextColornotSelectedTitleColorpropertyChangeListenerRESTORE_CMDrestoreActionselectedTextColorselectedTitleColorSIZE_CMDsizeActionwindowMenu

Constructor Summary

AccessConstructor and Description
public
MetalInternalFrameTitlePane(JInternalFrame
an instance of JInternalFrame
f
)

Constructs a new instance of MetalInternalFrameTitlePane

Method Summary

Modifier and TypeMethod and Description
public void
addNotify()

Overrides javax.swing.JComponent.addNotify.

Notifies this component that it now has a parent component.

protected void
addSubComponents()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSubComponents.

Override the parent's method avoid creating a menu bar.

protected void
addSystemMenuItems(JMenu
an instance of JMenu
systemMenu
)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSystemMenuItems.

Override the parent's method to do nothing.

protected void
assembleSystemMenu()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.assembleSystemMenu.

Override the parent's method to do nothing.

protected void
protected LayoutManager
protected PropertyChangeListener
protected void
public void
paintComponent(Graphics
the Graphics object to protect
g
)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.paintComponent.

Calls the UI delegate's paint method, if the UI delegate is non-null.

public void
paintPalette(Graphics
a instance of Graphics
g
)

Paints palette.

public void
setPalette(boolean
if true, sets palette icons
b
)

If b is true, sets palette icons.

protected void
showSystemMenu()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.showSystemMenu.

Override the parent's method to do nothing.

protected void
private void
updateOptionPaneState()

Updates any state dependent upon the JInternalFrame being shown in a JOptionPane.

Inherited from javax.swing.plaf.basic.BasicInternalFrameTitlePane:
createActionscreateSystemMenucreateSystemMenuBarenableActionsgetTitleinstallListenersinstallTitlePanepaintTitleBackgroundpostClosingEventsetButtonIconsuninstallListeners

Field Detail

activeBumpsback to summary
pack-priv MetalBumps activeBumps
activeBumpsHighlightback to summary
private Color activeBumpsHighlight
activeBumpsShadowback to summary
private Color activeBumpsShadow
buttonsWidthback to summary
pack-priv int buttonsWidth
handyEmptyBorderback to summary
private static final Border handyEmptyBorder
inactiveBumpsback to summary
pack-priv MetalBumps inactiveBumps
isPaletteback to summary
protected boolean isPalette

The value isPalette

paletteBumpsback to summary
pack-priv MetalBumps paletteBumps
paletteCloseIconback to summary
protected Icon paletteCloseIcon

The palette close icon.

paletteTitleHeightback to summary
protected int paletteTitleHeight

The height of the palette title.

selectedBackgroundKeyback to summary
private String selectedBackgroundKey

Key used to lookup Color from UIManager. If this is null, getWindowTitleBackground is used.

selectedForegroundKeyback to summary
private String selectedForegroundKey

Key used to lookup Color from UIManager. If this is null, getWindowTitleForeground is used.

selectedShadowKeyback to summary
private String selectedShadowKey

Key used to lookup shadow color from UIManager. If this is null, getPrimaryControlDarkShadow is used.

wasClosableback to summary
private boolean wasClosable

Boolean indicating the state of the JInternalFrames closable property at updateUI time.

Constructor Detail

MetalInternalFrameTitlePaneback to summary
public MetalInternalFrameTitlePane(JInternalFrame f)

Constructs a new instance of MetalInternalFrameTitlePane

Parameters
f:JInternalFrame

an instance of JInternalFrame

Method Detail

addNotifyback to summary
public void addNotify()

Overrides javax.swing.JComponent.addNotify.

Doc from javax.swing.JComponent.addNotify.

Notifies this component that it now has a parent component. When this method is invoked, the chain of parent components is set up with KeyboardAction event listeners. This method is called by the toolkit internally and should not be called directly by programs.

addSubComponentsback to summary
protected void addSubComponents()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSubComponents.

Override the parent's method avoid creating a menu bar. Metal frames do not have system menus.

addSystemMenuItemsback to summary
protected void addSystemMenuItems(JMenu systemMenu)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSystemMenuItems.

Override the parent's method to do nothing. Metal frames do not have system menus.

Parameters
systemMenu:JMenu

Doc from javax.swing.plaf.basic.BasicInternalFrameTitlePane.addSystemMenuItems.

an instance of JMenu

assembleSystemMenuback to summary
protected void assembleSystemMenu()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.assembleSystemMenu.

Override the parent's method to do nothing. Metal frames do not have system menus.

createButtonsback to summary
protected void createButtons()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.createButtons.

Doc from javax.swing.plaf.basic.BasicInternalFrameTitlePane.createButtons.

Creates buttons.

createLayoutback to summary
protected LayoutManager createLayout()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.createLayout.

Doc from javax.swing.plaf.basic.BasicInternalFrameTitlePane.createLayout.

Returns a layout manager.

Returns:LayoutManager

a layout manager

createPropertyChangeListenerback to summary
protected PropertyChangeListener createPropertyChangeListener()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.createPropertyChangeListener.

Doc from javax.swing.plaf.basic.BasicInternalFrameTitlePane.createPropertyChangeListener.

Returns an instance of PropertyChangeListener.

Returns:PropertyChangeListener

an instance of PropertyChangeListener

installDefaultsback to summary
protected void installDefaults()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.installDefaults.

Doc from javax.swing.plaf.basic.BasicInternalFrameTitlePane.installDefaults.

Installs default properties.

paintComponentback to summary
public void paintComponent(Graphics g)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.paintComponent.

Doc from javax.swing.JComponent.paintComponent.

Calls the UI delegate's paint method, if the UI delegate is non-null. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate).

If you override this in a subclass you should not make permanent changes to the passed in Graphics. For example, you should not alter the clip Rectangle or modify the transform. If you need to do these operations you may find it easier to create a new Graphics from the passed in Graphics and manipulate it. Further, if you do not invoke super's implementation you must honor the opaque property, that is if this component is opaque, you must completely fill in the background in an opaque color. If you do not honor the opaque property you will likely see visual artifacts.

The passed in Graphics object might have a transform other than the identify transform installed on it. In this case, you might get unexpected results if you cumulatively apply another transform.

Parameters
g:Graphics

the Graphics object to protect

paintPaletteback to summary
public void paintPalette(Graphics g)

Paints palette.

Parameters
g:Graphics

a instance of Graphics

setPaletteback to summary
public void setPalette(boolean b)

If b is true, sets palette icons.

Parameters
b:boolean

if true, sets palette icons

showSystemMenuback to summary
protected void showSystemMenu()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.showSystemMenu.

Override the parent's method to do nothing. Metal frames do not have system menus.

uninstallDefaultsback to summary
protected void uninstallDefaults()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.uninstallDefaults.

Doc from javax.swing.plaf.basic.BasicInternalFrameTitlePane.uninstallDefaults.

Uninstalls default properties.

updateOptionPaneStateback to summary
private void updateOptionPaneState()

Updates any state dependent upon the JInternalFrame being shown in a JOptionPane.

javax.swing.plaf.metal back to summary

pack-priv Class MetalInternalFrameTitlePane.MetalPropertyChangeHandler

extends PropertyChangeHandler
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
propertyChange(PropertyChangeEvent
A PropertyChangeEvent object describing the event source and the property that has changed.
evt
)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler.propertyChange.

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Constructor Detail

MetalPropertyChangeHandlerback to summary
pack-priv MetalPropertyChangeHandler()

Method Detail

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent evt)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.PropertyChangeHandler.propertyChange.

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Parameters
evt:PropertyChangeEvent

A PropertyChangeEvent object describing the event source and the property that has changed.

javax.swing.plaf.metal back to summary

pack-priv Class MetalInternalFrameTitlePane.MetalTitlePaneLayout

extends TitlePaneLayout
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addLayoutComponent(String
the string to be associated with the component
name
,
Component
the component to be added
c
)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.addLayoutComponent.

Implements java.awt.LayoutManager.addLayoutComponent.

If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

public void
public Dimension
minimumLayoutSize(Container
the component to be laid out
c
)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.minimumLayoutSize.

Implements java.awt.LayoutManager.minimumLayoutSize.

Calculates the minimum size dimensions for the specified container, given the components it contains.

public Dimension
preferredLayoutSize(Container
the container to be laid out
c
)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.preferredLayoutSize.

Implements java.awt.LayoutManager.preferredLayoutSize.

Calculates the preferred size dimensions for the specified container, given the components it contains.

public void

Constructor Detail

MetalTitlePaneLayoutback to summary
pack-priv MetalTitlePaneLayout()

Method Detail

addLayoutComponentback to summary
public void addLayoutComponent(String name, Component c)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.addLayoutComponent.

Implements java.awt.LayoutManager.addLayoutComponent.

Doc from java.awt.LayoutManager.addLayoutComponent.

If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

Parameters
name:String

the string to be associated with the component

c:Component

the component to be added

layoutContainerback to summary
public void layoutContainer(Container c)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.layoutContainer.

Implements java.awt.LayoutManager.layoutContainer.

Doc from java.awt.LayoutManager.layoutContainer.

Lays out the specified container.

Parameters
c:Container

the container to be laid out

minimumLayoutSizeback to summary
public Dimension minimumLayoutSize(Container c)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.minimumLayoutSize.

Implements java.awt.LayoutManager.minimumLayoutSize.

Doc from java.awt.LayoutManager.minimumLayoutSize.

Calculates the minimum size dimensions for the specified container, given the components it contains.

Parameters
c:Container

the component to be laid out

Returns:Dimension

the minimum dimension for the container

preferredLayoutSizeback to summary
public Dimension preferredLayoutSize(Container c)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.preferredLayoutSize.

Implements java.awt.LayoutManager.preferredLayoutSize.

Doc from java.awt.LayoutManager.preferredLayoutSize.

Calculates the preferred size dimensions for the specified container, given the components it contains.

Parameters
c:Container

the container to be laid out

Returns:Dimension

the preferred dimension for the container

removeLayoutComponentback to summary
public void removeLayoutComponent(Component c)

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout.removeLayoutComponent.

Implements java.awt.LayoutManager.removeLayoutComponent.

Doc from java.awt.LayoutManager.removeLayoutComponent.

Removes the specified component from the layout.

Parameters
c:Component

the component to be removed