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, waitforKeyword, forKeyword, generateGlyphVectorspublic 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)
PositionForAreaStrategyfindLabelPlacement in interface PositionForAreaStrategypath - 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()
PositionForAreaStrategysupportsGlyphVector in interface PositionForAreaStrategytrue if it is supported.public PositionForAreaStrategy withAddedOffset(java.awt.geom.Point2D addToOffset)
PositionForAreaStrategywithAddedOffset in interface PositionForAreaStrategyaddToOffset - The offset to addpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object