1 /*******************************************************************************
\r
2 * Copyright (c) 2012 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.scenegraph.g2d;
\r
14 import java.awt.geom.AffineTransform;
\r
15 import java.awt.geom.NoninvertibleTransformException;
\r
18 * An optimization for memory consumption to keep down the allocation of
\r
19 * unnecessary identity-type affine transforms. This will be used as the default
\r
20 * affine transform in {@link G2DNode} and {@link G2DParentNode}.
\r
22 * @author Tuukka Lehtonen
\r
24 public class IdentityAffineTransform extends AffineTransform {
\r
26 public static final IdentityAffineTransform INSTANCE = new IdentityAffineTransform();
\r
28 private static final long serialVersionUID = 7843049586639496587L;
\r
30 private IdentityAffineTransform() {
\r
31 // No self-construction.
\r
35 public boolean isIdentity() {
\r
40 public void translate(double tx, double ty) {
\r
41 throw new UnsupportedOperationException();
\r
45 public void rotate(double theta) {
\r
46 throw new UnsupportedOperationException();
\r
50 public void rotate(double theta, double anchorx, double anchory) {
\r
51 throw new UnsupportedOperationException();
\r
55 public void rotate(double vecx, double vecy) {
\r
56 throw new UnsupportedOperationException();
\r
60 public void rotate(double vecx, double vecy, double anchorx, double anchory) {
\r
61 throw new UnsupportedOperationException();
\r
65 public void quadrantRotate(int numquadrants) {
\r
66 throw new UnsupportedOperationException();
\r
70 public void quadrantRotate(int numquadrants, double anchorx, double anchory) {
\r
71 throw new UnsupportedOperationException();
\r
75 public void scale(double sx, double sy) {
\r
76 throw new UnsupportedOperationException();
\r
80 public void shear(double shx, double shy) {
\r
81 throw new UnsupportedOperationException();
\r
85 public void setToIdentity() {
\r
90 public void setToTranslation(double tx, double ty) {
\r
91 throw new UnsupportedOperationException();
\r
95 public void setToRotation(double theta) {
\r
96 throw new UnsupportedOperationException();
\r
100 public void setToRotation(double theta, double anchorx, double anchory) {
\r
101 throw new UnsupportedOperationException();
\r
105 public void setToRotation(double vecx, double vecy) {
\r
106 throw new UnsupportedOperationException();
\r
110 public void setToRotation(double vecx, double vecy, double anchorx, double anchory) {
\r
111 throw new UnsupportedOperationException();
\r
115 public void setToQuadrantRotation(int numquadrants) {
\r
116 throw new UnsupportedOperationException();
\r
120 public void setToQuadrantRotation(int numquadrants, double anchorx, double anchory) {
\r
121 throw new UnsupportedOperationException();
\r
125 public void setToScale(double sx, double sy) {
\r
126 throw new UnsupportedOperationException();
\r
130 public void setToShear(double shx, double shy) {
\r
131 throw new UnsupportedOperationException();
\r
135 public void setTransform(AffineTransform Tx) {
\r
136 throw new UnsupportedOperationException();
\r
140 public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12) {
\r
141 throw new UnsupportedOperationException();
\r
145 public void concatenate(AffineTransform Tx) {
\r
146 throw new UnsupportedOperationException();
\r
150 public void preConcatenate(AffineTransform Tx) {
\r
151 throw new UnsupportedOperationException();
\r
155 public void invert() throws NoninvertibleTransformException {
\r
156 throw new UnsupportedOperationException();
\r
160 public Object clone() {
\r
161 return new AffineTransform();
\r