Class CurveLabel

java.lang.Object
eu.webtoolkit.jwt.chart.CurveLabel

public class CurveLabel
extends java.lang.Object
A curve label.

Curve labels can be added with WCartesianChart#addCurveLabel(). They are associated with a particular series, and are drawn at the given point in model coordinates. When the chart is transformed (zoom or pan) or the associated series is manipulated, the curve label's position will change, but not its size.

A curve label

  • Constructor Summary

    Constructors 
    Constructor Description
    CurveLabel​(WDataSeries series, WPointF point, java.lang.String label)
    Create a new curve label.
    CurveLabel​(WDataSeries series, java.lang.Object x, java.lang.Object y, java.lang.String label)
    Create a new curve label.
  • Method Summary

    Modifier and Type Method Description
    WBrush getBoxBrush()
    Get the brush to use for the box around the text.
    java.lang.String getLabel()
    Get the label that should be drawn in the box.
    WPen getLinePen()
    Get the pen to use for the connecting line.
    WBrush getMarkerBrush()
    Get the brush used to fill the circle at getPoint().
    WPointF getOffset()
    Get the offset the text should be placed at.
    WPointF getPoint()
    Get the point in model coordinates this label is associated with.
    WDataSeries getSeries()
    Get the series this curve label is associated with.
    WPen getTextPen()
    Get the pen for the text in the box.
    int getWidth()
    Get the width of the box in pixels.
    java.lang.Object getX()
    Get the x position for this label.
    java.lang.Object getY()
    Get the y position for this label.
    void render​(WPainter painter)  
    void setBoxBrush​(WBrush brush)
    Set the brush to use for the box around the text.
    void setLabel​(java.lang.String label)
    Set the label that should be drawn in the box.
    void setLinePen​(WPen pen)
    Set the pen to use for the connecting line.
    void setMarkerBrush​(WBrush brush)
    Set the brush used to fill the circle at getPoint().
    void setOffset​(WPointF offset)
    Set the offset the text should be placed at.
    void setPoint​(WPointF point)
    Set the point in model coordinates this label is associated with.
    void setPoint​(java.lang.Object x, java.lang.Object y)
    Set the point in model coordinates this label is associated with.
    void setSeries​(WDataSeries series)
    Set the series this curve label is associated with.
    void setTextPen​(WPen pen)
    Set the pen for the text in the box.
    void setWidth​(int width)
    Set the width of the box in pixels.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CurveLabel

      public CurveLabel​(WDataSeries series, WPointF point, java.lang.String label)
      Create a new curve label.

      Create a new curve label for given series, at the given point with the given text.

    • CurveLabel

      public CurveLabel​(WDataSeries series, java.lang.Object x, java.lang.Object y, java.lang.String label)
      Create a new curve label.

      Create a new curve label for given series, at the given x, y coordinates and the given text.

  • Method Details