Java Code Examples for java.awt.font.TransformAttribute.equals()

The following are Jave code examples for showing how to use equals() of the java.awt.font.TransformAttribute class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: jdk8u-jdk   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 2
Project: openjdk-jdk10   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 3
Project: openjdk9   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 4
Project: jdk8u_jdk   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 5
Project: lookaside_java-1.8.0-openjdk   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 6
Project: infobip-open-jdk-8   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 7
Project: jdk8u-dev-jdk   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}
 
Example 8
Project: OLD-OpenJDK8   File: TransformEqualityTest.java   View Source Code Vote up 6 votes
public static void main(String[] args) {
    AffineTransform tx1 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx2 = new AffineTransform(1, 0, 1, 1, 0, 0);
    AffineTransform tx3 = new AffineTransform(2, 0, 1, 1, 0, 0);
    TransformAttribute ta1a = new TransformAttribute(tx1);
    TransformAttribute ta1b = new TransformAttribute(tx1);
    TransformAttribute ta2 = new TransformAttribute(tx2);
    TransformAttribute ta3 = new TransformAttribute(tx3);
    if (ta1a.equals(null)) {
        throw new RuntimeException("should not be equal to null.");
    }
    if (!ta1a.equals(ta1a)) {
        throw new RuntimeException("(1) should be equal.");
    }
    if (!ta1a.equals(ta1b)) {
        throw new RuntimeException("(2) should be equal.");
    }
    if (!ta1a.equals(ta2)) {
        throw new RuntimeException("(3) should be equal.");
    }
    if (ta2.equals(ta3)) {
        throw new RuntimeException("should be different.");
    }
}