FileDocCategorySizeDatePackage
BasicSeparatorUI.javaAPI DocJava SE 5 API2385Fri Aug 26 14:58:04 BST 2005javax.swing.plaf.basic

BasicSeparatorUI

public class BasicSeparatorUI extends SeparatorUI
A Basic L&F implementation of SeparatorUI. This implementation is a "combined" view/controller.
version
1.24 12/19/03
author
Georges Saab
author
Jeff Shapiro

Fields Summary
protected Color
shadow
protected Color
highlight
Constructors Summary
Methods Summary
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)

        return new BasicSeparatorUI();
    
public java.awt.DimensiongetMaximumSize(javax.swing.JComponent c)

 return null; 
public java.awt.DimensiongetMinimumSize(javax.swing.JComponent c)

 return null; 
public java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)

 
	if ( ((JSeparator)c).getOrientation() == JSeparator.VERTICAL )
	    return new Dimension( 2, 0 );
	else
	    return new Dimension( 0, 2 );
    
protected voidinstallDefaults(javax.swing.JSeparator s)

        LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" );
        LookAndFeel.installProperty( s, "opaque", Boolean.FALSE);
    
protected voidinstallListeners(javax.swing.JSeparator s)

    
public voidinstallUI(javax.swing.JComponent c)

        installDefaults( (JSeparator)c );
        installListeners( (JSeparator)c );
    
public voidpaint(java.awt.Graphics g, javax.swing.JComponent c)

        Dimension s = c.getSize();

	if ( ((JSeparator)c).getOrientation() == JSeparator.VERTICAL )
	{
	  g.setColor( c.getForeground() );
	  g.drawLine( 0, 0, 0, s.height );

	  g.setColor( c.getBackground() );
	  g.drawLine( 1, 0, 1, s.height );
	}
	else  // HORIZONTAL
	{
	  g.setColor( c.getForeground() );
	  g.drawLine( 0, 0, s.width, 0 );

	  g.setColor( c.getBackground() );
	  g.drawLine( 0, 1, s.width, 1 );
	}
    
protected voiduninstallDefaults(javax.swing.JSeparator s)

    
protected voiduninstallListeners(javax.swing.JSeparator s)

    
public voiduninstallUI(javax.swing.JComponent c)

        uninstallDefaults( (JSeparator)c );
        uninstallListeners( (JSeparator)c );