Save This Page
Home » jcommon-1.0.13 » org.jfree.ui » [javadoc | source]
org.jfree.ui
public class: Spacer [javadoc | source]
java.lang.Object
   org.jfree.ui.Spacer

All Implemented Interfaces:
    Serializable

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. Instances of this class are immutable.

In general, using RectangleInsets is preferred to this class.

Field Summary
public static final  int RELATIVE    A constant for 'relative' spacing. 
public static final  int ABSOLUTE    A constant for 'absolute' spacing. 
public static final  Spacer NO_SPACE    A spacer that adds no space around a rectangle. 
Constructor:
 public Spacer(int type,
    double left,
    double top,
    double right,
    double bottom) 
Method from org.jfree.ui.Spacer Summary:
calculateExtendedHeight,   calculateExtendedWidth,   equals,   getBottomSpace,   getLeftSpace,   getRightSpace,   getTopSpace,   hashCode,   trim,   trimWidth
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.ui.Spacer Detail:
 public double calculateExtendedHeight(double height) 
    Calculates the extended height after adding the top and bottom spacing amounts.
 public double calculateExtendedWidth(double width) 
    Returns the width after adding the left and right spacing amounts.
 public boolean equals(Object obj) 
    Tests this object for equality with another object.
 public double getBottomSpace(double height) 
    Returns the amount of space for the bottom of a rectangular area. The height argument is only used for calculating 'relative' spacing.
 public double getLeftSpace(double width) 
    Returns the amount of space for the left hand side of a rectangular area. The width argument is only used for calculating 'relative' spacing.
 public double getRightSpace(double width) 
    Returns the amount of space for the right hand side of a rectangular area. The width argument is only used for calculating 'relative' spacing.
 public double getTopSpace(double height) 
    Returns the amount of space for the top of a rectangular area. The height argument is only used for calculating 'relative' spacing.
 public int hashCode() 
    Returns a hashcode for this instance.
 public  void trim(Rectangle2D area) 
    Calculates the margins and trims them from the supplied area.
 public double trimWidth(double w) 
    Reduces the specified width according to the left and right space settings.