All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class datarep.common.Spacer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----datarep.common.Spacer

public class Spacer
extends Component
The Spacer class provides a simple component which takes up space, but does not respond to events. This is useful as a placeholder in a layout, or to adjust the spacing between parts in a layout, giving more precise control over the display of a program.

Version:
1.2
Author:
Data Representations, Inc.

Constructor Index

 o Spacer()
 o Spacer(Dimension)
Construct a new spacer with the dimension as specified.
 o Spacer(int)
Construct a new spacer with width as specified, and height of 0.
 o Spacer(int, int)
Construct a new spacer with width and height as specified.
 o Spacer(int, String)
Construct a new spacer with height as specified, and width of 0.

Method Index

 o getMinimumSize()
returns the current size.
 o getPreferredSize()
returns the current size.
 o setPreferredSize(Dimension)
Sets the size to the specified dimension.
 o setPreferredSize(int, int)
Sets the size to the specified width and height.

Constructors

 o Spacer
 public Spacer()
 o Spacer
 public Spacer(int width)
Construct a new spacer with width as specified, and height of 0.

 o Spacer
 public Spacer(int height,
               String marker)
Construct a new spacer with height as specified, and width of 0. The string is included just to differentiate from the width constructor.

 o Spacer
 public Spacer(int width,
               int height)
Construct a new spacer with width and height as specified.

 o Spacer
 public Spacer(Dimension d)
Construct a new spacer with the dimension as specified.

Methods

 o setPreferredSize
 public void setPreferredSize(int width,
                              int height)
Sets the size to the specified width and height.

 o setPreferredSize
 public void setPreferredSize(Dimension d)
Sets the size to the specified dimension.

 o getPreferredSize
 public Dimension getPreferredSize()
returns the current size.

Overrides:
getPreferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
returns the current size.

Overrides:
getMinimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index