|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.HLabel
public class HLabel
Create an interactive Label in the USER or NDC coordinates. The label can be defined in the NDC (normalized coordinate system) or the user coordinate. Only one line of the text can be shown. To show several lines of the text, use
class
For more labels look at the shape package
,
Serialized FormConstructor Summary | |
---|---|
HLabel(String s)
Make a label with default attributes |
|
HLabel(String s,
double x,
double y)
Make a label with specific coordinated in the data system |
|
HLabel(String s,
double x,
double y,
String howToSet)
Make a label with specific coordinates. |
|
HLabel(String s,
Font f)
Make a label (color- black) |
|
HLabel(String s,
Font f,
Color c)
Make a text label at (0,0) in the data coordinates (USER). |
Method Summary | |
---|---|
void |
doc()
Show online documentation. |
Color |
getColor()
Get color of a label. |
Font |
getFont()
Get the font of the label text. |
jplot.GraphLabel |
getGraphLabel()
Get a label with default attributes |
int |
getPositionCoordinate()
Is the position set? |
double |
getRotation()
Returns the rotation angle. |
String |
getText()
Get the text of the label. |
double |
getX()
Returns the X position of the text. |
double |
getY()
Returns the Y position of the text. |
void |
setColor(Color c)
Sets the color to a specific value |
void |
setFont(Font f)
Sets the font to a specific value |
void |
setLocation(double x,
double y)
Sets the location of the label in the NDC coordinates. |
void |
setLocation(double x,
double y,
String howToSet)
Sets the location of the label in data coordinates. |
void |
setRotation(double r)
Sets the rotation angle. |
void |
setText(String s)
Sets a text of the label. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HLabel(String s, Font f, Color c)
s
- Textf
- Fontc
- Colorpublic HLabel(String s, Font f)
s
- Textf
- Fontpublic HLabel(String s)
s
- textpublic HLabel(String s, double x, double y)
s
- Textx
- Position in Xy
- Position in Ypublic HLabel(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 coordinatesMethod Detail |
---|
public 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 setLocation(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 void setLocation(double x, double y, String howToSet)
x
- x-position of the lower-left corner of the texty
- y-position of the lower-left corner of the texthowToSet
- 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 int getPositionCoordinate()
public double getX()
public double getY()
public jplot.GraphLabel getGraphLabel()
public void doc()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |