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

public Class MetalSeparatorUI

extends BasicSeparatorUI
Class Inheritance
Known Direct Subclasses
javax.swing.plaf.metal.MetalPopupMenuSeparatorUI
Imports
javax.swing.*, java.awt.Color, .Dimension, .Graphics, .Insets, .Rectangle, javax.swing.plaf.*, javax.swing.plaf.basic.BasicSeparatorUI

A Metal L&F implementation of SeparatorUI. This implementation is a "combined" view/controller.

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Jeff Shapiro

Field Summary

Inherited from javax.swing.plaf.basic.BasicSeparatorUI:
highlightshadow

Constructor Summary

AccessConstructor and Description
public
MetalSeparatorUI()

Constructs a MetalSeparatorUI.

Method Summary

Modifier and TypeMethod and Description
public static ComponentUI

Returns:

a new MetalSeparatorUI instance.
createUI
(JComponent
a component
c
)

Hides javax.swing.plaf.basic.BasicSeparatorUI.createUI.

Constructs a new MetalSeparatorUI instance.

public Dimension
getPreferredSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicSeparatorUI.getPreferredSize.

Returns the specified component's preferred size appropriate for the look and feel.

protected void
public void
paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.basic.BasicSeparatorUI.paint.

Paints the specified component appropriately for the look and feel.

Inherited from javax.swing.plaf.basic.BasicSeparatorUI:
getMaximumSizegetMinimumSizeinstallListenersinstallUIuninstallDefaultsuninstallListenersuninstallUI

Constructor Detail

MetalSeparatorUIback to summary
public MetalSeparatorUI()

Constructs a MetalSeparatorUI.

Method Detail

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicSeparatorUI.createUI.

Constructs a new MetalSeparatorUI instance.

Parameters
c:JComponent

a component

Returns:ComponentUI

a new MetalSeparatorUI instance.

getPreferredSizeback to summary
public Dimension getPreferredSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicSeparatorUI.getPreferredSize.

Doc from javax.swing.plaf.ComponentUI.getPreferredSize.

Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

installDefaultsback to summary
protected void installDefaults(JSeparator s)

Overrides javax.swing.plaf.basic.BasicSeparatorUI.installDefaults.

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

Installs default properties.

paintback to summary
public void paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.basic.BasicSeparatorUI.paint.

Doc from javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.