Tabnine Logo
XYLineAndShapeRenderer$State
Code IndexAdd Tabnine to your IDE (free)

How to use
XYLineAndShapeRenderer$State
in
org.jfree.chart.renderer.xy

Best Java code snippets using org.jfree.chart.renderer.xy.XYLineAndShapeRenderer$State (Showing top 7 results out of 315)

origin: infiniteautomation/ma-core-public

@Override
protected void drawPrimaryLineAsPath(XYItemRendererState state,
    Graphics2D g2, XYPlot plot, XYDataset dataset, int pass,
    int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis,
    Rectangle2D dataArea) {
  RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
  RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
  // get the data point...
  double x1 = dataset.getXValue(series, item);
  double y1 = dataset.getYValue(series, item);
  double transX1 = domainAxis.valueToJava2D(x1, dataArea, xAxisLocation);
  double transY1 = rangeAxis.valueToJava2D(y1, dataArea, yAxisLocation);
  State s = (State) state;
  // update path to reflect latest point
  if (!Double.isNaN(transX1) && !Double.isNaN(transY1)) {
    this.points.add(new Point2D.Double(transX1, transY1));
  }
  // if this is the last item, draw the path ...
  if (item == s.getLastItemIndex()) {
    List<Point2D> pts = this.getCurvePoints();
    s.seriesPath.moveTo(pts.get(0).getX(), pts.get(0).getY());
    for (int i = 1; i < pts.size(); i++) {
      final Point2D p = pts.get(i);
      s.seriesPath.lineTo(p.getX(), p.getY());
    }
    // draw path
    drawFirstPassShape(g2, pass, series, item, s.seriesPath);
    this.points.clear();
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Initialises the renderer.
 * <P>
 * This method will be called before the first item is rendered, giving the
 * renderer an opportunity to initialise any state information it wants to
 * maintain.  The renderer can do nothing if it chooses.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param data  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return The renderer state.
 */
public XYItemRendererState initialise(Graphics2D g2,
                   Rectangle2D dataArea,
                   XYPlot plot,
                   XYDataset data,
                   PlotRenderingInfo info) {
  State state = new State(info);
  state.seriesPath = new GeneralPath();
  return state;
}
origin: infiniteautomation/ma-core-public

@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
    XYPlot plot, XYDataset data, PlotRenderingInfo info) {
  State state = (State) super.initialise(g2, dataArea, plot, data, info);
  state.setProcessVisibleItemsOnly(false);
  this.points.clear();
  setDrawSeriesLineAsPath(true);
  return state;
}
origin: org.codehaus.jtstand/jtstand-chart

    y = (float) transX1;
  if (s.isLastPointGood()) {
    s.seriesPath.lineTo(x, y);
    s.seriesPath.moveTo(x, y);
  s.setLastPointGood(true);
  s.setLastPointGood(false);
if (item == s.getLastItemIndex()) {
origin: jfree/jfreechart

    y = (float) transX1;
  if (s.isLastPointGood()) {
    s.seriesPath.lineTo(x, y);
    s.seriesPath.moveTo(x, y);
  s.setLastPointGood(true);
} else {
  s.setLastPointGood(false);
if (item == s.getLastItemIndex()) {
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Initialises the renderer.
 * <P>
 * This method will be called before the first item is rendered, giving the
 * renderer an opportunity to initialise any state information it wants to
 * maintain.  The renderer can do nothing if it chooses.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param data  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return The renderer state.
 */
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
    XYPlot plot, XYDataset data, PlotRenderingInfo info) {
  State state = (State) super.initialise(g2, dataArea, plot, data, info);
  state.setProcessVisibleItemsOnly(false);
  this.points = new Vector();
  setDrawSeriesLineAsPath(true);
  return state;
}
origin: jfree/jfreechart

/**
 * Initialises the renderer.
 * <P>
 * This method will be called before the first item is rendered, giving the
 * renderer an opportunity to initialise any state information it wants to
 * maintain.  The renderer can do nothing if it chooses.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param data  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return The renderer state.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
    XYPlot plot, XYDataset data, PlotRenderingInfo info) {
  return new State(info);
}
org.jfree.chart.renderer.xyXYLineAndShapeRenderer$State

Javadoc

Records the state for the renderer. This is used to preserve state information between calls to the drawItem() method for a single chart drawing.

Most used methods

  • getLastItemIndex
  • <init>
    Creates a new state instance.
  • isLastPointGood
    Returns a flag that indicates if the last point drawn (in the current series) was 'good' (non-null).
  • setLastPointGood
    Sets a flag that indicates if the last point drawn (in the current series) was 'good' (non-null).
  • setProcessVisibleItemsOnly

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now