Examples of Crosshair


Examples of org.jfree.chart.plot.Crosshair

        if (this.xCrosshairs.isEmpty()) {
            return// nothing to do
        }
        List<Crosshair> crosshairs = getDomainCrosshairs();
        for (Crosshair crosshair : crosshairs) {
            Crosshair c = crosshair;
            this.xCrosshairs.remove(c);
            c.removePropertyChangeListener(this);
        }
        fireOverlayChanged();
    }
View Full Code Here

Examples of org.jfree.chart.plot.Crosshair

        if (this.yCrosshairs.isEmpty()) {
            return// nothing to do
        }
        List<Crosshair> crosshairs = getRangeCrosshairs();
        for (Crosshair crosshair : crosshairs) {
            Crosshair c = crosshair;
            this.yCrosshairs.remove(c);
            c.removePropertyChangeListener(this);
        }
        fireOverlayChanged();
    }
View Full Code Here

Examples of org.jfree.chart.plot.Crosshair

     * Serialize an instance, restore it, and check for equality.
     */
    @Test
    public void testSerialization() throws IOException, ClassNotFoundException {
        CrosshairOverlay o1 = new CrosshairOverlay();
        o1.addDomainCrosshair(new Crosshair(99.9));
        o1.addRangeCrosshair(new Crosshair(1.23, new GradientPaint(1.0f, 2.0f,
                Color.RED, 3.0f, 4.0f, Color.BLUE), new BasicStroke(1.1f)));

            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(o1);
View Full Code Here

Examples of org.jfree.chart.plot.Crosshair

     * Basic checks for cloning.
     */
    @Test
    public void testCloning() throws CloneNotSupportedException {
        CrosshairOverlay o1 = new CrosshairOverlay();
        o1.addDomainCrosshair(new Crosshair(99.9));
        o1.addRangeCrosshair(new Crosshair(1.23, new GradientPaint(1.0f, 2.0f,
                Color.RED, 3.0f, 4.0f, Color.BLUE), new BasicStroke(1.1f)));
        CrosshairOverlay o2 = (CrosshairOverlay) o1.clone();
        assertNotSame(o1, o2);
        assertSame(o1.getClass(), o2.getClass());
        assertEquals(o1, o2);

        o1.addDomainCrosshair(new Crosshair(3.21));
        o1.addRangeCrosshair(new Crosshair(4.32));
        assertFalse(o1.equals(o2));
    }
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.