Class MutableAffineTransformer

    • Constructor Detail

      • MutableAffineTransformer

        public MutableAffineTransformer()
        create an instance that does not transform points
      • MutableAffineTransformer

        public MutableAffineTransformer​(AffineTransform transform)
        Create an instance with the supplied transform
        Parameters:
        transform - the transform to use
    • Method Detail

      • scale

        public void scale​(double scalex,
                          double scaley,
                          Point2D from)
        setter for the scale fires a PropertyChangeEvent with the AffineTransforms representing the previous and new values for scale and offset
        Specified by:
        scale in interface MutableTransformer
        Parameters:
        scalex - the amount to scale in the x direction
        scaley - the amount to scale in the y direction
        from - the point to transform
      • setScale

        public void setScale​(double scalex,
                             double scaley,
                             Point2D from)
        setter for the scale fires a PropertyChangeEvent with the AffineTransforms representing the previous and new values for scale and offset
        Specified by:
        setScale in interface MutableTransformer
        Parameters:
        scalex - the amount to scale in the x direction
        scaley - the amount to scale in the y direction
        from - the point to transform
      • shear

        public void shear​(double shx,
                          double shy,
                          Point2D from)
        shears the transform by passed parameters
        Specified by:
        shear in interface MutableTransformer
        Parameters:
        shx - x value to shear
        shy - y value to shear
        from - the point to transform
      • setTranslate

        public void setTranslate​(double tx,
                                 double ty)
        Replace the Transform's translate x and y values with the passed values, leaving the scale values unchanged.
        Specified by:
        setTranslate in interface MutableTransformer
        Parameters:
        tx - the x value of the translation
        ty - the y value of the translation
      • translate

        public void translate​(double offsetx,
                              double offsety)
        Apply the passed values to the current Transform
        Specified by:
        translate in interface MutableTransformer
        Parameters:
        offsetx - the x-value
        offsety - the y-value
      • rotate

        public void rotate​(double theta,
                           Point2D from)
        preconcatenates the rotation at the supplied point with the current transform
        Specified by:
        rotate in interface MutableTransformer
        Parameters:
        theta - the angle by which to rotate the point
        from - the point to transform
      • rotate

        public void rotate​(double radians,
                           double x,
                           double y)
        rotates the current transform at the supplied points
        Specified by:
        rotate in interface MutableTransformer
        Parameters:
        radians - angle by which to rotate the supplied coordinates
        x - the x coordinate of the point to transform
        y - the y coordinate of the point to transform
      • getChangeListeners

        public ChangeListener[] getChangeListeners()
        Returns an array of all the ChangeListeners added with addChangeListener().
        Specified by:
        getChangeListeners in interface ChangeEventSupport
        Returns:
        all of the ChangeListeners added or an empty array if no listeners have been added
      • fireStateChanged

        public void fireStateChanged()
        Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
        Specified by:
        fireStateChanged in interface ChangeEventSupport
        See Also:
        EventListenerList