|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eesgmbh.gimv.shared.util.Bounds
public class Bounds
An immutable support class for working with left, right, top and bottom bounds.
| Constructor Summary | |
|---|---|
Bounds()
|
|
Bounds(Double left,
Double right,
Double top,
Double bottom)
Constructor that takes Double values. |
|
Bounds(Integer left,
Integer right,
Integer top,
Integer bottom)
Constructor that takes Integer values. |
|
Bounds(Long left,
Long right,
Long top,
Long bottom)
Constructor that takes Long values. |
|
| Method Summary | |
|---|---|
boolean |
contains(double x,
double y)
|
boolean |
containsHorizontally(double... values)
|
boolean |
containsVertically(double... values)
|
boolean |
equals(Object obj)
|
Point |
findAbsolutePoint(Point relPoint)
Determines the point in absolute coordinates based upon the passed in point which represents fraction values. |
static Bounds |
from(Bounds bounds)
Returns a new instance of Bounds with the same attributes as the passed bounds object. |
Double |
getAbsHeight()
|
Double |
getAbsWidth()
|
Double |
getBottom()
|
Double |
getHeight()
|
Double |
getHorizontalCenter()
|
Double |
getLeft()
|
Double |
getRight()
|
Double |
getTop()
|
Double |
getVerticalCenter()
|
Double |
getWidth()
|
int |
hashCode()
|
boolean |
isBottomDefined()
|
boolean |
isHorizontalBoundsDefined()
|
boolean |
isLeftDefined()
|
boolean |
isRightDefined()
|
boolean |
isTopDefined()
|
boolean |
isVerticalBoundsDefined()
|
Bounds |
normalizeBounds()
Replaces left and right and top and bottom, so that left <= right and top <= bottom. |
Bounds |
setBottom(Double bottom)
Returns a new Bounds object, whose bounds are the same except bottom, which is set to new value. |
Bounds |
setBottom(Integer bottom)
|
Bounds |
setBottom(Long bottom)
|
Bounds |
setLeft(Double left)
Returns a new Bounds object, whose bounds are the same except left, which is set to new value. |
Bounds |
setLeft(Integer left)
|
Bounds |
setLeft(Long left)
|
Bounds |
setRight(Double right)
Returns a new Bounds object, whose bounds are the same except right, which is set to new value. |
Bounds |
setRight(Integer right)
|
Bounds |
setRight(Long right)
|
Bounds |
setTop(Double top)
Returns a new Bounds object, whose bounds are the same except top, which is set to new value. |
Bounds |
setTop(Integer top)
|
Bounds |
setTop(Long top)
|
Bounds |
shiftAbsolute(double horizontal,
double vertical)
|
Bounds |
shiftBottom(double amount)
|
Bounds |
shiftBottomProportionally(double proportion)
|
Bounds |
shiftLeft(double amount)
|
Bounds |
shiftLeftProportionally(double proportion)
|
Bounds |
shiftProportional(double horizontal,
double vertical)
|
Bounds |
shiftRight(double amount)
|
Bounds |
shiftRightProportionally(double proportion)
|
Bounds |
shiftTop(double amount)
|
Bounds |
shiftTopProportionally(double proportion)
|
String |
toString()
|
Bounds |
transform(Bounds reference,
Bounds target)
Converts the bounds proportionally from one range into another. |
Bounds |
transformProportional(Bounds transBounds)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Bounds()
public Bounds(Double left,
Double right,
Double top,
Double bottom)
Double values.
left - The left boundright - The right boundtop - The top boundbottom - The bottom bound
public Bounds(Integer left,
Integer right,
Integer top,
Integer bottom)
Integer values.
left - The left boundright - The right boundtop - The top boundbottom - The bottom bound
public Bounds(Long left,
Long right,
Long top,
Long bottom)
Long values.
left - The left boundright - The right boundtop - The top boundbottom - The bottom bound| Method Detail |
|---|
public boolean contains(double x,
double y)
public boolean containsHorizontally(double... values)
values -
public boolean containsVertically(double... values)
values -
public boolean isLeftDefined()
public boolean isRightDefined()
public boolean isTopDefined()
public boolean isBottomDefined()
public boolean isHorizontalBoundsDefined()
public boolean isVerticalBoundsDefined()
public Double getHorizontalCenter()
public Double getVerticalCenter()
public Bounds shiftProportional(double horizontal,
double vertical)
public Bounds shiftLeft(double amount)
public Bounds shiftRight(double amount)
public Bounds shiftTop(double amount)
public Bounds shiftBottom(double amount)
public Bounds shiftLeftProportionally(double proportion)
public Bounds shiftRightProportionally(double proportion)
public Bounds shiftTopProportionally(double proportion)
public Bounds shiftBottomProportionally(double proportion)
public Bounds shiftAbsolute(double horizontal,
double vertical)
public Bounds transformProportional(Bounds transBounds)
public Bounds normalizeBounds()
Bounds object.
public Bounds transform(Bounds reference,
Bounds target)
Example:
reference - The minima and maxima of the range this bound is currently related to.target - The minima and maxima of the range this bound is going to be converted to.
targetRange.public Point findAbsolutePoint(Point relPoint)
relPoint -
public Double getLeft()
public Double getRight()
public Double getTop()
public Double getBottom()
public Double getWidth()
public Double getAbsWidth()
public Double getHeight()
public Double getAbsHeight()
public Bounds setLeft(Double left)
left -
public Bounds setLeft(Long left)
public Bounds setLeft(Integer left)
public Bounds setRight(Double right)
right -
public Bounds setRight(Long right)
public Bounds setRight(Integer right)
public Bounds setTop(Double top)
top -
public Bounds setTop(Long top)
public Bounds setTop(Integer top)
public Bounds setBottom(Double bottom)
bottom -
public Bounds setBottom(Long bottom)
public Bounds setBottom(Integer bottom)
public static Bounds from(Bounds bounds)
Bounds with the same attributes as the passed bounds object.
bounds - Bounds to be copied
Bounds with copied values from boundspublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||