PIRL.Viewers

## Class Size_Limits

- java.lang.Object
- - PIRL.Viewers.Size_Limits

All Implemented Interfaces:
  ComponentListener, EventListener

    public class Size_Limits
    extends Object
    implements ComponentListener

Size_Limits limits the size of a component to which it is bound.

### Field Summary

Fields
`static String` `ID`

### Constructor Summary

Constructors
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.

### Method Summary

Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### ID

    public static final String ID

See Also:
  Constant Field Values

### Constructor Detail

#### Size_Limits

    public Size_Limits(Integer_Range width_limits,
               Integer_Range height_limits)

Constructs Size_Limits from a pair of limits.

Parameters:
  `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.
See Also:
  `Integer_Range`

#### Size_Limits

    public Size_Limits()

Constructs Size_Limits with unlimited width and height.

### Method Detail

#### Width_Limits

    public Integer_Range Width_Limits()

Gets the width limits.

Returns:
  An Integer_Range specifying the width limits. This is a copy of the Integer_Range used by this object; changing its limits will not affect the limits of this object.

#### Min_Width

    public int Min_Width()

Gets the minimum width limit.

Returns:
  The minimum width limit. This will be zero if the minimum width is unlimited. The value will never be less than zero.

#### Max_Width

    public int Max_Width()

Gets the maximum width limit.

Returns:
  The maximum width limit. This will be `Integer.MAX_VALUE` if the maximum width is unlimited.

#### Width_Limits

    public Size_Limits Width_Limits(Integer_Range width_limits)

Sets the width limits.

Parameters:
  `width_limits` - An Integer_Range specifying the limits.
Returns:
  This Size_Limits.

#### Min_Width

    public Size_Limits Min_Width(int min_width)

Sets the minimum width limit.

Parameters:
  `min_width` - The minimum width limit.
Returns:
  This Size_Limits.

#### Max_Width

    public Size_Limits Max_Width(int max_width)

Sets the maximum width limit.

Parameters:
  `max_width` - The maximum width limit.
Returns:
  This Size_Limits.

#### Height_Limits

    public Integer_Range Height_Limits()

Gets the height limits.

Returns:
  An Integer_Range specifying the height limits. This is a copy of the Integer_Range used by this object; changing its limits will not affect the limits of this object.

#### Min_Height

    public int Min_Height()

Gets the minimum height limit.

Returns:
  The minimum height limit. This will be zero if the minimum height is unlimited. The value will never be less than zero.

#### Max_Height

    public int Max_Height()

Gets the maximum height limit.

Returns:
  The maximum height limit. This will be `Integer.MAX_VALUE` if the maximum height is unlimited.

#### Height_Limits

    public Size_Limits Height_Limits(Integer_Range height_limits)

Sets the height limits.

Parameters:
  `height_limits` - An Integer_Range specifying the limits.
Returns:
  This Size_Limits.

#### Min_Height

    public Size_Limits Min_Height(int min_height)

Sets the minimum height limit.

Parameters:
  `min_height` - The minimum height limit.
Returns:
  This Size_Limits.

#### Max_Height

    public Size_Limits Max_Height(int max_height)

Sets the maximum height limit.

Parameters:
  `max_height` - The maximum height limit.
Returns:
  This Size_Limits.

#### componentResized

    public void componentResized(ComponentEvent event)

The size of the component is constrained to the `width limits` and `height limits`.

Specified by:
  `componentResized` in interface `ComponentListener`
Parameters:
  `event` - The ComponentEvent specifying the component that was resized.

#### componentMoved

    public void componentMoved(ComponentEvent event)

No-op.

Specified by:
  `componentMoved` in interface `ComponentListener`

#### componentShown

    public void componentShown(ComponentEvent event)

No-op.

Specified by:
  `componentShown` in interface `ComponentListener`

#### componentHidden

    public void componentHidden(ComponentEvent event)

No-op.

Specified by:
  `componentHidden` in interface `ComponentListener`