org.jfree.chart.block
public class RectangleConstraint extends Object
Field Summary | |
---|---|
static RectangleConstraint | NONE
An instance representing no constraint. |
Constructor Summary | |
---|---|
RectangleConstraint(double w, double h)
Creates a new "fixed width and height" instance.
| |
RectangleConstraint(Range w, Range h)
Creates a new "range width and height" instance.
| |
RectangleConstraint(Range w, double h)
Creates a new constraint with a range for the width and a
fixed height.
| |
RectangleConstraint(double w, Range h)
Creates a new constraint with a fixed width and a range for
the height.
| |
RectangleConstraint(double w, Range widthRange, LengthConstraintType widthConstraintType, double h, Range heightRange, LengthConstraintType heightConstraintType)
Creates a new constraint.
|
Method Summary | |
---|---|
Size2D | calculateConstrainedSize(Size2D base)
Returns the new size that reflects the constraints defined by this
instance.
|
double | getHeight()
Returns the fixed height.
|
LengthConstraintType | getHeightConstraintType()
Returns the constraint type.
|
Range | getHeightRange()
Returns the width range.
|
double | getWidth()
Returns the fixed width.
|
LengthConstraintType | getWidthConstraintType()
Returns the constraint type.
|
Range | getWidthRange()
Returns the width range.
|
RectangleConstraint | toFixedHeight(double height)
Returns a constraint that matches this one on the width attributes,
but has a fixed height constraint.
|
RectangleConstraint | toFixedWidth(double width)
Returns a constraint that matches this one on the height attributes,
but has a fixed width constraint.
|
RectangleConstraint | toRangeHeight(Range range)
Returns a constraint that matches this one on the width attributes,
but has a range height constraint.
|
RectangleConstraint | toRangeWidth(Range range)
Returns a constraint that matches this one on the height attributes,
but has a range width constraint.
|
String | toString()
Returns a string representation of this instance, mostly used for
debugging purposes.
|
RectangleConstraint | toUnconstrainedHeight()
Returns a constraint that matches this one on the width attributes,
but has no height constraint.
|
RectangleConstraint | toUnconstrainedWidth()
Returns a constraint that matches this one on the height attributes,
but has no width constraint.
|
Parameters: w the fixed width. h the fixed height.
Parameters: w the width range. h the height range.
Parameters: w the width range. h the fixed height.
Parameters: w the fixed width. h the height range.
Parameters: w the fixed or maximum width. widthRange the width range. widthConstraintType the width type. h the fixed or maximum height. heightRange the height range. heightConstraintType the height type.
Parameters: base the base size.
Returns: The constrained size.
Returns: The height.
Returns: The constraint type (never null
).
Returns: The range (possibly null
).
Returns: The width.
Returns: The constraint type (never null
).
Returns: The range (possibly null
).
Parameters: height the fixed height.
Returns: A new constraint.
Parameters: width the fixed width.
Returns: A new constraint.
Parameters: range the height range (null
not permitted).
Returns: A new constraint.
Parameters: range the width range (null
not permitted).
Returns: A new constraint.
Returns: A string.
Returns: A new constraint.
Returns: A new constraint.