|
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.ScaleBorder
This class implements a Border in which the left and bottom sides contain numerical scales.
Field Summary | |
static int |
TYPE_GENERAL_TRANSFORM
Constant describing a transform which does not fall into one of the other categories. |
static int |
TYPE_PARALLEL_TRANSFORM
Constant describing a transform in which the transformed x and y axes are parallel (or antiparallel) to the original axes. |
static int |
TYPE_SWITCHED_TRANSFORM
Constant describing a transform in which the transformed x and y axes are parallel (or antiparallel) to the original y and x axes, respectively. |
static int |
TYPE_SWITCHED_X_SKEW_TRANSFORM
Constant describing a transform in which the transformed x-axis is parallel (or antiparallel) to the original y-axis and the transformed y-axis forms a non-zero angle with the original x-axis. |
static int |
TYPE_SWITCHED_Y_SKEW_TRANSFORM
Constant describing a transform in which the transformed y-axis is parallel (or antiparallel) to the original x-axis and the transformed x-axis forms a non-zero angle with the original y-axis. |
static int |
TYPE_X_SKEW_TRANSFORM
Constant describing a transform in which the transformed x-axis is parallel (or antiparallel) to the original x-axis and the transformed y-axis forms a non-zero angle with the original one. |
static int |
TYPE_Y_SKEW_TRANSFORM
Constant describing a transform in which the transformed y-axis is parallel (or antiparallel) to the original y-axis and the transformed x-axis forms a non-zero angle with the original one. |
Constructor Summary | |
ScaleBorder()
Constructs a ScaleBorder with the default foreground (black) and background (orange) colors. |
|
ScaleBorder(Color bkgColor,
Color fgColor)
Constructs a ScaleBorder with the given background and foreground colors. |
Method Summary | |
protected static int |
classifyTransform(AffineTransform xform)
This is a protected utility method which classifies the given transform into seven categories: parallel, switched, x-skew, y-skew, switched x-skew, switched y-skew, and general. |
Color |
getBackgroundColor()
Get the current background color. |
Insets |
getBorderInsets(Component c)
Returns the insets of this border. |
Color |
getForegroundColor()
Get the current foreground color. |
Font |
getLabelFont()
Get the current font for the labels. |
boolean |
isBorderOpaque()
Returns whether or not the border is opaque. |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified graphics context, position, and size. |
void |
setAxisLabels(String horizontalLabel,
String verticalLabel)
Set the axis labels. |
void |
setAxisUnits(String horizontalUnits,
String verticalUnits)
Set the axis units. |
void |
setBackgroundColor(Color bkgColor)
Set the background color. |
void |
setForegroundColor(Color bkgColor)
Set the foreground color. |
void |
setLabelFont(Font labelFont)
Set the font for the labels. |
void |
setLimits(double minHoriz,
double maxHoriz,
double minVert,
double maxVert)
Set the horizontal and vertical limits for the scales. |
void |
setScales(String horizLabel,
String vertLabel,
String horizUnits,
String vertUnits,
AffineTransform transform,
int panelWidth,
int panelHeight)
Set the scale labels taking into account the given linear transformation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TYPE_PARALLEL_TRANSFORM
public static final int TYPE_SWITCHED_TRANSFORM
public static final int TYPE_X_SKEW_TRANSFORM
public static final int TYPE_Y_SKEW_TRANSFORM
public static final int TYPE_SWITCHED_X_SKEW_TRANSFORM
public static final int TYPE_SWITCHED_Y_SKEW_TRANSFORM
public static final int TYPE_GENERAL_TRANSFORM
Constructor Detail |
public ScaleBorder()
public ScaleBorder(Color bkgColor, Color fgColor)
Method Detail |
public void setBackgroundColor(Color bkgColor)
public Color getBackgroundColor()
public void setForegroundColor(Color bkgColor)
public Color getForegroundColor()
public void setLabelFont(Font labelFont)
public Font getLabelFont()
public void setLimits(double minHoriz, double maxHoriz, double minVert, double maxVert)
public void setAxisLabels(String horizontalLabel, String verticalLabel)
public void setAxisUnits(String horizontalUnits, String verticalUnits)
public Insets getBorderInsets(Component c)
getBorderInsets
in interface Border
public boolean isBorderOpaque()
isBorderOpaque
in interface Border
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in interface Border
public void setScales(String horizLabel, String vertLabel, String horizUnits, String vertUnits, AffineTransform transform, int panelWidth, int panelHeight)
protected static int classifyTransform(AffineTransform xform)
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |