Methods Summary |
---|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent c)
return new BasicSeparatorUI();
|
public java.awt.Dimension | getMaximumSize(javax.swing.JComponent c) return null;
|
public java.awt.Dimension | getMinimumSize(javax.swing.JComponent c) return null;
|
public java.awt.Dimension | getPreferredSize(javax.swing.JComponent c)
if ( ((JSeparator)c).getOrientation() == JSeparator.VERTICAL )
return new Dimension( 2, 0 );
else
return new Dimension( 0, 2 );
|
protected void | installDefaults(javax.swing.JSeparator s)
LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" );
LookAndFeel.installProperty( s, "opaque", Boolean.FALSE);
|
protected void | installListeners(javax.swing.JSeparator s)
|
public void | installUI(javax.swing.JComponent c)
installDefaults( (JSeparator)c );
installListeners( (JSeparator)c );
|
public void | paint(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 void | uninstallDefaults(javax.swing.JSeparator s)
|
protected void | uninstallListeners(javax.swing.JSeparator s)
|
public void | uninstallUI(javax.swing.JComponent c)
uninstallDefaults( (JSeparator)c );
uninstallListeners( (JSeparator)c );
|