All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.awt.Separator

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.sun.wizards.awt.InsetsPanel
                                   |
                                   +----com.sun.wizards.awt.Separator

public class Separator
extends InsetsPanel
The Separator is an object that visually separates regions with a line.

Graphic of a Separator in the horizontal orientation.

Here is the code for this applet:


 import java.applet.Applet;
 import java.awt.*;
 import com.sun.wizards.awt.*;
 public class Test extends Applet
 {
   public void init()
     {
       setLayout(new BorderLayout());
       add(new Separator(), "Center");
     }
 }
 


Variable Index

 o HORIZONTAL
Horizontal orientation.
 o orientation
The current orientation of this separator.
 o VERTICAL
Vertical orientation.

Constructor Index

 o Separator()
Creates a new Separator with horizontal orientation.
 o Separator(int)
Creates a new Separator with the specified orientation.

Method Index

 o getPreferredSize()
Returns the preferred size of this separator.
 o paint(Graphics)
Paints the Separator object using the specified Graphics.

Variables

 o HORIZONTAL
 public static final int HORIZONTAL
Horizontal orientation.

 o VERTICAL
 public static final int VERTICAL
Vertical orientation.

 o orientation
 protected int orientation
The current orientation of this separator.

Constructors

 o Separator
 public Separator()
Creates a new Separator with horizontal orientation.

 o Separator
 public Separator(int orientation)
Creates a new Separator with the specified orientation.

Parameters:
orientation - The orientation of this separator.

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this separator.

Returns:
The preferred size.
Overrides:
getPreferredSize in class Container
 o paint
 public void paint(Graphics g)
Paints the Separator object using the specified Graphics.

Parameters:
g - The specified Graphics window.
Overrides:
paint in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index