public class Label extends java.lang.Object implements Selectable, java.io.Serializable, Elevatable
| Modifier and Type | Class and Description |
|---|---|
static class |
Label.Property
The properties of a label that may change.
|
| Constructor and Description |
|---|
Label(java.lang.String text,
float x,
float y) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this label. |
Label |
clone()
Returns a clone of this label.
|
boolean |
containsPoint(float x,
float y,
float margin)
Returns
true if this text is at the point at (x, y)
with a given margin. |
float |
getAngle()
Returns the angle in radians used to display this label.
|
Level |
getLevel()
Returns the level which this label belongs to.
|
float[][] |
getPoints()
Returns the point of this label.
|
TextStyle |
getStyle()
Returns the style used to display the text of this label.
|
java.lang.String |
getText()
Returns the text of this label.
|
float |
getX()
Returns the abscissa of the text of this label.
|
float |
getY()
Returns the ordinate of the text of this label.
|
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float y1)
Returns
true if the point of this label is contained
in the horizontal rectangle which opposite corners are at points
(x0, y0) and (x1, y1). |
boolean |
isAtLevel(Level level)
Returns
true if this label is at the given level. |
void |
move(float dx,
float dy)
Moves this label of (
dx, dy) units. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this label. |
void |
setAngle(float angle)
Sets the angle in radians used to display this label.
|
void |
setLevel(Level level)
Sets the level of this label.
|
void |
setStyle(TextStyle style)
Sets the style used to display the text of this label.
|
void |
setText(java.lang.String text)
Sets the text of this label.
|
void |
setX(float x)
Sets the abscissa of the text of this label.
|
void |
setY(float y)
Sets the ordinate of the text of this label.
|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener in parameter to this label.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener in parameter from this label.public java.lang.String getText()
public void setText(java.lang.String text)
public float getX()
public void setX(float x)
public float getY()
public void setY(float y)
public TextStyle getStyle()
public void setStyle(TextStyle style)
public float getAngle()
public void setAngle(float angle)
public Level getLevel()
getLevel in interface Elevatablepublic void setLevel(Level level)
public boolean isAtLevel(Level level)
true if this label is at the given level.isAtLevel in interface Elevatablepublic float[][] getPoints()
getPoints in interface Selectablepublic boolean intersectsRectangle(float x0,
float y0,
float x1,
float y1)
true if the point of this label is contained
in the horizontal rectangle which opposite corners are at points
(x0, y0) and (x1, y1).intersectsRectangle in interface Selectablepublic boolean containsPoint(float x,
float y,
float margin)
true if this text is at the point at (x, y)
with a given margin.containsPoint in interface Selectablepublic void move(float dx,
float dy)
dx, dy) units.move in interface Selectablepublic Label clone()
clone in interface Selectableclone in class java.lang.Object

? Copyrights 2006-2014 eTeks - All rights reserved
Distributed under GNU General Public License