View Javadoc

1   /*
2    * Copyright (c) 2005, the JUNG Project and the Regents of the University of
3    * California All rights reserved.
4    *
5    * This software is open-source under the BSD license; see either "license.txt"
6    * or http://jung.sourceforge.net/license.txt for a description.
7    *
8    * Created on Jul 3, 2005
9    */
10  
11  package edu.uci.ics.jung.visualization.transform;
12  
13  import java.awt.geom.AffineTransform;
14  import java.awt.geom.Point2D;
15  
16  import edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer;
17  import edu.uci.ics.jung.visualization.util.ChangeEventSupport;
18  
19  /**
20   * Provides an API for the mutation of a transformer
21   * and for adding listeners for changes on the transformer
22   * 
23   * @author Tom Nelson 
24   *
25   *
26   */
27  public interface MutableTransformer extends ShapeTransformer, ChangeEventSupport {
28      
29      void translate(double dx, double dy);
30      
31      void setTranslate(double dx, double dy);
32      
33      void scale(double sx, double sy, Point2D point);
34      
35      void setScale(double sx, double sy, Point2D point);
36      
37      void rotate(double radians, Point2D point);
38      
39      void rotate(double radians, double x, double y);
40      
41      void shear(double shx, double shy, Point2D from);
42      
43      void concatenate(AffineTransform transform);
44      
45      void preConcatenate(AffineTransform transform);
46      
47      double getScaleX();
48      
49      double getScaleY();
50      
51      double getScale();
52      
53      double getTranslateX();
54      
55      double getTranslateY();
56      
57      double getShearX();
58      
59      double getShearY();
60  
61      AffineTransform getTransform();
62      
63      void setToIdentity();
64      
65      double getRotation();
66      
67  }