public class CompletelyInsideAreaStrategy extends java.lang.Object implements PositionForAreaStrategy
Modifier and Type | Field and Description |
---|---|
static CompletelyInsideAreaStrategy |
INSTANCE
An instance of this class.
|
protected double |
offsetX |
protected double |
offsetY |
Modifier | Constructor and Description |
---|---|
protected |
CompletelyInsideAreaStrategy(double offsetX,
double offsetY) |
Modifier and Type | Method and Description |
---|---|
private MapViewPositionAndRotation |
centerOf(MapViewState mapViewState,
java.awt.Rectangle centeredNBounds) |
boolean |
equals(java.lang.Object obj) |
MapViewPositionAndRotation |
findLabelPlacement(MapViewPath path,
java.awt.geom.Rectangle2D nb)
Finds the correct position of a label / icon inside the area.
|
int |
hashCode() |
boolean |
supportsGlyphVector()
Checks whether this placement strategy supports more detailed (rotation / ...) placement using a glyph vector.
|
java.lang.String |
toString() |
PositionForAreaStrategy |
withAddedOffset(java.awt.geom.Point2D addToOffset)
Create a new instance of the same strategy adding a offset
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forKeyword, forKeyword, generateGlyphVectors
public static final CompletelyInsideAreaStrategy INSTANCE
protected final double offsetX
protected final double offsetY
protected CompletelyInsideAreaStrategy(double offsetX, double offsetY)
public MapViewPositionAndRotation findLabelPlacement(MapViewPath path, java.awt.geom.Rectangle2D nb)
PositionForAreaStrategy
findLabelPlacement
in interface PositionForAreaStrategy
path
- The area to search innb
- The bounding box of the thing we are searching a place for.null
if none was found.private MapViewPositionAndRotation centerOf(MapViewState mapViewState, java.awt.Rectangle centeredNBounds)
public boolean supportsGlyphVector()
PositionForAreaStrategy
supportsGlyphVector
in interface PositionForAreaStrategy
true
if it is supported.public PositionForAreaStrategy withAddedOffset(java.awt.geom.Point2D addToOffset)
PositionForAreaStrategy
withAddedOffset
in interface PositionForAreaStrategy
addToOffset
- The offset to addpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object