public class Size_Limits extends Object implements ComponentListener
Constructor and Description |
---|
Size_Limits()
Constructs Size_Limits with unlimited width and height.
|
Size_Limits(Integer_Range width_limits,
Integer_Range height_limits)
Constructs Size_Limits from a pair of limits.
|
Modifier and Type | Method and Description |
---|---|
void |
componentHidden(ComponentEvent event)
No-op.
|
void |
componentMoved(ComponentEvent event)
No-op.
|
void |
componentResized(ComponentEvent event)
The size of the component is constrained to the
width limits and height limits . |
void |
componentShown(ComponentEvent event)
No-op.
|
Integer_Range |
Height_Limits()
Gets the height limits.
|
Size_Limits |
Height_Limits(Integer_Range height_limits)
Sets the height limits.
|
int |
Max_Height()
Gets the maximum height limit.
|
Size_Limits |
Max_Height(int max_height)
Sets the maximum height limit.
|
int |
Max_Width()
Gets the maximum width limit.
|
Size_Limits |
Max_Width(int max_width)
Sets the maximum width limit.
|
int |
Min_Height()
Gets the minimum height limit.
|
Size_Limits |
Min_Height(int min_height)
Sets the minimum height limit.
|
int |
Min_Width()
Gets the minimum width limit.
|
Size_Limits |
Min_Width(int min_width)
Sets the minimum width limit.
|
Integer_Range |
Width_Limits()
Gets the width limits.
|
Size_Limits |
Width_Limits(Integer_Range width_limits)
Sets the width limits.
|
public static final String ID
public Size_Limits(Integer_Range width_limits, Integer_Range height_limits)
width_limits
- The Integer_Range limiting the width of the
component. If null, the width will be unlimited.height_limits
- The Integer_Range limiting the height of the
component. If null, the width will be unlimited.Integer_Range
public Size_Limits()
public Integer_Range Width_Limits()
public int Min_Width()
public int Max_Width()
Integer.MAX_VALUE
if the maximum width is unlimited.public Size_Limits Width_Limits(Integer_Range width_limits)
width_limits
- An Integer_Range specifying the limits.public Size_Limits Min_Width(int min_width)
min_width
- The minimum width limit.public Size_Limits Max_Width(int max_width)
max_width
- The maximum width limit.public Integer_Range Height_Limits()
public int Min_Height()
public int Max_Height()
Integer.MAX_VALUE
if the maximum height is unlimited.public Size_Limits Height_Limits(Integer_Range height_limits)
height_limits
- An Integer_Range specifying the limits.public Size_Limits Min_Height(int min_height)
min_height
- The minimum height limit.public Size_Limits Max_Height(int max_height)
max_height
- The maximum height limit.public void componentResized(ComponentEvent event)
width limits
and height limits
.
componentResized
in interface ComponentListener
event
- The ComponentEvent specifying the component that
was resized.public void componentMoved(ComponentEvent event)
componentMoved
in interface ComponentListener
public void componentShown(ComponentEvent event)
componentShown
in interface ComponentListener
public void componentHidden(ComponentEvent event)
componentHidden
in interface ComponentListener