javax.swing.plaf.metal
Class MetalSeparatorUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SeparatorUI
javax.swing.plaf.basic.BasicSeparatorUI
javax.swing.plaf.metal.MetalSeparatorUI
- Direct Known Subclasses:
- MetalPopupMenuSeparatorUI
public class MetalSeparatorUI
- extends BasicSeparatorUI
A UI delegate for the JSeparator
component.
Constructor Summary |
MetalSeparatorUI()
Constructs a new instance of MetalSeparatorUI . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetalSeparatorUI
public MetalSeparatorUI()
- Constructs a new instance of
MetalSeparatorUI
.
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.
- Overrides:
paint
in class BasicSeparatorUI
- Parameters:
g
- The Graphics object to paint withc
- The JComponent to paint.