public class HKey
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
HKey(java.lang.String s)
Make a key label with default attributes
|
HKey(java.lang.String s,
double x,
double y)
Make a key label with specific coordinated in the data system
|
HKey(java.lang.String text,
double x,
double y,
java.awt.Font font,
java.awt.Color color,
java.lang.String howToSet,
java.lang.Object obj)
Make a key for a function, data points or histograms (F1D, H1D, P1D).
|
HKey(java.lang.String text,
double x,
double y,
java.awt.Font font,
java.lang.String howToSet,
java.lang.Object obj)
Make a key for a function, data points or histograms (F1D, H1D, P1D).
|
HKey(java.lang.String text,
double x,
double y,
java.lang.Object obj)
Make a key for a function, data points or histograms (F1D, H1D, P1D).
|
HKey(java.lang.String s,
double x,
double y,
java.lang.String howToSet)
Make a label with specific coordinates.
|
HKey(java.lang.String text,
double x,
double y,
java.lang.String howToSet,
java.lang.Object obj)
Make a key for a function, data points or histograms (F1D, H1D, P1D).
|
HKey(java.lang.String s,
java.awt.Font f)
Make a key label (color- black)
|
HKey(java.lang.String s,
java.awt.Font f,
java.awt.Color c)
Create a key label.
|
HKey(java.lang.String text,
java.lang.Object obj)
Make a key for a function, data points or histograms (F1D, H1D, P1D) at
the default position.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getColor()
Get color of a label.
|
java.awt.Font |
getFont()
Get the font of the label text.
|
GraphLabel |
getGraphLabel()
Get a label with default attributes
|
java.awt.Color |
getKeyColor()
Get key color
|
float |
getKeySize()
Get key size
|
double |
getKeySpace()
Get a space between the key and the text describing the key
|
int |
getKeyType()
Get key type
|
double |
getLineWidth()
Get a key line width
|
int |
getPositionCoordinate()
Is the position set?
|
double |
getRotation()
Returns the rotation angle.
|
float |
getSeparation()
Return vertical separation between different keys.
|
java.lang.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.
|
boolean |
isDefaultPosition()
Is this key should be set at a default position?
|
void |
setColor(java.awt.Color c)
Sets the color to a specific value
|
void |
setDefaultPosition(boolean isdefault)
Is this key should be set at a default position?
|
void |
setFont(java.awt.Font f)
Sets the font to a specific value
|
void |
setKey(int key_type,
float key_size,
java.awt.Color key_color)
Sets a key
|
void |
setKeySpace(float key_space)
Sets a space between the key and the text describing the key
|
void |
setLineWidth(int key_line_width)
Sets key line width
|
void |
setLocation(double x,
double y)
Sets the location of the label in data coordinates.
|
void |
setLocation(double x,
double y,
java.lang.String howToSet)
Sets the location of the label in data coordinates.
|
void |
setRotation(double r)
Sets the rotation angle.
|
void |
setSeparation(float y)
Set Y-separation of the keys in the default location mode
|
void |
setText(java.lang.String s)
Sets a text of the label.
|
public HKey(java.lang.String s,
java.awt.Font f,
java.awt.Color c)
s - Textf - Fontc - Colorpublic HKey(java.lang.String text,
double x,
double y,
java.awt.Font font,
java.awt.Color color,
java.lang.String howToSet,
java.lang.Object obj)
text - key textx - position Xy - position Yfont - font of the key textcolor - color of the key texthowToSet - use either USER or NDC coordinatorsobj - input objects, such as F1D, H1D, P1Dpublic HKey(java.lang.String text,
double x,
double y,
java.awt.Font font,
java.lang.String howToSet,
java.lang.Object obj)
text - key textx - position Xy - position Yfont - font of the key texthowToSet - use either USER or NDC coordinatorsobj - input objects, such as F1D, H1D, P1Dpublic HKey(java.lang.String text,
double x,
double y,
java.lang.String howToSet,
java.lang.Object obj)
text - key textx - position Xy - position YhowToSet - use either USER or NDC coordinatorsobj - input objects, such as F1D, H1D, P1Dpublic HKey(java.lang.String text,
double x,
double y,
java.lang.Object obj)
text - key textx - position Xy - position Yobj - input objects, such as F1D, H1D, P1Dpublic HKey(java.lang.String text,
java.lang.Object obj)
text - key textx - position Xy - position Yobj - input objects, such as F1D, H1D, P1Dpublic HKey(java.lang.String s,
java.awt.Font f)
s - Textf - Fontpublic HKey(java.lang.String s)
s - textpublic HKey(java.lang.String s,
double x,
double y)
s - Textx - Position in Xy - Position in Ypublic HKey(java.lang.String s,
double x,
double y,
java.lang.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(java.lang.String s)
s - new text for the labelpublic java.lang.String getText()
public void setColor(java.awt.Color c)
c - color used to draw the labelpublic java.awt.Color getColor()
public void setFont(java.awt.Font f)
f - font used to draw the labelpublic java.awt.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 setKey(int key_type,
float key_size,
java.awt.Color key_color)
key_type - type of the key. 0 means a boxkey_size - size (i.e. length) a key in terms of character widthkey_color - color of the keypublic void setLineWidth(int key_line_width)
key_line_width - line width of the keypublic void setKeySpace(float key_space)
key_space - key space in terms of character widthpublic double getKeySpace()
public double getLineWidth()
public int getKeyType()
public java.awt.Color getKeyColor()
public float getKeySize()
public void setLocation(double x,
double y,
java.lang.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 GraphLabel getGraphLabel()
public void setSeparation(float y)
y - separation between 0 and 1. NDC system is used.public float getSeparation()
separation - between keyspublic boolean isDefaultPosition()
public void setDefaultPosition(boolean isdefault)
isdefault - true if the key are set at default locationJHepSim. A part of HSTOOLS. version-1.2