Class PanelArtistUtilities


  • public class PanelArtistUtilities
    extends java.lang.Object
    This class is a collection of static methods which are useful for implementations of the PanelArtist interface. Most methods return an AffineTransform which will perform some common operation on a window.
    Version:
    $Id: PanelArtistUtilities.java,v 1.1 2001/11/04 11:10:27 l2fprod Exp $
    Author:
    Charles Loomis
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.geom.AffineTransform getCCWRotateTransform​(int width, int height)
      This returns an affine transform which will rotate the contents of the window by 90 degrees.
      static java.awt.geom.AffineTransform getCWRotateTransform​(int width, int height)
      This returns an affine transform which will rotate the contents of the window by -90 degrees.
      static java.awt.geom.AffineTransform getYFlipTransform​(int height)
      This returns an affine transform which will flip the vertical axis around.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PanelArtistUtilities

        public PanelArtistUtilities()
    • Method Detail

      • getYFlipTransform

        public static java.awt.geom.AffineTransform getYFlipTransform​(int height)
        This returns an affine transform which will flip the vertical axis around. (NOTE: that this transform should be pre-concatenated with the existing one!) The returned transform will maintain the centerpoint of the window and flip the direction of the y-axis.
        Parameters:
        height - Description of Parameter
        Returns:
        The YFlipTransform value
      • getCCWRotateTransform

        public static java.awt.geom.AffineTransform getCCWRotateTransform​(int width,
                                                                          int height)
        This returns an affine transform which will rotate the contents of the window by 90 degrees. (NOTE: that this transform should be pre-concatenated with the existing one!) The returned transform will rotate the contents of the window by 90 degrees while keeping the centerpoint the same. The x and y-scaling will be adjusted to keep the same area visible.
        Parameters:
        width - Description of Parameter
        height - Description of Parameter
        Returns:
        The CCWRotateTransform value
      • getCWRotateTransform

        public static java.awt.geom.AffineTransform getCWRotateTransform​(int width,
                                                                         int height)
        This returns an affine transform which will rotate the contents of the window by -90 degrees. (NOTE: that this transform should be pre-concatenated with the existing one!) The returned transform will rotate the contents of the window by -90 degrees while keeping the centerpoint the same. The x and y-scaling will be adjusted to keep the same area visible.
        Parameters:
        width - Description of Parameter
        height - Description of Parameter
        Returns:
        The CWRotateTransform value