
FreeHEP API Version current 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.freehep.swing.graphics.PanelArtistUtilities
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.
Constructor Summary  
PanelArtistUtilities()

Method Summary  
static AffineTransform 
getCCWRotateTransform(int width,
int height)
This returns an affine transform which will rotate the contents of the window by 90 degrees. 
static AffineTransform 
getCenteringTransform(int newX,
int newY,
int width,
int height)
This returns an affine transform which will center the given point in the window. 
static AffineTransform 
getCWRotateTransform(int width,
int height)
This returns an affine transform which will rotate the contents of the window by 90 degrees. 
static void 
getFillingTransform(AffineTransform transform,
RectangularShape realBounds,
RectangularShape windowBounds)
This modifies the supplied affine transform so that the rectangle given by realBounds will fit exactly inside the rectangle given by windowBounds. 
static void 
getFittingTransform(AffineTransform transform,
RectangularShape realBounds,
RectangularShape windowBounds)
This modifies the supplied affine transform so that the rectangle given by realBounds will fit inside of the rectangle given by windowBounds. 
static Rectangle 
getLocalBounds(Rectangle bounds,
Container c)
This returns the "local" bounds of a component. 
static AffineTransform 
getResizeTransform(int oldWidth,
int oldHeight,
int newWidth,
int newHeight)
This returns an affine transform which is appropriate for modifying an existing one for a change in the window size. 
static AffineTransform 
getStretchTransform(int oldWidth,
int oldHeight,
int newWidth,
int newHeight)
This returns an affine transform which is appropriate for modifying an existing one for a change in the window size. 
static AffineTransform 
getXFlipTransform(int width)
This returns an affine transform which will flip the horizontal axis around. 
static AffineTransform 
getYFlipTransform(int height)
This returns an affine transform which will flip the vertical axis around. 
static AffineTransform 
getZoomTransform(double zoomFactor,
int width,
int height)
This returns an affine transform which will keep the center point in the center and scale the x and ydirections uniformly by the factor given. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 
public PanelArtistUtilities()
Method Detail 
public static AffineTransform getResizeTransform(int oldWidth, int oldHeight, int newWidth, int newHeight)
public static AffineTransform getStretchTransform(int oldWidth, int oldHeight, int newWidth, int newHeight)
public static AffineTransform getZoomTransform(double zoomFactor, int width, int height)
public static AffineTransform getXFlipTransform(int width)
public static AffineTransform getYFlipTransform(int height)
public static AffineTransform getCenteringTransform(int newX, int newY, int width, int height)
public static AffineTransform getCCWRotateTransform(int width, int height)
public static AffineTransform getCWRotateTransform(int width, int height)
public static void getFittingTransform(AffineTransform transform, RectangularShape realBounds, RectangularShape windowBounds)
transform
 the transform which will be modifiedrealBounds
 the user space rectanglewindowBounds
 the window to map the user rectangle topublic static void getFillingTransform(AffineTransform transform, RectangularShape realBounds, RectangularShape windowBounds)
transform
 the transform which will be modifiedrealBounds
 the user space rectanglewindowBounds
 the window to map the user rectangle topublic static Rectangle getLocalBounds(Rectangle bounds, Container c)
bounds
 rectangle to modify with the given component's
bounds (will create new Rectangle if this is null)c
 component to get the bounds from

FreeHEP API Version current 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 