com.jrefinery.chart
Class Spacer
java.lang.Object
com.jrefinery.chart.Spacer
- All Implemented Interfaces:
- java.lang.Cloneable
public class Spacer
- extends java.lang.Object
- implements java.lang.Cloneable
Represents an amount of blank space inside (or sometimes outside) a rectangle. This class is
similar in function to the Insets class, but allows for the space to be specified in relative
terms as well as absolute terms.
Immutable.
|
Constructor Summary |
Spacer(int type,
double left,
double top,
double right,
double bottom)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RELATIVE
public static final int RELATIVE
- See Also:
- Constant Field Values
ABSOLUTE
public static final int ABSOLUTE
- See Also:
- Constant Field Values
type
protected int type
left
protected double left
top
protected double top
right
protected double right
bottom
protected double bottom
Spacer
public Spacer(int type,
double left,
double top,
double right,
double bottom)
getLeftSpace
public double getLeftSpace(double width)
getRightSpace
public double getRightSpace(double width)
getTopSpace
public double getTopSpace(double height)
getBottomSpace
public double getBottomSpace(double height)
getAdjustedWidth
public double getAdjustedWidth(double width)
- Returns the width after adding the left and right spacing amounts.
getAdjustedHeight
public double getAdjustedHeight(double height)
- Returns the height after adding the top and bottom spacing amounts.
Copyright © 2003 MBARI.
The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.