public class HMLabel extends Object implements Serializable
Constructor and Description |
---|
HMLabel(String[] s)
Make a multitext label with default attributes.
|
HMLabel(String[] s,
double x,
double y)
Make a label with specific coordinated in the data system
|
HMLabel(String[] s,
double x,
double y,
String howToSet)
Make a label with specific coordinates.
|
HMLabel(String[] s,
Font f)
Make a multitext label (black color is used).
|
HMLabel(String[] s,
Font f,
Color c)
Make a multitext label
|
Modifier and Type | Method and Description |
---|---|
void |
doc()
Show online documentation.
|
Color |
getColor()
Get color of the label.
|
Font |
getFont()
Get the text font.
|
GraphLabel |
getGraphLabel()
Get a label with default attributes
|
int |
getPositionCoordinate()
Is the position set?
|
double |
getRotation()
Returns the rotation angle.
|
String[] |
getText()
Get text of the label.
|
double |
getX()
Returns the X position of the text.
|
double |
getY()
Returns the Y position of the text.
|
void |
seLocation(double x,
double y)
Sets the location of this label in data coordinates.
|
void |
setColor(Color c)
Sets the color to a specific value
|
void |
setFont(Font f)
Sets the font to a specific value
|
void |
setRotation(double r)
Sets the rotation angle.
|
void |
setText(String[] s)
Sets the text of the label.
|
public HMLabel(String[] s, Font f, Color c)
s
- Lines of a textf
- Fontc
- Colorpublic HMLabel(String[] s, Font f)
s
- Textf
- Fontpublic HMLabel(String[] s)
s
- lines of the textpublic HMLabel(String[] s, double x, double y)
s
- Textx
- Position in Xy
- Position in Ypublic HMLabel(String[] s, double x, double y, String howToSet)
s
- Textx
- position in Xy
- position in YhowToSet
- set it to "NDC" for normalized coordinates (in the range 0-1).
This is a data independent position set it to "USER" for the
user coordinatespublic void setText(String[] s)
s
- new text for the labelpublic String[] getText()
public void setColor(Color c)
c
- color used to draw the labelpublic Color getColor()
public void setFont(Font f)
f
- font used to draw the labelpublic Font getFont()
public void setRotation(double r)
r
- angle for this labelpublic double getRotation()
public void seLocation(double x, double y)
x
- x-position of the lower-left corner of the texty
- y-position of the lower-left corner of the textpublic int getPositionCoordinate()
public double getX()
public double getY()
public GraphLabel getGraphLabel()
public void doc()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics