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.
-
Sizer()
-
-
Sizer(Dimension)
- creates a new Sizer with a size equal to d.
-
Sizer(Dimension, Insets)
-
-
Sizer(Insets)
- creates a new Sizer with insets equal to the given value.
-
add(Component)
- Adds a component.
-
getInsets()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
main(String[])
- a simple test program for the Sizer class.
-
setInsets(Insets)
-
-
setInsets(int, int, int, int)
- Sets the insets.
-
setLayout(LayoutManager)
-
-
setPreferredSize(Dimension)
-
-
setPreferredSize(int, int)
-
Sizer
public Sizer()
Sizer
public Sizer(Dimension d)
- creates a new Sizer with a size equal to d.
Sizer
public Sizer(Insets i)
- creates a new Sizer with insets equal to the given value.
Sizer
public Sizer(Dimension d,
Insets i)
setLayout
public void setLayout(LayoutManager layout)
- Overrides:
- setLayout in class Container
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
setPreferredSize
public void setPreferredSize(int width,
int height)
setPreferredSize
public void setPreferredSize(Dimension d)
setInsets
public void setInsets(int top,
int left,
int bottom,
int right)
- Sets the insets.
setInsets
public void setInsets(Insets ins)
getInsets
public Insets getInsets()
- Overrides:
- getInsets in class Container
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Container
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Container
main
public static void main(String args[])
- a simple test program for the Sizer class.
All Packages Class Hierarchy This Package Previous Next Index