Class Label
- java.lang.Object
-
- org.mapfish.print.processor.map.scalebar.Label
-
public class Label extends java.lang.Object
Position, size and content of a label.
-
-
Constructor Summary
Constructors Constructor Description Label(float graphicOffset, java.awt.font.TextLayout labelLayout, java.awt.Graphics2D graphics2D)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getGraphicOffset()
float
getHeight()
java.awt.font.TextLayout
getLabelLayout()
float
getRotatedHeight(float angle)
static float
getRotatedHeight(java.awt.Dimension dimension, float angle)
float
getRotatedWidth(float angle)
static float
getRotatedWidth(java.awt.Dimension dimension, float angle)
float
getWidth()
-
-
-
Constructor Detail
-
Label
public Label(float graphicOffset, java.awt.font.TextLayout labelLayout, java.awt.Graphics2D graphics2D)
Constructor.- Parameters:
graphicOffset
- Position offset.labelLayout
- Layout for the label.graphics2D
- Where it is going to be rendered (more accurate size computation
-
-
Method Detail
-
getRotatedHeight
public static float getRotatedHeight(java.awt.Dimension dimension, float angle)
- Parameters:
dimension
- Unrotated dimensionangle
- Angle- Returns:
- The height of the rotated label
-
getRotatedWidth
public static float getRotatedWidth(java.awt.Dimension dimension, float angle)
- Parameters:
dimension
- Unrotated dimensionangle
- Angle- Returns:
- The width of the rotated label
-
getWidth
public final float getWidth()
-
getHeight
public final float getHeight()
-
getGraphicOffset
public final float getGraphicOffset()
-
getLabelLayout
public final java.awt.font.TextLayout getLabelLayout()
-
getRotatedWidth
public float getRotatedWidth(float angle)
- Parameters:
angle
- Angle- Returns:
- The width of the rotated label
-
getRotatedHeight
public float getRotatedHeight(float angle)
- Parameters:
angle
- Angle- Returns:
- The height of the rotated label
-
-