APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.synth

pack-priv Class SynthInternalFrameTitlePane

extends BasicInternalFrameTitlePane
implements SynthUI, PropertyChangeListener
Class Inheritance
All Implemented Interfaces
java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.plaf.synth.SynthUI, javax.swing.plaf.synth.SynthConstants
Annotations
@SuppressWarnings:serial
Imports
java.awt.Component, .Container, .Dimension, .FontMetrics, .Graphics, .Image, .Insets, .LayoutManager, java.awt.event.MouseAdapter, .MouseEvent, java.beans.PropertyChangeEvent, .PropertyChangeListener, .PropertyVetoException, javax.swing.Icon, .ImageIcon, .JButton, .JComponent, .JInternalFrame, .JMenuItem, .JPopupMenu, .JSeparator, .SwingConstants, .UIManager, javax.swing.plaf.UIResource, javax.swing.plaf.basic.BasicInternalFrameTitlePane, sun.swing.SwingUtilities2

The class that manages a synth title bar
Authors
David Kloba, Joshua Outwater, Steve Wilson

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
SynthInternalFrameTitlePane.JPopupMenuUIResource

A subclass of JPopupMenu that implements UIResource.

pack-priv class

Field Summary

Modifier and TypeField and Description
private int
private SynthStyle
protected JPopupMenu
private int
private int
Inherited from javax.swing.plaf.basic.BasicInternalFrameTitlePane:
CLOSE_CMDcloseActioncloseButtoncloseIconframeiconButtoniconIconICONIFY_CMDiconifyActionmaxButtonmaxIconMAXIMIZE_CMDmaximizeActionmenuBarminIconMOVE_CMDmoveActionnotSelectedTextColornotSelectedTitleColorpropertyChangeListenerRESTORE_CMDrestoreActionselectedTextColorselectedTitleColorSIZE_CMDsizeActionwindowMenu

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
protected LayoutManager
private JButton
private static int
private int
public SynthContext
getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

public SynthContext
getContext(JComponent c, int state)

private Region
public String
getUIClassID()

Overrides javax.swing.JComponent.getUIClassID.

Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component.

protected void
protected void
protected void
public void
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

public void
paintComponent(Graphics g)

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

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

public void
propertyChange(PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

protected void
protected void
protected void
private void
updateMenuIcon()

Resets the menuButton icon to match that of the frame.

private void
Inherited from javax.swing.plaf.basic.BasicInternalFrameTitlePane:
addSystemMenuItemscreateActionscreateButtonscreatePropertyChangeListenercreateSystemMenucreateSystemMenuBarenableActionsgetTitleinstallTitlePanepaintTitleBackgroundpostClosingEventsetButtonIcons

Field Detail

buttonSpacingback to summary
private int buttonSpacing
styleback to summary
private SynthStyle style
systemPopupMenuback to summary
protected JPopupMenu systemPopupMenu
titleAlignmentback to summary
private int titleAlignment
titleSpacingback to summary
private int titleSpacing

Constructor Detail

SynthInternalFrameTitlePaneback to summary
public SynthInternalFrameTitlePane(JInternalFrame f)

Method Detail

addSubComponentsback to summary
protected void addSubComponents()

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

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

Adds subcomponents.

addSystemMenuItemsback to summary
protected void addSystemMenuItems(JPopupMenu menu)
assembleSystemMenuback to summary
protected void assembleSystemMenu()

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

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

Assembles system menu.

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.

createNoFocusButtonback to summary
private JButton createNoFocusButton()
getButtonMnemonicback to summary
private static int getButtonMnemonic(String button)

Hides javax.swing.plaf.basic.BasicInternalFrameTitlePane.getButtonMnemonic.

getComponentStateback to summary
private int getComponentState(JComponent c)
getContextback to summary
public SynthContext getContext(JComponent c)

Implements javax.swing.plaf.synth.SynthUI.getContext.

Doc from javax.swing.plaf.synth.SynthUI.getContext.

Returns the Context for the specified component.

getContextback to summary
public SynthContext getContext(JComponent c, int state)
getRegionback to summary
private Region getRegion(JComponent c)
getUIClassIDback to summary
public String getUIClassID()

Overrides javax.swing.JComponent.getUIClassID.

Doc from javax.swing.JComponent.getUIClassID.

Returns the UIDefaults key used to look up the name of the swing.plaf.ComponentUI class that defines the look and feel for this component. Most applications will never need to call this method. Subclasses of JComponent that support pluggable look and feel should override this method to return a UIDefaults key that maps to the ComponentUI subclass that defines their look and feel.

installDefaultsback to summary
protected void installDefaults()

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

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

Installs default properties.

installListenersback to summary
protected void installListeners()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.installListeners.

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

Registers listeners.

paintback to summary
protected void paint(SynthContext context, Graphics g)
paintBorderback to summary
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)

