Package java.awt.font

Examples of java.awt.font.TransformAttribute


        }

        Hashtable<Attribute, Object> derivefRequestedAttributes = (Hashtable<Attribute, Object>)fRequestedAttributes.clone();

        derivefRequestedAttributes.put(TextAttribute.TRANSFORM,
                new TransformAttribute(trans));

        return new Font(derivefRequestedAttributes);

    }
View Full Code Here


                    TextAttribute.POSTURE_OBLIQUE);
        } else if (derivefRequestedAttributes.get(TextAttribute.POSTURE) != null){
            derivefRequestedAttributes.remove(TextAttribute.POSTURE);
        }
        derivefRequestedAttributes.put(TextAttribute.TRANSFORM,
                new TransformAttribute(trans));

        return new Font(derivefRequestedAttributes);
    }
View Full Code Here

        }

        Hashtable<Attribute, Object> derivefRequestedAttributes = (Hashtable<Attribute, Object>)fRequestedAttributes.clone();

        derivefRequestedAttributes.put(TextAttribute.TRANSFORM,
                new TransformAttribute(trans));

        return new Font(derivefRequestedAttributes);

    }
View Full Code Here

                    TextAttribute.POSTURE_OBLIQUE);
        } else if (derivefRequestedAttributes.get(TextAttribute.POSTURE) != null){
            derivefRequestedAttributes.remove(TextAttribute.POSTURE);
        }
        derivefRequestedAttributes.put(TextAttribute.TRANSFORM,
                new TransformAttribute(trans));

        return new Font(derivefRequestedAttributes);
    }
View Full Code Here

        }

        Hashtable<Attribute, Object> derivefRequestedAttributes = (Hashtable<Attribute, Object>)fRequestedAttributes.clone();

        derivefRequestedAttributes.put(TextAttribute.TRANSFORM,
                new TransformAttribute(trans));

        return new Font(derivefRequestedAttributes);

    }
View Full Code Here

                    TextAttribute.POSTURE_OBLIQUE);
        } else if (derivefRequestedAttributes.get(TextAttribute.POSTURE) != null){
            derivefRequestedAttributes.remove(TextAttribute.POSTURE);
        }
        derivefRequestedAttributes.put(TextAttribute.TRANSFORM,
                new TransformAttribute(trans));

        return new Font(derivefRequestedAttributes);
    }
View Full Code Here

        case EWIDTH: width = ((Number)o).floatValue(); break;
        case EPOSTURE: posture = ((Number)o).floatValue(); break;
        case ESIZE: size = ((Number)o).floatValue(); break;
        case ETRANSFORM: {
            if (o instanceof TransformAttribute) {
                TransformAttribute ta = (TransformAttribute)o;
                if (ta.isIdentity()) {
                    transform = null;
                } else {
                    transform = ta.getTransform();
                }
            } else {
                transform = new AffineTransform((AffineTransform)o);
            }
            updateDerivedTransforms();
View Full Code Here

        case EPOSTURE: return Float.valueOf(posture);
        case ESIZE: return Float.valueOf(size);
        case ETRANSFORM:
            return transform == null
                ? TransformAttribute.IDENTITY
                : new TransformAttribute(transform);
        case ESUPERSCRIPT: return Integer.valueOf(superscript);
        case EFONT: return font;
        case ECHAR_REPLACEMENT: return charReplacement;
        case EFOREGROUND: return foreground;
        case EBACKGROUND: return background;
View Full Code Here

        // family
        String family = (String)attributes.get(TextAttribute.FAMILY);
        assertEquals(ARIAL_NAME, family);
       
        // transform
        TransformAttribute trans = (TransformAttribute)attributes.get(TextAttribute.TRANSFORM);
        assertNotNull(trans);
        assertTrue(trans.isIdentity());

    }
View Full Code Here

    /*
     * Test method for 'java.awt.font.TransformAttribute.TransformAttribute(AffineTransform)'
     */
    public final void testTransformAttribute() {
        TransformAttribute ta;
        AffineTransform at = AffineTransform.getRotateInstance(1);
        ta = new TransformAttribute(at);
        assertEquals(at, ta.getTransform());

        // check if transform cloned
        at.translate(10, 10);
        assertFalse(at.equals(ta.getTransform()));
       
        try{
            ta = new TransformAttribute(null);
            fail("IllegalArgumentException expected");
        } catch (IllegalArgumentException e) {
            // expected
        }
    }
View Full Code Here

TOP

Related Classes of java.awt.font.TransformAttribute

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.