All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class datarep.common.Sizer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----datarep.common.Sizer

public class Sizer
extends Container
The Sizer is a container which can hold one part. The height and width of the part it holds can be set, as well as the gaps (insets) around that part. This is a very useful Class to use to override the default sizing of a part by a layout.

Version:
1.2
Author:
Data Representations, Inc.

Constructor Index

 o Sizer()
 o Sizer(Dimension)
creates a new Sizer with a size equal to d.
 o Sizer(Dimension, Insets)
 o Sizer(Insets)
creates a new Sizer with insets equal to the given value.

Method Index

 o add(Component)
Adds a component.
 o getInsets()
 o getMinimumSize()
 o getPreferredSize()
 o main(String[])
a simple test program for the Sizer class.
 o setInsets(Insets)
 o setInsets(int, int, int, int)
Sets the insets.
 o setLayout(LayoutManager)
 o setPreferredSize(Dimension)
 o setPreferredSize(int, int)

Constructors

 o Sizer
 public Sizer()
 o Sizer
 public Sizer(Dimension d)
creates a new Sizer with a size equal to d.

 o Sizer
 public Sizer(Insets i)
creates a new Sizer with insets equal to the given value.

 o Sizer
 public Sizer(Dimension d,
              Insets i)

Methods

 o setLayout
 public void setLayout(LayoutManager layout)
Overrides:
setLayout in class Container
 o add
 public Component add(Component c)
Adds a component. There can only be one component inside a sizer at a time. (Although the component could be a layout, if desired.)

Overrides:
add in class Container
 o setPreferredSize
 public void setPreferredSize(int width,
                              int height)
 o setPreferredSize
 public void setPreferredSize(Dimension d)
 o setInsets
 public void setInsets(int top,
                       int left,
                       int bottom,
                       int right)
Sets the insets.

 o setInsets
 public void setInsets(Insets ins)
 o getInsets
 public Insets getInsets()
Overrides:
getInsets in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Container
 o main
 public static void main(String args[])
a simple test program for the Sizer class.


All Packages  Class Hierarchy  This Package  Previous  Next  Index