Implements javax.swing.plaf.synth.SynthUI.paintBorder.

Doc from javax.swing.plaf.synth.SynthUI.paintBorder.

Paints the border.

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.

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent evt)

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

showSystemMenuback to summary
protected void showSystemMenu()

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

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

Shows system menu.

uninstallDefaultsback to summary
protected void uninstallDefaults()

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

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

Uninstalls default properties.

uninstallListenersback to summary
protected void uninstallListeners()

Overrides javax.swing.plaf.basic.BasicInternalFrameTitlePane.uninstallListeners.

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

Unregisters listeners.

updateMenuIconback to summary
private void updateMenuIcon()

Resets the menuButton icon to match that of the frame.

updateStyleback to summary
private void updateStyle(JComponent c)
javax.swing.plaf.synth back to summary

private Class SynthInternalFrameTitlePane.JPopupMenuUIResource

extends JPopupMenu
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

A subclass of JPopupMenu that implements UIResource.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from javax.swing.JPopupMenu:
addaddaddaddMenuKeyListeneraddPopupMenuListeneraddSeparatorcreateActionChangeListenercreateActionComponentfirePopupMenuCanceledfirePopupMenuWillBecomeInvisiblefirePopupMenuWillBecomeVisiblegetAccessibleContextgetComponentgetComponentAtIndexgetComponentIndexgetDefaultLightWeightPopupEnabledgetInvokergetLabelgetMargingetMenuKeyListenersgetPopupMenuListenersgetSelectionModelgetSubElementsgetUIgetUIClassIDinsertinsertisBorderPaintedisLightWeightPopupEnabledisPopupTriggerisVisiblemenuSelectionChangedpackpaintBorderparamStringprocessFocusEventprocessKeyEventprocessKeyEventprocessMouseEventremoveremoveMenuKeyListenerremovePopupMenuListenersetBorderPaintedsetDefaultLightWeightPopupEnabledsetInvokersetLabelsetLightWeightPopupEnabledsetLocationsetPopupSizesetPopupSizesetSelectedsetSelectionModelsetUIsetVisibleshowupdateUI

Constructor Detail

JPopupMenuUIResourceback to summary
private JPopupMenuUIResource()
javax.swing.plaf.synth back to summary

pack-priv Class SynthInternalFrameTitlePane.SynthTitlePaneLayout

extends Object
implements LayoutManager
Class Inheritance
  • java.lang.Object
  • javax.swing.plaf.synth.SynthInternalFrameTitlePane.SynthTitlePaneLayout
All Implemented Interfaces
java.awt.LayoutManager

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addLayoutComponent(String name, Component c)

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.

private int
center(Component c, Insets insets, int x, boolean trailing)

public void
layoutContainer(Container c)

Implements java.awt.LayoutManager.layoutContainer.

Lays out the specified container.

public Dimension
minimumLayoutSize(Container c)

Implements java.awt.LayoutManager.minimumLayoutSize.

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

public Dimension
preferredLayoutSize(Container c)

Implements java.awt.LayoutManager.preferredLayoutSize.

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

public void
removeLayoutComponent(Component c)

Implements java.awt.LayoutManager.removeLayoutComponent.

Removes the specified component from the layout.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SynthTitlePaneLayoutback to summary
pack-priv SynthTitlePaneLayout()

Method Detail

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

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.

centerback to summary
private int center(Component c, Insets insets, int x, boolean trailing)
layoutContainerback to summary
public void layoutContainer(Container c)

Implements java.awt.LayoutManager.layoutContainer.

Doc from java.awt.LayoutManager.layoutContainer.

Lays out the specified container.

minimumLayoutSizeback to summary
public Dimension minimumLayoutSize(Container c)

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.

preferredLayoutSizeback to summary
public Dimension preferredLayoutSize(Container c)

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.

removeLayoutComponentback to summary
public void removeLayoutComponent(Component c)

Implements java.awt.LayoutManager.removeLayoutComponent.

Doc from java.awt.LayoutManager.removeLayoutComponent.

Removes the specified component from the layout.