Examples of addRangeMarker()


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

    public void testListenersWithXYPlot() {
        XYPlot plot = new XYPlot();
        ValueMarker marker1 = new ValueMarker(1.0);
        ValueMarker marker2 = new ValueMarker(2.0);
        plot.addDomainMarker(marker1);
        plot.addRangeMarker(marker2);
        EventListener[] listeners1 = marker1.getListeners(
                MarkerChangeListener.class);
        assertTrue(Arrays.asList(listeners1).contains(plot));
        EventListener[] listeners2 = marker1.getListeners(
                MarkerChangeListener.class);
View Full Code Here

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

    public void testListenersWithXYPlot() {
        XYPlot plot = new XYPlot();
        ValueMarker marker1 = new ValueMarker(1.0);
        ValueMarker marker2 = new ValueMarker(2.0);
        plot.addDomainMarker(marker1);
        plot.addRangeMarker(marker2);
        EventListener[] listeners1 = marker1.getListeners(
                MarkerChangeListener.class);
        assertTrue(Arrays.asList(listeners1).contains(plot));
        EventListener[] listeners2 = marker1.getListeners(
                MarkerChangeListener.class);
View Full Code Here

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

        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

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

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

        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

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

            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

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

        );
        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

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

     * 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

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

        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

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

          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
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.