javax.swing.plaf.metal
Class MetalInternalFrameTitlePane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.plaf.basic.BasicInternalFrameTitlePane
                  extended by javax.swing.plaf.metal.MetalInternalFrameTitlePane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class MetalInternalFrameTitlePane
extends BasicInternalFrameTitlePane

The title pane for a JInternalFrame (see MetalInternalFrameUI.createNorthPane(JInternalFrame)). This can be displayed in two styles: one for regular internal frames, and the other for "palette" style internal frames.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
BasicInternalFrameTitlePane.CloseAction, BasicInternalFrameTitlePane.IconifyAction, BasicInternalFrameTitlePane.MaximizeAction, BasicInternalFrameTitlePane.MoveAction, BasicInternalFrameTitlePane.PropertyChangeHandler, BasicInternalFrameTitlePane.RestoreAction, BasicInternalFrameTitlePane.SizeAction, BasicInternalFrameTitlePane.SystemMenuBar, BasicInternalFrameTitlePane.TitlePaneLayout
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  boolean isPalette
          A flag indicating whether the title pane uses the palette style.
protected  Icon paletteCloseIcon
          The icon used for the close button - this is fetched from the look and feel defaults using the key InternalFrame.paletteCloseIcon.
protected  int paletteTitleHeight
          The height of the title pane when isPalette is true.
 
Fields inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
CLOSE_CMD, closeAction, closeButton, closeIcon, frame, iconButton, iconIcon, ICONIFY_CMD, iconifyAction, maxButton, maxIcon, MAXIMIZE_CMD, maximizeAction, menuBar, minIcon, MOVE_CMD, moveAction, notSelectedTextColor, notSelectedTitleColor, propertyChangeListener, RESTORE_CMD, restoreAction, selectedTextColor, selectedTitleColor, SIZE_CMD, sizeAction, windowMenu
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MetalInternalFrameTitlePane(JInternalFrame f)
          Creates a new title pane for the specified frame.
 
Method Summary
protected  void addSubComponents()
          Adds the sub components of the title pane.
protected  void addSystemMenuItems(JMenu systemMenu)
          Overridden to do nothing.
protected  void createButtons()
          Calls the super class to create the buttons, then calls setBorderPainted(false) and setContentAreaFilled(false) for each button.
protected  LayoutManager createLayout()
          Creates a new instance of MetalTitlePaneLayout (not part of the public API).
protected  PropertyChangeListener createPropertyChangeListener()
          Creates and returns a property change handler for the title pane.
protected  void installDefaults()
          Fetches the colors used in the title pane.
 void paintComponent(Graphics g)
          Paints a representation of the current state of the internal frame.
 void paintPalette(Graphics g)
          Draws the title pane in the palette style.
 void setPalette(boolean b)
          Sets the flag that controls whether the title pane is drawn in the palette style or the regular style.
protected  void showSystemMenu()
          Overridden to do nothing.
protected  void uninstallDefaults()
          Clears the colors used for the title pane.
 
Methods inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
assembleSystemMenu, createActions, createSystemMenu, createSystemMenuBar, enableActions, getTitle, installListeners, installTitlePane, paintTitleBackground, postClosingEvent, setButtonIcons, uninstallListeners
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

installDefaults

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

Overrides:
installDefaults in class BasicInternalFrameTitlePane

uninstallDefaults

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

Overrides:
uninstallDefaults in class BasicInternalFrameTitlePane

createButtons

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

Overrides:
createButtons in class BasicInternalFrameTitlePane

addSystemMenuItems

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

Overrides:
addSystemMenuItems in class BasicInternalFrameTitlePane
Parameters:
systemMenu - The JMenu to add MenuItems to.

showSystemMenu

protected void showSystemMenu()
Overridden to do nothing.

Overrides:
showSystemMenu in class BasicInternalFrameTitlePane

addSubComponents

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

Overrides:
addSubComponents in class BasicInternalFrameTitlePane

createLayout

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

Overrides:
createLayout in class BasicInternalFrameTitlePane
Returns:
A new instance of MetalTitlePaneLayout.

paintPalette

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

Parameters:
g - the graphics device.
See Also:
paintComponent(Graphics)

paintComponent

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

Overrides:
paintComponent in class BasicInternalFrameTitlePane
Parameters:
g - the graphics device.
See Also:
JComponent.paint(java.awt.Graphics), JComponent.paintBorder(java.awt.Graphics), JComponent.paintChildren(java.awt.Graphics)

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.

createPropertyChangeListener

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

Overrides:
createPropertyChangeListener in class BasicInternalFrameTitlePane
Returns:
The property change handler.