Package org.knowm.xchart
Class AnnotationTextPanel
- java.lang.Object
-
- org.knowm.xchart.internal.chartpart.Annotation
-
- org.knowm.xchart.AnnotationTextPanel
-
- All Implemented Interfaces:
ChartPart
public class AnnotationTextPanel extends Annotation
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>linesprivate static intMULTI_LINE_SPACEprotected doublexprotected doubley-
Fields inherited from class org.knowm.xchart.internal.chartpart.Annotation
bounds, chart, isValueInScreenSpace, isVisible, styler
-
Fields inherited from interface org.knowm.xchart.internal.chartpart.ChartPart
SOLID_STROKE
-
-
Constructor Summary
Constructors Constructor Description AnnotationTextPanel(java.lang.String lines, double x, double y, boolean isValueInScreenSpace)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Map<java.lang.String,java.awt.geom.Rectangle2D>getTextBounds(java.util.List<java.lang.String> lines)voidinit(Chart chart)voidpaint(java.awt.Graphics2D g)voidsetLines(java.util.List<java.lang.String> lines)voidsetX(double x)voidsetY(double y)-
Methods inherited from class org.knowm.xchart.internal.chartpart.Annotation
getBounds, getXAxisScreenValue, getXAxisScreenValueForMax, getXAxisScreenValueForMin, getYAxisScreenValue, getYAxisScreenValueForMax, getYAxisScreenValueForMin, setVisible
-
-
-
-
Field Detail
-
MULTI_LINE_SPACE
private static final int MULTI_LINE_SPACE
- See Also:
- Constant Field Values
-
lines
private java.util.List<java.lang.String> lines
-
x
protected double x
-
y
protected double y
-
-
Method Detail
-
init
public void init(Chart chart)
- Overrides:
initin classAnnotation
-
paint
public void paint(java.awt.Graphics2D g)
-
getTextBounds
private java.util.Map<java.lang.String,java.awt.geom.Rectangle2D> getTextBounds(java.util.List<java.lang.String> lines)
-
setLines
public void setLines(java.util.List<java.lang.String> lines)
-
setX
public void setX(double x)
-
setY
public void setY(double y)
-
-