Package org.jfree.ui

Examples of org.jfree.ui.Spacer


        assertFalse(plot1.equals(plot2));
        plot2.setOrientation(PlotOrientation.HORIZONTAL);
        assertTrue(plot1.equals(plot2));
       
        // axisOffset...
        plot1.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05));
        assertFalse(plot1.equals(plot2));
        plot2.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05));
        assertTrue(plot1.equals(plot2));

        // domainAxis - no longer a separate field but test anyway...
        plot1.setDomainAxis(new CategoryAxis("Category Axis"));
        assertFalse(plot1.equals(plot2));
View Full Code Here


        t1.setVerticalAlignment(VerticalAlignment.BOTTOM);
        assertFalse(t1.equals(t2));
        t2.setVerticalAlignment(VerticalAlignment.BOTTOM);
        assertTrue(t1.equals(t2));
       
        t1.setSpacer(new Spacer(Spacer.ABSOLUTE, 5.0, 10.0, 15.0, 20.0));
        assertFalse(t1.equals(t2));
        t2.setSpacer(new Spacer(Spacer.ABSOLUTE, 5.0, 10.0, 15.0, 20.0));
        assertTrue(t1.equals(t2));
       
    }
View Full Code Here

    /**
     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {
       
        Spacer s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        Spacer s2 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        assertTrue(s1.equals(s2));
       
        s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        s2 = new Spacer(Spacer.RELATIVE, 0.05, 0.05, 0.05, 0.05);
        assertFalse(s1.equals(s2));

        s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        s2 = new Spacer(Spacer.ABSOLUTE, 0.06, 0.05, 0.05, 0.05);
        assertFalse(s1.equals(s2));

        s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        s2 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.06, 0.05, 0.05);
        assertFalse(s1.equals(s2));

        s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        s2 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.06, 0.05);
        assertFalse(s1.equals(s2));

        s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        s2 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.06);
        assertFalse(s1.equals(s2));
       
    }
View Full Code Here

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        final Spacer s1 = new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05);
        Spacer s2 = null;

        try {
            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            final ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(s1);
View Full Code Here

        assertFalse(b1.equals(b2));
        b2.setOutlineStroke(new BasicStroke(1.1f));
        assertTrue(b1.equals(b2));

        // interiorGap
        b1.setInteriorGap(new Spacer(Spacer.ABSOLUTE, 10, 10, 10, 10));
        assertFalse(b1.equals(b2));
        b2.setInteriorGap(new Spacer(Spacer.ABSOLUTE, 10, 10, 10, 10));
        assertTrue(b1.equals(b2));
       
        // backgroundPaint
        b1.setBackgroundPaint(Color.blue);
        assertFalse(b1.equals(b2));
View Full Code Here

     * @param block  the text block.
     */
    public TextBox(final TextBlock block) {
        this.outlinePaint = Color.black;
        this.outlineStroke = new BasicStroke(1.0f);
        this.interiorGap = new Spacer(Spacer.ABSOLUTE, 3.0, 1.0, 3.0, 1.0);
        this.backgroundPaint = new Color(255, 255, 192);
        this.shadowPaint = Color.gray;
        this.shadowXOffset = 2.0;
        this.shadowYOffset = 2.0;
        this.textBlock = block;     
View Full Code Here

TOP

Related Classes of org.jfree.ui.Spacer

Copyright © 2018 www.massapicom. 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.