de.erichseifert.gral.graphics
Class Insets2D
- java.lang.Object
-
- de.erichseifert.gral.graphics.Insets2D
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Insets2D.Double
public abstract class Insets2D extends java.lang.Object implements java.io.SerializableAbstract 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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classInsets2D.DoubleClass that stores insets as double values.
-
Constructor Summary
Constructors Constructor and Description Insets2D()Creates a new Insets2D object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract doublegetBottom()Returns the insets at the bottom.doublegetHorizontal()Returns the sum of horizontal insets.abstract doublegetLeft()Returns the insets at the left.abstract doublegetRight()Returns the insets at the right.abstract doublegetTop()Returns the insets at the top.doublegetVertical()Returns the sum of vertical insets.abstract voidsetInsets(double top, double left, double bottom, double right)Sets the insets to the specified values.abstract voidsetInsets(Insets2D insets)Sets the insets according to the specified insets.
-
-
-
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.
-
getHorizontal
public double getHorizontal()
Returns the sum of horizontal insets.- Returns:
- Horizontal insets.
-
getVertical
public double getVertical()
Returns the sum of vertical insets.- Returns:
- Vertical 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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG