de.erichseifert.gral.util
Class Insets2D

java.lang.Object
  extended by de.erichseifert.gral.util.Insets2D
Direct Known Subclasses:
Insets2D.Double

public abstract class Insets2D
extends Object

Abstract class that stores insets for all four directions.

Please use this instead of java.awt.Insets, as the java class does not support double values.


Nested Class Summary
static class Insets2D.Double
          Class that stores insets as double values.
 
Constructor Summary
Insets2D()
          Creates a new Insets2D object.
 
Method Summary
abstract  double getBottom()
          Returns the insets at the bottom.
abstract  double getLeft()
          Returns the insets at the left.
abstract  double getRight()
          Returns the insets at the right.
abstract  double getTop()
          Returns the insets at the top.
abstract  void setInsets(double top, double left, double bottom, double right)
          Sets the insets to the specified values.
abstract  void setInsets(Insets2D insets)
          Sets the insets according to the specified insets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Insets2D

public Insets2D()
Creates a new Insets2D object.

Method Detail

getTop

public abstract double getTop()
Returns the insets at the top.

Returns:
Top insets.

getLeft

public abstract double getLeft()
Returns the insets at the left.

Returns:
Left insets.

getBottom

public abstract double getBottom()
Returns the insets at the bottom.

Returns:
Bottom insets.

getRight

public abstract double getRight()
Returns the insets at the right.

Returns:
Right insets.

setInsets

public abstract void setInsets(Insets2D insets)
Sets the insets according to the specified insets.

Parameters:
insets - Insets to be set.

setInsets

public abstract void setInsets(double top,
                               double left,
                               double bottom,
                               double right)
Sets the insets to the specified values.

Parameters:
top - Top insets.
left - Left insets.
bottom - Bottom insets.
right - Right insets.


Copyright © 2009-2010. All Rights Reserved.