Package snap.geom
Class Insets
java.lang.Object
snap.geom.Insets
- All Implemented Interfaces:
Cloneable
This class represents a margin inset.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Insets
Adds two insets together.static Insets
Adds two insets together.clone()
Returns a copy of this gradient paint.boolean
Standard equals method.static Insets
Returns an Insets instance from given string.double
Returns the bottom margin.double
Returns the height of the insets (top + bottom).double
getLeft()
Returns the left margin.double
getRight()
Returns the right margin.Returns a string representation of this Insets.Returns a string representation of this Insets.double
getTop()
Returns the top margin.double
getWidth()
Returns the width of the insets (left + right).int
hashCode()
Standard hashCode method.boolean
isEmpty()
Returns whether insets are empty.static Insets
Returns insets from given object.toString()
Standard toString implementation.
-
Field Details
-
top
public double top -
right
public double right -
bottom
public double bottom -
left
public double left -
EMPTY
-
-
Constructor Details
-
Insets
public Insets(double aVal) Create new Insets. -
Insets
public Insets(double aTop, double aRight, double aBottom, double aLeft) Create new Insets.
-
-
Method Details
-
getTop
public double getTop()Returns the top margin. -
getRight
public double getRight()Returns the right margin. -
getBottom
public double getBottom()Returns the bottom margin. -
getLeft
public double getLeft()Returns the left margin. -
isEmpty
public boolean isEmpty()Returns whether insets are empty. -
getWidth
public double getWidth()Returns the width of the insets (left + right). -
getHeight
public double getHeight()Returns the height of the insets (top + bottom). -
getString
Returns a string representation of this Insets. -
getStringLong
Returns a string representation of this Insets. -
clone
Returns a copy of this gradient paint. -
equals
Standard equals method. -
hashCode
public int hashCode()Standard hashCode method. -
toString
Standard toString implementation. -
add
Adds two insets together. -
add
Adds two insets together. -
get
Returns an Insets instance from given string. -
of
Returns insets from given object.
-