Package org.jfree.chart.plot

Examples of org.jfree.chart.plot.XYPlot.addRangeMarker()


        assertTrue(plot1.equals(plot2));

        // secondary range markers
        plot1.addRangeMarker(1, new ValueMarker(4.0), Layer.FOREGROUND);
        assertFalse(plot1.equals(plot2));
        plot2.addRangeMarker(1, new ValueMarker(4.0), Layer.FOREGROUND);
        assertTrue(plot1.equals(plot2));

        plot1.addRangeMarker(1, new ValueMarker(99.0), Layer.BACKGROUND);
        assertFalse(plot1.equals(plot2));
        plot2.addRangeMarker(1, new ValueMarker(99.0), Layer.BACKGROUND);
View Full Code Here


        plot2.addRangeMarker(1, new ValueMarker(4.0), Layer.FOREGROUND);
        assertTrue(plot1.equals(plot2));

        plot1.addRangeMarker(1, new ValueMarker(99.0), Layer.BACKGROUND);
        assertFalse(plot1.equals(plot2));
        plot2.addRangeMarker(1, new ValueMarker(99.0), Layer.BACKGROUND);
        assertTrue(plot1.equals(plot2));

        // fixed legend items
        plot1.setFixedLegendItems(new LegendItemCollection());
        assertFalse(plot1.equals(plot2));
View Full Code Here

            false
        );
        XYPlot plot = (XYPlot) chart.getPlot();
        plot.addDomainMarker(new ValueMarker(1.0), Layer.FOREGROUND);
        plot.addDomainMarker(new IntervalMarker(2.0, 3.0), Layer.BACKGROUND);
        plot.addRangeMarker(new ValueMarker(4.0), Layer.FOREGROUND);
        plot.addRangeMarker(new IntervalMarker(5.0, 6.0), Layer.BACKGROUND);
        JFreeChart chart2 = null;

        // serialize and deserialize the chart....
        try {
View Full Code Here

        );
        XYPlot plot = (XYPlot) chart.getPlot();
        plot.addDomainMarker(new ValueMarker(1.0), Layer.FOREGROUND);
        plot.addDomainMarker(new IntervalMarker(2.0, 3.0), Layer.BACKGROUND);
        plot.addRangeMarker(new ValueMarker(4.0), Layer.FOREGROUND);
        plot.addRangeMarker(new IntervalMarker(5.0, 6.0), Layer.BACKGROUND);
        JFreeChart chart2 = null;

        // serialize and deserialize the chart....
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
View Full Code Here

     * Some tests for the addRangeMarker() method(s).
     */
    public void testAddRangeMarker() {
        XYPlot plot = new XYPlot();
        Marker m = new ValueMarker(1.0);
        plot.addRangeMarker(m);
        List listeners = Arrays.asList(m.getListeners(
                MarkerChangeListener.class));
        assertTrue(listeners.contains(plot));
        plot.clearRangeMarkers();
        listeners = Arrays.asList(m.getListeners(MarkerChangeListener.class));
View Full Code Here

        TextTitle textTitle = _chart.getTitle();
        textTitle.setFont(textTitle.getFont().deriveFont(12.0F));

        // mark the elevation threshold
        XYPlot xyPlot = _chart.getXYPlot();
        xyPlot.addRangeMarker(new ValueMarker(ElevationPlotModel.getObsThreshold()));
        ChartPanel chartPanel = new ChartPanel(_chart, false, false, false, false, false);

        // disable scaling
        chartPanel.setMaximumDrawWidth(100000);
        chartPanel.setMaximumDrawHeight(100000);
View Full Code Here

          intMarkerX.setLabelOffsetType(LengthAdjustmentType.EXPAND);
          intMarkerX.setPaint(new Color(Integer.decode((xMarkerIntColor.equals(""))?"0":xMarkerIntColor).intValue()));
        //intMarkerX.setLabel(xMarkerLabel);
        intMarkerX.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
        intMarkerX.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
          plot.addRangeMarker(intMarkerX, Layer.BACKGROUND);
        }
     // add a labelled marker for the Y axis...
        if (yMarkerValue != null && !yMarkerValue.equals("")){         
          Marker markerY = new ValueMarker(Double.parseDouble(yMarkerValue));
          markerY.setLabelOffsetType(LengthAdjustmentType.EXPAND);
View Full Code Here

          markerX.setLabelOffsetType(LengthAdjustmentType.EXPAND);
          if (!xMarkerColor.equals("")) markerX.setPaint(new Color(Integer.decode(xMarkerColor).intValue()));
          markerX.setLabel(xMarkerLabel);
          markerX.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
          markerX.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
          plot.addRangeMarker(markerX, Layer.BACKGROUND);
        }
       
        if (xRangeLow != null && !xRangeLow.equals("") && xRangeHigh != null && !xRangeHigh.equals("")){
          if (Double.valueOf(xRangeLow).doubleValue() > xMin) xRangeLow = String.valueOf(xMin);
            if (Double.valueOf(xRangeHigh).doubleValue() < xMax) xRangeHigh = String.valueOf(xMax);
View Full Code Here

     * Some tests for the addRangeMarker() method(s).
     */
    public void testAddRangeMarker() {
        XYPlot plot = new XYPlot();
        Marker m = new ValueMarker(1.0);
        plot.addRangeMarker(m);
        List listeners = Arrays.asList(m.getListeners(
                MarkerChangeListener.class));
        assertTrue(listeners.contains(plot));
        plot.clearRangeMarkers();
        listeners = Arrays.asList(m.getListeners(MarkerChangeListener.class));
View Full Code Here

        assertTrue(plot1.equals(plot2));

        // range markers
        plot1.addRangeMarker(new ValueMarker(4.0));
        assertFalse(plot1.equals(plot2));
        plot2.addRangeMarker(new ValueMarker(4.0));
        assertTrue(plot1.equals(plot2));

        // secondary range markers
        plot1.addRangeMarker(1, new ValueMarker(4.0), Layer.FOREGROUND);
        assertFalse(plot1.equals(plot2));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.