Codota Logo
AbstractXYItemRenderer
Code IndexAdd Codota to your IDE (free)

How to use
AbstractXYItemRenderer
in
org.jfree.chart.renderer.xy

Best Java code snippets using org.jfree.chart.renderer.xy.AbstractXYItemRenderer (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: geotools/geotools

@Override
public LegendItem getLegendItem(int datasetIndex, int series) {
  LegendItem li = super.getLegendItem(datasetIndex, series);
  Stroke outlineStroke = getItemStroke(series, 0);
  Paint fillPaint = li.getFillPaint();
  Paint outlinePaint = fillPaint;
  if (!fillCoordinates) {
    fillPaint = new Color(255, 255, 255, 255);
  }
  return new LegendItem(
      li.getLabel(),
      li.getDescription(),
      li.getToolTipText(),
      li.getURLText(),
      li.getShape(),
      fillPaint,
      outlineStroke,
      outlinePaint);
}
origin: geotools/geotools

@Override
public XYItemRendererState initialise(
    Graphics2D g2,
    Rectangle2D dataArea,
    XYPlot plot,
    XYDataset data,
    PlotRenderingInfo info) {
  return super.initialise(g2, dataArea, plot, data, info);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Adds an annotation and sends a {@link RendererChangeEvent} to all
 * registered listeners.  The annotation is added to the foreground
 * layer.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 */
public void addAnnotation(XYAnnotation annotation) {
  // defer argument checking
  addAnnotation(annotation, Layer.FOREGROUND);
}
origin: jfree/jfreechart

  boolean negative) {
XYItemLabelGenerator generator = getItemLabelGenerator(series, item);
if (generator != null) {
  Font labelFont = getItemLabelFont(series, item);
  Paint paint = getItemLabelPaint(series, item);
  g2.setFont(labelFont);
  g2.setPaint(paint);
    position = getPositiveItemLabelPosition(series, item);
    position = getNegativeItemLabelPosition(series, item);
  Point2D anchorPoint = calculateLabelAnchorPoint(
      position.getItemLabelAnchor(), x, y, orientation);
  TextUtils.drawRotatedString(label, g2,
origin: jfree/jfreechart

/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
  return super.clone();
}
origin: jfree/jfreechart

/**
 * Tests this renderer for equality with an arbitrary object.
 *
 * @param obj  the object ({@code null} permitted).
 *
 * @return A boolean.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof XYBubbleRenderer)) {
    return false;
  }
  XYBubbleRenderer that = (XYBubbleRenderer) obj;
  if (this.scaleType != that.scaleType) {
    return false;
  }
  return super.equals(obj);
}
origin: jfree/jfreechart

/**
 * Returns a (possibly empty) collection of legend items for the series
 * that this renderer is responsible for drawing.
 *
 * @return The legend item collection (never {@code null}).
 */
@Override
public LegendItemCollection getLegendItems() {
  if (this.plot == null) {
    return new LegendItemCollection();
  }
  LegendItemCollection result = new LegendItemCollection();
  int index = this.plot.getIndexOf(this);
  XYDataset dataset = this.plot.getDataset(index);
  if (dataset != null) {
    int seriesCount = dataset.getSeriesCount();
    for (int i = 0; i < seriesCount; i++) {
      if (isSeriesVisibleInLegend(i)) {
        LegendItem item = getLegendItem(index, i);
        if (item != null) {
          result.add(item);
        }
      }
    }
  }
  return result;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Draws a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
  if (isDomainZeroBaselineVisible()) {
    XYItemRenderer r = getRenderer();
    // FIXME: the renderer interface doesn't have the drawDomainLine()
    // method, so we have to rely on the renderer being a subclass of
    // AbstractXYItemRenderer (which is lame)
    if (r instanceof AbstractXYItemRenderer) {
      AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
      renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
          this.domainZeroBaselinePaint,
          this.domainZeroBaselineStroke);
    }
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the lower and upper bounds (range) of the x-values in the
 * specified dataset.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 *
 * @return The range (<code>null</code> if the dataset is <code>null</code>
 *         or empty).
 *
 * @see #findRangeBounds(XYDataset)
 */
public Range findDomainBounds(XYDataset dataset) {
  return findDomainBounds(dataset, false);
}
origin: jfree/jfreechart

Font labelFont = marker.getLabelFont();
g2.setFont(labelFont);
Point2D coords = calculateRangeMarkerTextAnchorPoint(
    g2, orientation, dataArea, line.getBounds2D(),
    marker.getLabelOffset(),
Font labelFont = marker.getLabelFont();
g2.setFont(labelFont);
Point2D coords = calculateRangeMarkerTextAnchorPoint(
    g2, orientation, dataArea, rect,
    marker.getLabelOffset(), marker.getLabelOffsetType(),
origin: jfree/jfreechart

Font labelFont = marker.getLabelFont();
g2.setFont(labelFont);
Point2D coords = calculateDomainMarkerTextAnchorPoint(
    g2, orientation, dataArea, line.getBounds2D(),
    marker.getLabelOffset(),
Font labelFont = marker.getLabelFont();
g2.setFont(labelFont);
Point2D coords = calculateDomainMarkerTextAnchorPoint(
    g2, orientation, dataArea, rect,
    marker.getLabelOffset(), marker.getLabelOffsetType(),
origin: org.codehaus.jtstand/jtstand-chart

  boolean negative) {
XYItemLabelGenerator generator = getItemLabelGenerator(series, item);
if (generator != null) {
  Font labelFont = getItemLabelFont(series, item);
  Paint paint = getItemLabelPaint(series, item);
  g2.setFont(labelFont);
  g2.setPaint(paint);
    position = getPositiveItemLabelPosition(series, item);
    position = getNegativeItemLabelPosition(series, item);
  Point2D anchorPoint = calculateLabelAnchorPoint(
      position.getItemLabelAnchor(), x, y, orientation);
  TextUtilities.drawRotatedString(label, g2,
origin: jfree/jfreechart

/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
  return super.clone();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Tests this renderer for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof XYBubbleRenderer)) {
    return false;
  }
  XYBubbleRenderer that = (XYBubbleRenderer) obj;
  if (this.scaleType != that.scaleType) {
    return false;
  }
  return super.equals(obj);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a (possibly empty) collection of legend items for the series
 * that this renderer is responsible for drawing.
 *
 * @return The legend item collection (never <code>null</code>).
 */
public LegendItemCollection getLegendItems() {
  if (this.plot == null) {
    return new LegendItemCollection();
  }
  LegendItemCollection result = new LegendItemCollection();
  int index = this.plot.getIndexOf(this);
  XYDataset dataset = this.plot.getDataset(index);
  if (dataset != null) {
    int seriesCount = dataset.getSeriesCount();
    for (int i = 0; i < seriesCount; i++) {
      if (isSeriesVisibleInLegend(i)) {
        LegendItem item = getLegendItem(index, i);
        if (item != null) {
          result.add(item);
        }
      }
    }
  }
  return result;
}
origin: jfree/jfreechart

((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
    getDomainAxis(), dataArea, tick.getValue(),
    gridPaint, gridStroke);
origin: jfree/jfreechart

/**
 * Returns the lower and upper bounds (range) of the x-values in the
 * specified dataset.
 *
 * @param dataset  the dataset ({@code null} permitted).
 *
 * @return The range ({@code null} if the dataset is {@code null}
 *         or empty).
 *
 * @see #findRangeBounds(XYDataset)
 */
@Override
public Range findDomainBounds(XYDataset dataset) {
  return findDomainBounds(dataset, false);
}
origin: org.codehaus.jtstand/jtstand-chart

g2.setFont(labelFont);
g2.setPaint(marker.getLabelPaint());
Point2D coordinates = calculateRangeMarkerTextAnchorPoint(
    g2, orientation, dataArea, line.getBounds2D(),
    marker.getLabelOffset(),
g2.setFont(labelFont);
g2.setPaint(marker.getLabelPaint());
Point2D coordinates = calculateRangeMarkerTextAnchorPoint(
    g2, orientation, dataArea, rect,
    marker.getLabelOffset(), marker.getLabelOffsetType(),
origin: org.codehaus.jtstand/jtstand-chart

g2.setFont(labelFont);
g2.setPaint(marker.getLabelPaint());
Point2D coordinates = calculateDomainMarkerTextAnchorPoint(
    g2, orientation, dataArea, line.getBounds2D(),
    marker.getLabelOffset(),
g2.setFont(labelFont);
g2.setPaint(marker.getLabelPaint());
Point2D coordinates = calculateDomainMarkerTextAnchorPoint(
    g2, orientation, dataArea, rect,
    marker.getLabelOffset(), marker.getLabelOffsetType(),
origin: jfree/jfreechart

/**
 * Returns a clone of this renderer.
 *
 * @return A clone of this renderer.
 *
 * @throws CloneNotSupportedException if there is a problem creating the
 *     clone.
 */
@Override
public Object clone() throws CloneNotSupportedException {
  return super.clone();
}
org.jfree.chart.renderer.xyAbstractXYItemRenderer

Javadoc

A base class that can be used to create new XYItemRendererimplementations.

Most used methods

  • getLegendItem
    Returns a default legend item for the specified series. Subclasses should override this method to ge
  • initialise
    Initialises the renderer and returns a state object that should be passed to all subsequent calls to
  • addAnnotation
    Adds an annotation to the specified layer and sends a RendererChangeEvent to all registered listener
  • calculateDomainMarkerTextAnchorPoint
    Calculates the (x, y) coordinates for drawing a marker label.
  • calculateLabelAnchorPoint
  • calculateRangeMarkerTextAnchorPoint
    Calculates the (x, y) coordinates for drawing a marker label.
  • clone
    Returns a clone of the renderer.
  • drawDomainLine
    Draws a line perpendicular to the domain axis.
  • equals
    Tests this renderer for equality with another object.
  • findDomainBounds
    Returns the lower and upper bounds (range) of the x-values in the specified dataset.
  • findRangeBounds
    Returns the range of values the renderer requires to display all the items from the specified datase
  • fireChangeEvent
  • findRangeBounds,
  • fireChangeEvent,
  • getAnnotations,
  • getDataBoundsIncludesVisibleSeriesOnly,
  • getDefaultEntityRadius,
  • getItemCreateEntity,
  • getItemLabelFont,
  • getItemLabelGenerator,
  • getItemLabelPaint,
  • getLegendItemToolTipGenerator

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • orElseThrow (Optional)
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Collectors (java.util.stream)
  • JOptionPane (javax.swing)
  • JTextField (javax.swing)
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now