Class Dimension
- java.lang.Object
-
- org.jungrapht.visualization.layout.model.Dimension
-
public class Dimension extends Object
Holds a width and height pair. Used to limit awt dependencies. Replaced by Rectangle in TreeLayouts
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()Dimensionintersection(Dimension other)static Dimensionof(int width, int height)StringtoString()Dimensionunion(Dimension other)create a new Dimension with sufficient expanse to also include other
-
-
-
Method Detail
-
of
public static Dimension of(int width, int height)
- Parameters:
width- horizontal expanseheight- vertical expanse- Returns:
- a new Dimension with the passed parameters
-
union
public Dimension union(Dimension other)
create a new Dimension with sufficient expanse to also include other- Parameters:
other- another Dimension to augment this with- Returns:
- a new Dimension with sufficient expanse to also include other
-
intersection
public Dimension intersection(Dimension other)
- Parameters:
other- another Dimension to compare this with- Returns:
- a new Dimension of the intersection of this with other
-
toString
public String toString()
-
equals
public boolean equals(Object o)
-
-