public PaintScaleLegend(PaintScale scale, ValueAxis axis) { PaintScaleLegend paintScaleLegend = this; if (axis == null) { string str = "Null 'axis' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else { this.scale = scale; this.axis = axis; this.axis.addChangeListener((AxisChangeListener) this); this.axisLocation = AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT; this.axisOffset = 0.0; this.axis.setRange(scale.getLowerBound(), scale.getUpperBound()); this.stripWidth = 15.0; this.stripOutlineVisible = true; this.stripOutlinePaint = (Paint) Color.gray; this.stripOutlineStroke = (Stroke) new BasicStroke(0.5f); this.backgroundPaint = (Paint) Color.white; this.subdivisions = 100; } }
public CombinedDomainXYPlot(ValueAxis domainAxis) : base((XYDataset) null, domainAxis, (ValueAxis) null, (XYItemRenderer) null) { CombinedDomainXYPlot combinedDomainXyPlot = this; this.gap = 5.0; this.subplots = (List) new ArrayList(); }
public ColorBar(string label) { base.\u002Ector(); ColorBar colorBar = this; this.colorBarThickness = 0; this.colorBarThicknessPercent = 0.1; this.colorPalette = (ColorPalette) null; this.colorBarLength = 0; NumberAxis numberAxis = new NumberAxis(label); numberAxis.setAutoRangeIncludesZero(false); this.axis = (ValueAxis) numberAxis; this.axis.setLowerMargin(0.0); this.axis.setUpperMargin(0.0); this.colorPalette = (ColorPalette) new RainbowPalette(); this.colorBarThickness = 0; this.colorBarThicknessPercent = 0.1; this.outerGap = 2; this.colorPalette.setMinZ(this.axis.getRange().getLowerBound()); this.colorPalette.setMaxZ(this.axis.getRange().getUpperBound()); }
public override Range getDataRange(ValueAxis axis) { Range range1 = (Range) null; if (this.subplots != null) { Iterator iterator = this.subplots.iterator(); while (iterator.hasNext()) { XYPlot xyPlot = (XYPlot) iterator.next(); range1 = Range.combine(range1, xyPlot.getDataRange(axis)); } } return range1; }
public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer) { CategoryPlot categoryPlot = this; this.renderingOrder = DatasetRenderingOrder.__\u003C\u003EREVERSE; this.columnRenderingOrder = SortOrder.__\u003C\u003EASCENDING; this.rowRenderingOrder = SortOrder.__\u003C\u003EASCENDING; this.rangeCrosshairLockedOnData = true; this.orientation = PlotOrientation.__\u003C\u003EVERTICAL; this.domainAxes = new ObjectList(); this.domainAxisLocations = new ObjectList(); this.rangeAxes = new ObjectList(); this.rangeAxisLocations = new ObjectList(); this.datasetToDomainAxesMap = new TreeMap(); this.datasetToRangeAxesMap = new TreeMap(); this.renderers = new ObjectList(); this.datasets = new ObjectList(); this.datasets.set(0, (object) dataset); if (dataset != null) dataset.addChangeListener((DatasetChangeListener) this); this.axisOffset = RectangleInsets.__\u003C\u003EZERO_INSETS; this.setDomainAxisLocation(AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT, false); this.setRangeAxisLocation(AxisLocation.__\u003C\u003ETOP_OR_LEFT, false); this.renderers.set(0, (object) renderer); if (renderer != null) { renderer.setPlot(this); renderer.addChangeListener((RendererChangeListener) this); } this.domainAxes.set(0, (object) domainAxis); this.mapDatasetToDomainAxis(0, 0); if (domainAxis != null) { domainAxis.setPlot((Plot) this); domainAxis.addChangeListener((AxisChangeListener) this); } this.drawSharedDomainAxis = false; this.rangeAxes.set(0, (object) rangeAxis); this.mapDatasetToRangeAxis(0, 0); if (rangeAxis != null) { rangeAxis.setPlot((Plot) this); rangeAxis.addChangeListener((AxisChangeListener) this); } this.configureDomainAxes(); this.configureRangeAxes(); this.domainGridlinesVisible = false; this.domainGridlinePosition = CategoryAnchor.__\u003C\u003EMIDDLE; this.domainGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.domainGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.rangeZeroBaselineVisible = false; this.rangeZeroBaselinePaint = (Paint) Color.black; this.rangeZeroBaselineStroke = (Stroke) new BasicStroke(0.5f); this.rangeGridlinesVisible = true; this.rangeGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.rangeMinorGridlinesVisible = false; this.rangeMinorGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeMinorGridlinePaint = (Paint) Color.white; this.foregroundDomainMarkers = (Map) new HashMap(); this.backgroundDomainMarkers = (Map) new HashMap(); this.foregroundRangeMarkers = (Map) new HashMap(); this.backgroundRangeMarkers = (Map) new HashMap(); this.anchorValue = 0.0; this.domainCrosshairVisible = false; this.domainCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE; this.domainCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT; this.rangeCrosshairVisible = false; this.rangeCrosshairValue = 0.0; this.rangeCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE; this.rangeCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT; this.annotations = (List) new ArrayList(); this.rangePannable = false; }
public XYPlot(XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer) { XYPlot xyPlot = this; this.quadrantOrigin = (Point2D) new Point2D.Double(0.0, 0.0); Paint[] paintArray = new Paint[4]; int index1 = 0; // ISSUE: variable of the null type __Null local1 = null; paintArray[index1] = (Paint) local1; int index2 = 1; // ISSUE: variable of the null type __Null local2 = null; paintArray[index2] = (Paint) local2; int index3 = 2; // ISSUE: variable of the null type __Null local3 = null; paintArray[index3] = (Paint) local3; int index4 = 3; // ISSUE: variable of the null type __Null local4 = null; paintArray[index4] = (Paint) local4; this.quadrantPaint = paintArray; this.domainCrosshairLockedOnData = true; this.rangeCrosshairLockedOnData = true; this.datasetRenderingOrder = DatasetRenderingOrder.__\u003C\u003EREVERSE; this.seriesRenderingOrder = SeriesRenderingOrder.__\u003C\u003EREVERSE; this.orientation = PlotOrientation.__\u003C\u003EVERTICAL; this.weight = 1; this.axisOffset = RectangleInsets.__\u003C\u003EZERO_INSETS; this.domainAxes = new ObjectList(); this.domainAxisLocations = new ObjectList(); this.foregroundDomainMarkers = (Map) new HashMap(); this.backgroundDomainMarkers = (Map) new HashMap(); this.rangeAxes = new ObjectList(); this.rangeAxisLocations = new ObjectList(); this.foregroundRangeMarkers = (Map) new HashMap(); this.backgroundRangeMarkers = (Map) new HashMap(); this.datasets = new ObjectList(); this.renderers = new ObjectList(); this.datasetToDomainAxesMap = (Map) new TreeMap(); this.datasetToRangeAxesMap = (Map) new TreeMap(); this.annotations = (List) new ArrayList(); this.datasets.set(0, (object) dataset); if (dataset != null) dataset.addChangeListener((DatasetChangeListener) this); this.renderers.set(0, (object) renderer); if (renderer != null) { renderer.setPlot(this); renderer.addChangeListener((RendererChangeListener) this); } this.domainAxes.set(0, (object) domainAxis); this.mapDatasetToDomainAxis(0, 0); if (domainAxis != null) { domainAxis.setPlot((Plot) this); domainAxis.addChangeListener((AxisChangeListener) this); } this.domainAxisLocations.set(0, (object) AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT); this.rangeAxes.set(0, (object) rangeAxis); this.mapDatasetToRangeAxis(0, 0); if (rangeAxis != null) { rangeAxis.setPlot((Plot) this); rangeAxis.addChangeListener((AxisChangeListener) this); } this.rangeAxisLocations.set(0, (object) AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT); this.configureDomainAxes(); this.configureRangeAxes(); this.domainGridlinesVisible = true; this.domainGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.domainGridlinePaint = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.domainMinorGridlinesVisible = false; this.domainMinorGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.domainMinorGridlinePaint = (Paint) Color.white; this.domainZeroBaselineVisible = false; this.domainZeroBaselinePaint = (Paint) Color.black; this.domainZeroBaselineStroke = (Stroke) new BasicStroke(0.5f); this.rangeGridlinesVisible = true; this.rangeGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeGridlinePaint = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.rangeMinorGridlinesVisible = false; this.rangeMinorGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeMinorGridlinePaint = (Paint) Color.white; this.rangeZeroBaselineVisible = false; this.rangeZeroBaselinePaint = (Paint) Color.black; this.rangeZeroBaselineStroke = (Stroke) new BasicStroke(0.5f); this.domainCrosshairVisible = false; this.domainCrosshairValue = 0.0; this.domainCrosshairStroke = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE; this.domainCrosshairPaint = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT; this.rangeCrosshairVisible = false; this.rangeCrosshairValue = 0.0; this.rangeCrosshairStroke = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE; this.rangeCrosshairPaint = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT; }
protected internal virtual void drawInterval(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, IntervalCategoryDataset dataset, int row, int column) { int visibleSeriesIndex = state.getVisibleSeriesIndex(row); if (visibleSeriesIndex < 0) return; int num1 = state.getVisibleSeriesCount() < 0 ? this.getRowCount() : state.getVisibleSeriesCount(); int columnCount = this.getColumnCount(); PlotOrientation orientation = plot.getOrientation(); double num2 = 0.0; double num3 = 0.0; RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); Number endValue = dataset.getEndValue(row, column); if (endValue == null) return; double num4 = rangeAxis.valueToJava2D(endValue.doubleValue(), dataArea, rangeAxisEdge); Number startValue = dataset.getStartValue(row, column); if (startValue == null) return; double num5 = rangeAxis.valueToJava2D(startValue.doubleValue(), dataArea, rangeAxisEdge); if (num5 < num4) { double num6 = num5; num5 = num4; num4 = num6; } double num7 = state.getBarWidth(); double num8 = Math.abs(num5 - num4); RectangleEdge re = RectangleEdge.__\u003C\u003ELEFT; if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL) { double categoryStart = domainAxis.getCategoryStart(column, this.getColumnCount(), dataArea, domainAxisEdge); if (num1 > 1) { double num6 = ((RectangularShape) dataArea).getHeight() * this.getItemMargin() / (double) (columnCount * (num1 - 1)); num3 = categoryStart + (double) visibleSeriesIndex * (state.getBarWidth() + num6); } else num3 = categoryStart + (double) visibleSeriesIndex * state.getBarWidth(); num2 = num4; num8 = state.getBarWidth(); num7 = Math.abs(num5 - num4); re = RectangleEdge.__\u003C\u003ELEFT; } else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { double categoryStart = domainAxis.getCategoryStart(column, this.getColumnCount(), dataArea, domainAxisEdge); if (num1 > 1) { double num6 = ((RectangularShape) dataArea).getWidth() * this.getItemMargin() / (double) (columnCount * (num1 - 1)); num2 = categoryStart + (double) visibleSeriesIndex * (state.getBarWidth() + num6); } else num2 = categoryStart + (double) visibleSeriesIndex * state.getBarWidth(); num3 = num4; re = RectangleEdge.__\u003C\u003EBOTTOM; } Rectangle2D.Double @double = new Rectangle2D.Double(num2, num3, num7, num8); BarPainter barPainter = this.getBarPainter(); if (this.getShadowsVisible()) barPainter.paintBarShadow(g2, (BarRenderer) this, row, column, (RectangularShape) @double, re, false); this.getBarPainter().paintBar(g2, (BarRenderer) this, row, column, (RectangularShape) @double, re); CategoryItemLabelGenerator itemLabelGenerator = this.getItemLabelGenerator(row, column); if (itemLabelGenerator != null && this.isItemLabelVisible(row, column)) this.drawItemLabel(g2, (CategoryDataset) dataset, row, column, plot, itemLabelGenerator, (Rectangle2D) @double, false); EntityCollection entityCollection = state.getEntityCollection(); if (entityCollection == null) return; this.addItemEntity(entityCollection, (CategoryDataset) dataset, row, column, (Shape) @double); }
public override void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) { if (dataset is IntervalCategoryDataset) { IntervalCategoryDataset dataset1 = (IntervalCategoryDataset) dataset; this.drawInterval(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset1, row, column); } else base.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass); }
protected internal override void drawPrimaryLineAsPath(XYItemRendererState state, Graphics2D g2, XYPlot plot, XYDataset dataset, int pass, int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis, Rectangle2D dataArea) { RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); double xvalue = dataset.getXValue(series, item); double yvalue = dataset.getYValue(series, item); double num1 = domainAxis.valueToJava2D(xvalue, dataArea, domainAxisEdge); double num2 = rangeAxis.valueToJava2D(yvalue, dataArea, rangeAxisEdge); if (!Double.isNaN(num1) && !Double.isNaN(num2)) { XYSplineRenderer.ControlPoint controlPoint = new XYSplineRenderer.ControlPoint(this, plot.getOrientation() != PlotOrientation.__\u003C\u003EHORIZONTAL ? (float) num1 : (float) num2, plot.getOrientation() != PlotOrientation.__\u003C\u003EHORIZONTAL ? (float) num2 : (float) num1); if (!this.points.contains((object) controlPoint)) this.points.add((object) controlPoint); } if (item != dataset.getItemCount(series) - 1) return; XYLineAndShapeRenderer.State state1 = (XYLineAndShapeRenderer.State) state; if (this.points.size() > 1) { XYSplineRenderer.ControlPoint controlPoint1 = (XYSplineRenderer.ControlPoint) this.points.get(0); ((Path2D.Float) state1.seriesPath).moveTo(controlPoint1.x, controlPoint1.y); if (this.points.size() == 2) { XYSplineRenderer.ControlPoint controlPoint2 = (XYSplineRenderer.ControlPoint) this.points.get(1); ((Path2D.Float) state1.seriesPath).lineTo(controlPoint2.x, controlPoint2.y); } else { int length = this.points.size(); float[] numArray1 = new float[length]; float[] numArray2 = new float[length]; float[] numArray3 = new float[length]; float[] numArray4 = new float[length]; for (int index = 0; index < length; ++index) { XYSplineRenderer.ControlPoint controlPoint2 = (XYSplineRenderer.ControlPoint) this.points.get(index); numArray2[index] = controlPoint2.x; numArray1[index] = controlPoint2.y; } for (int index = 1; index <= length - 1; ++index) numArray4[index] = numArray2[index] - numArray2[index - 1]; float[] numArray5 = new float[length - 1]; float[] numArray6 = new float[length - 1]; float[] numArray7 = new float[length - 1]; for (int index = 1; index <= length - 2; ++index) { numArray6[index] = (numArray4[index] + numArray4[index + 1]) / 3f; numArray7[index] = numArray4[index + 1] / 6f; numArray5[index] = numArray4[index] / 6f; numArray3[index] = (numArray1[index + 1] - numArray1[index]) / numArray4[index + 1] - (numArray1[index] - numArray1[index - 1]) / numArray4[index]; } this.solveTridiag(numArray5, numArray6, numArray7, numArray3, length - 2); float num3 = numArray2[0]; float num4 = numArray1[0]; ((Path2D.Float) state1.seriesPath).moveTo(num3, num4); for (int index1 = 1; index1 <= length - 1; ++index1) { for (int index2 = 1; index2 <= this.precision; ++index2) { float num5 = numArray4[index1] * (float) index2 / (float) this.precision; float num6 = numArray4[index1] - num5; float num7 = (((float) (-(double) numArray3[index1 - 1] / 6.0) * (num6 + numArray4[index1]) * num5 + numArray1[index1 - 1]) * num6 + ((float) (-(double) numArray3[index1] / 6.0) * (num5 + numArray4[index1]) * num6 + numArray1[index1]) * num5) / numArray4[index1]; float num8 = numArray2[index1 - 1] + num5; ((Path2D.Float) state1.seriesPath).lineTo(num8, num7); } } } this.drawFirstPassShape(g2, pass, series, item, (Shape) state1.seriesPath); } this.points = new Vector(); }
public ContourPlot(ContourDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar) { ContourPlot contourPlot = this; this.colorBar = (ColorBar) null; this.domainCrosshairLockedOnData = true; this.rangeCrosshairLockedOnData = true; this.dataAreaRatio = 0.0; this.renderAsPoints = false; this.ptSizePct = 0.05; this.clipPath = (ClipPath) null; this.missingPaint = (Paint) null; this.dataset = dataset; if (dataset != null) dataset.addChangeListener((DatasetChangeListener) this); this.domainAxis = domainAxis; if (domainAxis != null) { domainAxis.setPlot((Plot) this); domainAxis.addChangeListener((AxisChangeListener) this); } this.rangeAxis = rangeAxis; if (rangeAxis != null) { rangeAxis.setPlot((Plot) this); rangeAxis.addChangeListener((AxisChangeListener) this); } this.colorBar = colorBar; if (colorBar != null) { colorBar.getAxis().setPlot((Plot) this); colorBar.getAxis().addChangeListener((AxisChangeListener) this); colorBar.configure(this); } this.colorBarLocation = RectangleEdge.__\u003C\u003ELEFT; this.toolTipGenerator = (ContourToolTipGenerator) new StandardContourToolTipGenerator(); }
public override Range getDataRange(ValueAxis axis) { return base.getDataRange(axis); }
public ThermometerPlot(ValueDataset dataset) { ThermometerPlot thermometerPlot = this; this.lowerBound = 0.0; this.upperBound = 100.0; this.bulbRadius = 40; this.columnRadius = 20; this.gap = 5; this.thermometerStroke = (Stroke) new BasicStroke(1f); this.thermometerPaint = (Paint) Color.black; this.units = 2; this.valueLocation = 3; this.axisLocation = 2; this.valueFont = new Font("SansSerif", 1, 16); this.valuePaint = (Paint) Color.white; this.valueFormat = (NumberFormat) new DecimalFormat(); this.mercuryPaint = (Paint) Color.lightGray; this.showValueLines = false; this.subrange = -1; double[][] numArray1 = new double[3][]; int index1 = 0; double[] numArray2 = new double[4]; int index2 = 0; double num1 = 0.0; numArray2[index2] = num1; int index3 = 1; double num2 = 50.0; numArray2[index3] = num2; int index4 = 2; double num3 = 0.0; numArray2[index4] = num3; int index5 = 3; double num4 = 50.0; numArray2[index5] = num4; numArray1[index1] = numArray2; int index6 = 1; double[] numArray3 = new double[4]; int index7 = 0; double num5 = 50.0; numArray3[index7] = num5; int index8 = 1; double num6 = 75.0; numArray3[index8] = num6; int index9 = 2; double num7 = 50.0; numArray3[index9] = num7; int index10 = 3; double num8 = 75.0; numArray3[index10] = num8; numArray1[index6] = numArray3; int index11 = 2; double[] numArray4 = new double[4]; int index12 = 0; double num9 = 75.0; numArray4[index12] = num9; int index13 = 1; double num10 = 100.0; numArray4[index13] = num10; int index14 = 2; double num11 = 75.0; numArray4[index14] = num11; int index15 = 3; double num12 = 100.0; numArray4[index15] = num12; numArray1[index11] = numArray4; this.subrangeInfo = numArray1; this.followDataInSubranges = false; this.useSubrangePaint = true; Paint[] paintArray = new Paint[3]; int index16 = 0; // ISSUE: variable of the null type __Null local1 = Color.green; paintArray[index16] = (Paint) local1; int index17 = 1; // ISSUE: variable of the null type __Null local2 = Color.orange; paintArray[index17] = (Paint) local2; int index18 = 2; // ISSUE: variable of the null type __Null local3 = Color.red; paintArray[index18] = (Paint) local3; this.subrangePaint = paintArray; this.subrangeIndicatorsVisible = true; this.subrangeIndicatorStroke = (Stroke) new BasicStroke(2f); this.rangeIndicatorStroke = (Stroke) new BasicStroke(3f); RectangleInsets.__\u003Cclinit\u003E(); this.padding = new RectangleInsets(UnitType.__\u003C\u003ERELATIVE, 0.05, 0.05, 0.05, 0.05); this.dataset = dataset; if (dataset != null) dataset.addChangeListener((DatasetChangeListener) this); NumberAxis numberAxis = new NumberAxis((string) null); numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); numberAxis.setAxisLineVisible(false); numberAxis.setPlot((Plot) this); numberAxis.addChangeListener((AxisChangeListener) this); this.rangeAxis = (ValueAxis) numberAxis; this.setAxisRange(); }
public virtual void drawRadialGridLines(Graphics2D g2, PolarPlot plot, ValueAxis radialAxis, List ticks, Rectangle2D dataArea) { ((Graphics) g2).setFont(radialAxis.getTickLabelFont()); g2.setPaint(plot.getRadiusGridlinePaint()); g2.setStroke(plot.getRadiusGridlineStroke()); double lowerBound = radialAxis.getLowerBound(); Point point = plot.translateValueThetaRadiusToJava2D(lowerBound, lowerBound, dataArea); Iterator iterator = ticks.iterator(); while (iterator.hasNext()) { NumberTick numberTick = (NumberTick) iterator.next(); int num1 = (int) (plot.translateValueThetaRadiusToJava2D(90.0, numberTick.getNumber().doubleValue(), dataArea).x - point.x); int num2 = point.x - num1; int num3 = point.y - num1; int num4 = 2 * num1; Ellipse2D.Double @double = new Ellipse2D.Double((double) num2, (double) num3, (double) num4, (double) num4); g2.setPaint(plot.getRadiusGridlinePaint()); g2.draw((Shape) @double); } }
public abstract void draw(Graphics2D gd, XYPlot xyp, Rectangle2D rd, ValueAxis va1, ValueAxis va2, int i, PlotRenderingInfo pri);
public FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis) { FastScatterPlot fastScatterPlot = this; if (domainAxis == null) { string str = "Null 'domainAxis' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else if (rangeAxis == null) { string str = "Null 'rangeAxis' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else { this.data = data; this.xDataRange = this.calculateXDataRange(data); this.yDataRange = this.calculateYDataRange(data); this.domainAxis = domainAxis; this.domainAxis.setPlot((Plot) this); this.domainAxis.addChangeListener((AxisChangeListener) this); this.rangeAxis = rangeAxis; this.rangeAxis.setPlot((Plot) this); this.rangeAxis.addChangeListener((AxisChangeListener) this); this.paint = (Paint) Color.red; this.domainGridlinesVisible = true; this.domainGridlinePaint = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.domainGridlineStroke = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; this.rangeGridlinesVisible = true; this.rangeGridlinePaint = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT; this.rangeGridlineStroke = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE; } }
public override void drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) { if (!(dataset is IntervalXYDataset) || !(dataset is TableXYDataset)) { string str1 = new StringBuffer().append("dataset (type ").append(Object.instancehelper_getClass((object) dataset).getName()).append(") has wrong type:").toString(); int num = 0; if (!(StackedXYBarRenderer.class\u0024org\u0024jfree\u0024data\u0024xy\u0024IntervalXYDataset != null ? StackedXYBarRenderer.class\u0024org\u0024jfree\u0024data\u0024xy\u0024IntervalXYDataset : (StackedXYBarRenderer.class\u0024org\u0024jfree\u0024data\u0024xy\u0024IntervalXYDataset = StackedXYBarRenderer.class\u0024("org.jfree.data.xy.IntervalXYDataset"))).isAssignableFrom(Object.instancehelper_getClass((object) dataset))) { str1 = new StringBuffer().append(str1).append(" it is no IntervalXYDataset").toString(); num = 1; } if (!(StackedXYBarRenderer.class\u0024org\u0024jfree\u0024data\u0024xy\u0024TableXYDataset != null ? StackedXYBarRenderer.class\u0024org\u0024jfree\u0024data\u0024xy\u0024TableXYDataset : (StackedXYBarRenderer.class\u0024org\u0024jfree\u0024data\u0024xy\u0024TableXYDataset = StackedXYBarRenderer.class\u0024("org.jfree.data.xy.TableXYDataset"))).isAssignableFrom(Object.instancehelper_getClass((object) dataset))) { if (num != 0) str1 = new StringBuffer().append(str1).append(" and").toString(); str1 = new StringBuffer().append(str1).append(" it is no TableXYDataset").toString(); } string str2 = str1; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str2); } else { IntervalXYDataset ntervalXyDataset = (IntervalXYDataset) dataset; double yvalue1 = ntervalXyDataset.getYValue(series, item); if (Double.isNaN(yvalue1)) return; double num1 = 0.0; if (this.renderAsPercentages) { num1 = DatasetUtilities.calculateStackTotal((TableXYDataset) dataset, item); yvalue1 /= num1; } double d1 = 0.0; double d2 = 0.0; for (int i1 = 0; i1 < series; ++i1) { double yvalue2 = dataset.getYValue(i1, item); if (!Double.isNaN(yvalue2)) { if (this.renderAsPercentages) yvalue2 /= num1; if (yvalue2 > 0.0) d1 += yvalue2; else d2 += yvalue2; } } RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); double num2; double num3; if (yvalue1 > 0.0) { num2 = rangeAxis.valueToJava2D(d1, dataArea, rangeAxisEdge); num3 = rangeAxis.valueToJava2D(d1 + yvalue1, dataArea, rangeAxisEdge); } else { num2 = rangeAxis.valueToJava2D(d2, dataArea, rangeAxisEdge); num3 = rangeAxis.valueToJava2D(d2 + yvalue1, dataArea, rangeAxisEdge); } RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); double startXvalue = ntervalXyDataset.getStartXValue(series, item); if (Double.isNaN(startXvalue)) return; double num4 = domainAxis.valueToJava2D(startXvalue, dataArea, domainAxisEdge); double endXvalue = ntervalXyDataset.getEndXValue(series, item); if (Double.isNaN(endXvalue)) return; double num5 = domainAxis.valueToJava2D(endXvalue, dataArea, domainAxisEdge); double num6 = Math.max(1.0, Math.abs(num5 - num4)); double num7 = Math.abs(num3 - num2); if (this.getMargin() > 0.0) { double num8 = num6 * this.getMargin(); num6 -= num8; num4 += num8 / 2.0; } Rectangle2D.Double @double = (Rectangle2D.Double) null; PlotOrientation orientation = plot.getOrientation(); if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL) @double = new Rectangle2D.Double(Math.min(num2, num3), num5, num7, num6); else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) @double = new Rectangle2D.Double(num4, Math.min(num2, num3), num6, num7); int num9 = yvalue1 > 0.0 ? 1 : 0; int num10 = rangeAxis.isInverted() ? 1 : 0; RectangleEdge re = orientation != PlotOrientation.__\u003C\u003EHORIZONTAL ? (num9 != 0 && num10 == 0 || num9 == 0 && num10 != 0 ? RectangleEdge.__\u003C\u003EBOTTOM : RectangleEdge.__\u003C\u003ETOP) : (num9 != 0 && num10 != 0 || num9 == 0 && num10 == 0 ? RectangleEdge.__\u003C\u003ERIGHT : RectangleEdge.__\u003C\u003ELEFT); if (pass == 0) { if (!this.getShadowsVisible()) return; this.getBarPainter().paintBarShadow(g2, (XYBarRenderer) this, series, item, (RectangularShape) @double, re, false); } else if (pass == 1) { this.getBarPainter().paintBar(g2, (XYBarRenderer) this, series, item, (RectangularShape) @double, re); if (info == null) return; EntityCollection entityCollection = info.getOwner().getEntityCollection(); if (entityCollection == null) return; this.addEntity(entityCollection, (Shape) @double, dataset, series, item, ((RectangularShape) @double).getCenterX(), ((RectangularShape) @double).getCenterY()); } else { if (pass != 2 || !this.isItemLabelVisible(series, item)) return; XYItemLabelGenerator itemLabelGenerator = this.getItemLabelGenerator(series, item); this.drawItemLabel(g2, dataset, series, item, plot, itemLabelGenerator, (Rectangle2D) @double, yvalue1 < 0.0); } } }
public override void drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) { if (!this.getItemVisible(series, item)) return; if (pass == 0) { IntervalXYDataset ntervalXyDataset = (IntervalXYDataset) dataset; DeviationRenderer.State state1 = (DeviationRenderer.State) state; double xvalue = ntervalXyDataset.getXValue(series, item); double startYvalue = ntervalXyDataset.getStartYValue(series, item); double endYvalue = ntervalXyDataset.getEndYValue(series, item); RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); double num1 = domainAxis.valueToJava2D(xvalue, dataArea, domainAxisEdge); double num2 = rangeAxis.valueToJava2D(startYvalue, dataArea, rangeAxisEdge); double num3 = rangeAxis.valueToJava2D(endYvalue, dataArea, rangeAxisEdge); PlotOrientation orientation = plot.getOrientation(); if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL) { List list1 = state1.lowerCoordinates; double[] numArray1 = new double[2]; int index1 = 0; double num4 = num2; numArray1[index1] = num4; int index2 = 1; double num5 = num1; numArray1[index2] = num5; list1.add((object) numArray1); List list2 = state1.upperCoordinates; double[] numArray2 = new double[2]; int index3 = 0; double num6 = num3; numArray2[index3] = num6; int index4 = 1; double num7 = num1; numArray2[index4] = num7; list2.add((object) numArray2); } else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { List list1 = state1.lowerCoordinates; double[] numArray1 = new double[2]; int index1 = 0; double num4 = num1; numArray1[index1] = num4; int index2 = 1; double num5 = num2; numArray1[index2] = num5; list1.add((object) numArray1); List list2 = state1.upperCoordinates; double[] numArray2 = new double[2]; int index3 = 0; double num6 = num1; numArray2[index3] = num6; int index4 = 1; double num7 = num3; numArray2[index4] = num7; list2.add((object) numArray2); } if (item == dataset.getItemCount(series) - 1) { Composite composite = g2.getComposite(); g2.setComposite((Composite) AlphaComposite.getInstance(3, this.alpha)); g2.setPaint(this.getItemFillPaint(series, item)); GeneralPath generalPath = new GeneralPath(); double[] numArray1 = (double[]) state1.lowerCoordinates.get(0); ((Path2D.Float) generalPath).moveTo((float) numArray1[0], (float) numArray1[1]); for (int index = 1; index < state1.lowerCoordinates.size(); ++index) { double[] numArray2 = (double[]) state1.lowerCoordinates.get(index); ((Path2D.Float) generalPath).lineTo((float) numArray2[0], (float) numArray2[1]); } int num4 = state1.upperCoordinates.size(); double[] numArray3 = (double[]) state1.upperCoordinates.get(num4 - 1); ((Path2D.Float) generalPath).lineTo((float) numArray3[0], (float) numArray3[1]); int num5 = num4 - 2; while (num5 >= 0) { double[] numArray2 = (double[]) state1.upperCoordinates.get(num5); ((Path2D.Float) generalPath).lineTo((float) numArray2[0], (float) numArray2[1]); num5 += -1; } ((Path2D) generalPath).closePath(); g2.fill((Shape) generalPath); g2.setComposite(composite); state1.lowerCoordinates.clear(); state1.upperCoordinates.clear(); } } if (this.isLinePass(pass)) { if (item == 0) { DeviationRenderer.State state1 = (DeviationRenderer.State) state; ((Path2D) state1.seriesPath).reset(); state1.setLastPointGood(false); } if (!this.getItemLineVisible(series, item)) return; this.drawPrimaryLineAsPath(state, g2, plot, dataset, pass, series, item, domainAxis, rangeAxis, dataArea); } else { if (!this.isItemPass(pass)) return; EntityCollection entities = (EntityCollection) null; if (info != null) entities = info.getOwner().getEntityCollection(); this.drawSecondaryPass(g2, plot, dataset, pass, series, item, domainAxis, dataArea, rangeAxis, crosshairState, entities); } }
public override void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) { Number number1 = dataset.getValue(row, column); if (number1 == null) return; double categoryMiddle1 = domainAxis.getCategoryMiddle(column, this.getColumnCount(), dataArea, plot.getDomainAxisEdge()); double num1 = rangeAxis.valueToJava2D(number1.doubleValue(), dataArea, plot.getRangeAxisEdge()); g2.setPaint(this.getItemPaint(row, column)); g2.setStroke(this.getItemStroke(row, column)); Rectangle2D.Double double1 = new Rectangle2D.Double(categoryMiddle1 - 4.0, num1 - 4.0, 8.0, 8.0); PlotOrientation orientation = plot.getOrientation(); if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) this.objectIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num1)); else this.objectIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num1), ByteCodeHelper.d2i(categoryMiddle1)); if (this.lastCategory == column) { if (this.min > number1.doubleValue()) this.min = number1.doubleValue(); if (this.max < number1.doubleValue()) this.max = number1.doubleValue(); if (dataset.getRowCount() - 1 == row) { g2.setPaint(this.groupPaint); g2.setStroke(this.groupStroke); double num2 = rangeAxis.valueToJava2D(this.min, dataArea, plot.getRangeAxisEdge()); double num3 = rangeAxis.valueToJava2D(this.max, dataArea, plot.getRangeAxisEdge()); if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { g2.draw((Shape) new Line2D.Double(categoryMiddle1, num2, categoryMiddle1, num3)); this.minIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num2)); this.maxIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num3)); } else { g2.draw((Shape) new Line2D.Double(num2, categoryMiddle1, num3, categoryMiddle1)); this.minIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num2), ByteCodeHelper.d2i(categoryMiddle1)); this.maxIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num3), ByteCodeHelper.d2i(categoryMiddle1)); } } } else { this.lastCategory = column; this.min = number1.doubleValue(); this.max = number1.doubleValue(); } if (this.plotLines && column != 0) { Number number2 = dataset.getValue(row, column - 1); if (number2 != null) { double d = number2.doubleValue(); double categoryMiddle2 = domainAxis.getCategoryMiddle(column - 1, this.getColumnCount(), dataArea, plot.getDomainAxisEdge()); double num2 = rangeAxis.valueToJava2D(d, dataArea, plot.getRangeAxisEdge()); g2.setPaint(this.getItemPaint(row, column)); g2.setStroke(this.getItemStroke(row, column)); Line2D.Double double2 = orientation != PlotOrientation.__\u003C\u003EVERTICAL ? new Line2D.Double(num2, categoryMiddle2, num1, categoryMiddle1) : new Line2D.Double(categoryMiddle2, num2, categoryMiddle1, num1); g2.draw((Shape) double2); } } EntityCollection entityCollection = state.getEntityCollection(); if (entityCollection == null || double1 == null) return; this.addItemEntity(entityCollection, dataset, row, column, (Shape) double1); }
public override void drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) { if (pass == 0 && dataset is IntervalXYDataset && this.getItemVisible(series, item)) { IntervalXYDataset ntervalXyDataset = (IntervalXYDataset) dataset; PlotOrientation orientation = plot.getOrientation(); if (this.drawXError) { double startXvalue = ntervalXyDataset.getStartXValue(series, item); double endXvalue = ntervalXyDataset.getEndXValue(series, item); double yvalue = ntervalXyDataset.getYValue(series, item); RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); double num1 = domainAxis.valueToJava2D(startXvalue, dataArea, domainAxisEdge); double num2 = domainAxis.valueToJava2D(endXvalue, dataArea, domainAxisEdge); double num3 = rangeAxis.valueToJava2D(yvalue, dataArea, plot.getRangeAxisEdge()); double num4 = this.capLength / 2.0; Line2D.Double double1; Line2D.Double double2; Line2D.Double double3; if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { double1 = new Line2D.Double(num1, num3, num2, num3); double2 = new Line2D.Double(num1, num3 - num4, num1, num3 + num4); double3 = new Line2D.Double(num2, num3 - num4, num2, num3 + num4); } else { double1 = new Line2D.Double(num3, num1, num3, num2); double2 = new Line2D.Double(num3 - num4, num1, num3 + num4, num1); double3 = new Line2D.Double(num3 - num4, num2, num3 + num4, num2); } if (this.errorPaint != null) g2.setPaint(this.errorPaint); else g2.setPaint(this.getItemPaint(series, item)); if (this.errorStroke != null) g2.setStroke(this.errorStroke); else g2.setStroke(this.getItemStroke(series, item)); g2.draw((Shape) double1); g2.draw((Shape) double2); g2.draw((Shape) double3); } if (this.drawYError) { double startYvalue = ntervalXyDataset.getStartYValue(series, item); double endYvalue = ntervalXyDataset.getEndYValue(series, item); double xvalue = ntervalXyDataset.getXValue(series, item); RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); double num1 = rangeAxis.valueToJava2D(startYvalue, dataArea, rangeAxisEdge); double num2 = rangeAxis.valueToJava2D(endYvalue, dataArea, rangeAxisEdge); double num3 = domainAxis.valueToJava2D(xvalue, dataArea, plot.getDomainAxisEdge()); double num4 = this.capLength / 2.0; Line2D.Double double1; Line2D.Double double2; Line2D.Double double3; if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { double1 = new Line2D.Double(num3, num1, num3, num2); double2 = new Line2D.Double(num3 - num4, num1, num3 + num4, num1); double3 = new Line2D.Double(num3 - num4, num2, num3 + num4, num2); } else { double1 = new Line2D.Double(num1, num3, num2, num3); double2 = new Line2D.Double(num1, num3 - num4, num1, num3 + num4); double3 = new Line2D.Double(num2, num3 - num4, num2, num3 + num4); } if (this.errorPaint != null) g2.setPaint(this.errorPaint); else g2.setPaint(this.getItemPaint(series, item)); if (this.errorStroke != null) g2.setStroke(this.errorStroke); else g2.setStroke(this.getItemStroke(series, item)); g2.draw((Shape) double1); g2.draw((Shape) double2); g2.draw((Shape) double3); } } base.drawItem(g2, state, dataArea, info, plot, domainAxis, rangeAxis, dataset, series, item, crosshairState, pass); }