javax.swing.plaf.metal

Class MetalSeparatorUI

public class MetalSeparatorUI extends BasicSeparatorUI

A UI delegate for the {@link JSeparator} component.
Constructor Summary
MetalSeparatorUI()
Constructs a new instance of MetalSeparatorUI.
Method Summary
static ComponentUIcreateUI(JComponent component)
Returns a shared instance of MetalSeparatorUI.
voidpaint(Graphics g, JComponent c)
The separator is made of two lines.

Constructor Detail

MetalSeparatorUI

public MetalSeparatorUI()
Constructs a new instance of MetalSeparatorUI.

Method Detail

createUI

public static ComponentUI createUI(JComponent component)
Returns a shared instance of MetalSeparatorUI.

Parameters: component the component for which we return an UI instance

Returns: A shared instance of MetalSeparatorUI.

paint

public void paint(Graphics g, JComponent c)
The separator is made of two lines. The top line will be the Metal theme color separatorForeground (or left line if it's vertical). The bottom or right line will be the Metal theme color separatorBackground. The two lines will be centered inside the bounds box. If the separator is horizontal, then it will be vertically centered, or if it's vertical, it will be horizontally centered.

Parameters: g The Graphics object to paint with c The JComponent to paint.