DESY ACOP Beans Home

com.cosylab.gui.components.gauger
Class ScaleTransformFactory

java.lang.Object
  extended by com.cosylab.gui.components.gauger.ScaleTransformFactory

public class ScaleTransformFactory
extends java.lang.Object

Factory class that creates transform implementations based on dimensions of the gauger.

Version:
$id$
Author:
Ales Pucelj

Field Summary
static short AUTOMATIC_SHAPE
          Scale shape
static short FULL_CIRCULAR_SHAPE
          Circular polar scale
static short HORIZONTAL_CIRCULAR_SHAPE
          Horizontal polar scale
static short HORIZONTAL_LINEAR_SHAPE
          Horizontal linear scale
static short VERTICAL_CIRCULAR_SHAPE
          Vertical polar scale
static short VERTICAL_LINEAR_SHAPE
          Vertical linear scale
 
Constructor Summary
ScaleTransformFactory()
           
 
Method Summary
static ScaleTransform createTransform(int w, int h)
          Creates a new instance of transform that is best suited for given size.
protected static int getOptimalRenderer(int w, int h)
          Determines the optimal renderer for this scale, given the width and height of the area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOMATIC_SHAPE

public static final short AUTOMATIC_SHAPE
Scale shape

See Also:
Constant Field Values

HORIZONTAL_LINEAR_SHAPE

public static final short HORIZONTAL_LINEAR_SHAPE
Horizontal linear scale

See Also:
Constant Field Values

HORIZONTAL_CIRCULAR_SHAPE

public static final short HORIZONTAL_CIRCULAR_SHAPE
Horizontal polar scale

See Also:
Constant Field Values

FULL_CIRCULAR_SHAPE

public static final short FULL_CIRCULAR_SHAPE
Circular polar scale

See Also:
Constant Field Values

VERTICAL_CIRCULAR_SHAPE

public static final short VERTICAL_CIRCULAR_SHAPE
Vertical polar scale

See Also:
Constant Field Values

VERTICAL_LINEAR_SHAPE

public static final short VERTICAL_LINEAR_SHAPE
Vertical linear scale

See Also:
Constant Field Values
Constructor Detail

ScaleTransformFactory

public ScaleTransformFactory()
Method Detail

getOptimalRenderer

protected static int getOptimalRenderer(int w,
                                        int h)
Determines the optimal renderer for this scale, given the width and height of the area.

Parameters:
w - int
h - int
Returns:
int

createTransform

public static ScaleTransform createTransform(int w,
                                             int h)
Creates a new instance of transform that is best suited for given size.

Parameters:
w - int
h - int
Returns:
ScaleTransform


Copyright © 2010. All Rights Reserved.