javax.swing.plaf.metal
Class MetalSeparatorUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SeparatorUI
          extended by javax.swing.plaf.basic.BasicSeparatorUI
              extended by javax.swing.plaf.metal.MetalSeparatorUI
Direct Known Subclasses:
MetalPopupMenuSeparatorUI

public class MetalSeparatorUI
extends BasicSeparatorUI

A UI delegate for the JSeparator component.


Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicSeparatorUI
highlight, shadow
 
Constructor Summary
MetalSeparatorUI()
          Constructs a new instance of MetalSeparatorUI.
 
Method Summary
static ComponentUI createUI(JComponent component)
          Returns a shared instance of MetalSeparatorUI.
 void paint(Graphics g, JComponent c)
          The separator is made of two lines.
 
Methods inherited from class javax.swing.plaf.basic.BasicSeparatorUI
getMaximumSize, getMinimumSize, getPreferredSize, installDefaults, installListeners, installUI, uninstallDefaults, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

Overrides:
paint in class BasicSeparatorUI
Parameters:
g - The Graphics object to paint with
c - The JComponent to paint.