X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fg2d%2FIdentityAffineTransform.java;fp=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fg2d%2FIdentityAffineTransform.java;h=56149f531b9a96a4d0b03901f08ca4943d73230e;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=2eb989b902212865db2643b7596808f3c96f3533;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IdentityAffineTransform.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IdentityAffineTransform.java index 2eb989b90..56149f531 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IdentityAffineTransform.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/IdentityAffineTransform.java @@ -1,164 +1,164 @@ -/******************************************************************************* - * Copyright (c) 2012 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.scenegraph.g2d; - -import java.awt.geom.AffineTransform; -import java.awt.geom.NoninvertibleTransformException; - -/** - * An optimization for memory consumption to keep down the allocation of - * unnecessary identity-type affine transforms. This will be used as the default - * affine transform in {@link G2DNode} and {@link G2DParentNode}. - * - * @author Tuukka Lehtonen - */ -public class IdentityAffineTransform extends AffineTransform { - - public static final IdentityAffineTransform INSTANCE = new IdentityAffineTransform(); - - private static final long serialVersionUID = 7843049586639496587L; - - private IdentityAffineTransform() { - // No self-construction. - } - - @Override - public boolean isIdentity() { - return true; - } - - @Override - public void translate(double tx, double ty) { - throw new UnsupportedOperationException(); - } - - @Override - public void rotate(double theta) { - throw new UnsupportedOperationException(); - } - - @Override - public void rotate(double theta, double anchorx, double anchory) { - throw new UnsupportedOperationException(); - } - - @Override - public void rotate(double vecx, double vecy) { - throw new UnsupportedOperationException(); - } - - @Override - public void rotate(double vecx, double vecy, double anchorx, double anchory) { - throw new UnsupportedOperationException(); - } - - @Override - public void quadrantRotate(int numquadrants) { - throw new UnsupportedOperationException(); - } - - @Override - public void quadrantRotate(int numquadrants, double anchorx, double anchory) { - throw new UnsupportedOperationException(); - } - - @Override - public void scale(double sx, double sy) { - throw new UnsupportedOperationException(); - } - - @Override - public void shear(double shx, double shy) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToIdentity() { - // NOP - } - - @Override - public void setToTranslation(double tx, double ty) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToRotation(double theta) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToRotation(double theta, double anchorx, double anchory) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToRotation(double vecx, double vecy) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToRotation(double vecx, double vecy, double anchorx, double anchory) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToQuadrantRotation(int numquadrants) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToQuadrantRotation(int numquadrants, double anchorx, double anchory) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToScale(double sx, double sy) { - throw new UnsupportedOperationException(); - } - - @Override - public void setToShear(double shx, double shy) { - throw new UnsupportedOperationException(); - } - - @Override - public void setTransform(AffineTransform Tx) { - throw new UnsupportedOperationException(); - } - - @Override - public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12) { - throw new UnsupportedOperationException(); - } - - @Override - public void concatenate(AffineTransform Tx) { - throw new UnsupportedOperationException(); - } - - @Override - public void preConcatenate(AffineTransform Tx) { - throw new UnsupportedOperationException(); - } - - @Override - public void invert() throws NoninvertibleTransformException { - throw new UnsupportedOperationException(); - } - - @Override - public Object clone() { - return new AffineTransform(); - } - +/******************************************************************************* + * Copyright (c) 2012 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.scenegraph.g2d; + +import java.awt.geom.AffineTransform; +import java.awt.geom.NoninvertibleTransformException; + +/** + * An optimization for memory consumption to keep down the allocation of + * unnecessary identity-type affine transforms. This will be used as the default + * affine transform in {@link G2DNode} and {@link G2DParentNode}. + * + * @author Tuukka Lehtonen + */ +public class IdentityAffineTransform extends AffineTransform { + + public static final IdentityAffineTransform INSTANCE = new IdentityAffineTransform(); + + private static final long serialVersionUID = 7843049586639496587L; + + private IdentityAffineTransform() { + // No self-construction. + } + + @Override + public boolean isIdentity() { + return true; + } + + @Override + public void translate(double tx, double ty) { + throw new UnsupportedOperationException(); + } + + @Override + public void rotate(double theta) { + throw new UnsupportedOperationException(); + } + + @Override + public void rotate(double theta, double anchorx, double anchory) { + throw new UnsupportedOperationException(); + } + + @Override + public void rotate(double vecx, double vecy) { + throw new UnsupportedOperationException(); + } + + @Override + public void rotate(double vecx, double vecy, double anchorx, double anchory) { + throw new UnsupportedOperationException(); + } + + @Override + public void quadrantRotate(int numquadrants) { + throw new UnsupportedOperationException(); + } + + @Override + public void quadrantRotate(int numquadrants, double anchorx, double anchory) { + throw new UnsupportedOperationException(); + } + + @Override + public void scale(double sx, double sy) { + throw new UnsupportedOperationException(); + } + + @Override + public void shear(double shx, double shy) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToIdentity() { + // NOP + } + + @Override + public void setToTranslation(double tx, double ty) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToRotation(double theta) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToRotation(double theta, double anchorx, double anchory) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToRotation(double vecx, double vecy) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToRotation(double vecx, double vecy, double anchorx, double anchory) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToQuadrantRotation(int numquadrants) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToQuadrantRotation(int numquadrants, double anchorx, double anchory) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToScale(double sx, double sy) { + throw new UnsupportedOperationException(); + } + + @Override + public void setToShear(double shx, double shy) { + throw new UnsupportedOperationException(); + } + + @Override + public void setTransform(AffineTransform Tx) { + throw new UnsupportedOperationException(); + } + + @Override + public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12) { + throw new UnsupportedOperationException(); + } + + @Override + public void concatenate(AffineTransform Tx) { + throw new UnsupportedOperationException(); + } + + @Override + public void preConcatenate(AffineTransform Tx) { + throw new UnsupportedOperationException(); + } + + @Override + public void invert() throws NoninvertibleTransformException { + throw new UnsupportedOperationException(); + } + + @Override + public Object clone() { + return new AffineTransform(); + } + } \ No newline at end of file