|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LabelDrawer
Defines the methods that implement label drawing in sgt. This interface is necessary since sgt v2.0 will use Java2D functionality to draw labels if it is available.
Method Summary | |
---|---|
void |
draw(java.awt.Graphics g)
Used internally by sgt. |
double |
getAngle()
Get label drawing angle. |
java.awt.Rectangle |
getBounds()
Get the label bounds in device units. |
Rectangle2D.Double |
getBoundsP()
Get the label reference location in physcial coordinates. |
java.awt.Color |
getColor()
Get the color. |
java.awt.Font |
getFont()
Get the font. |
int |
getHAlign()
Get the horizontal alignment. |
double |
getHeightP()
Get the label height in physical coordinates. |
Layer |
getLayer()
Get the layer. |
java.awt.Point |
getLocation()
Get the label position in device coordinates. |
Point2D.Double |
getLocationP()
Get the label reference location in physcial coordinates. |
int |
getOrientation()
Get the origentation. |
float |
getStringHeight(java.awt.Graphics g)
Get the string height in device units. |
float |
getStringWidth(java.awt.Graphics g)
Get the string width in device units. |
java.lang.String |
getText()
Get the label text. |
int |
getVAlign()
Get the vertical alignment. |
boolean |
isVisible()
Is label visible? |
void |
setAngle(double angle)
Draw label at arbitrary rotation. |
void |
setBounds(int x,
int y,
int width,
int height)
Set the label bounds in device units. |
void |
setColor(java.awt.Color clr)
Set the color. |
void |
setFont(java.awt.Font font)
Set the font. |
void |
setHAlign(int halign)
Set the horizontal alignment. |
void |
setHeightP(double hgt)
Set the height of the label in physical coordinates. |
void |
setLayer(Layer layer)
Used internally by sgt. |
void |
setLocation(java.awt.Point loc)
Set the label position in device coordinates. |
void |
setLocationP(Point2D.Double loc)
Set the label reference location in physcial coordinates. |
void |
setOrientation(int orient)
Set the orientation. |
void |
setText(java.lang.String lbl)
Set the label text. |
void |
setVAlign(int valign)
Set the vertical alignment. |
void |
setVisible(boolean vis)
Set visibility of label. |
Method Detail |
---|
void draw(java.awt.Graphics g) throws LayerNotFoundException
LayerNotFoundException
void setText(java.lang.String lbl)
lbl
- the label textjava.lang.String getText()
java.awt.Color getColor()
void setColor(java.awt.Color clr)
color
- The color of the label.Color
void setFont(java.awt.Font font)
fnt
- The Font to use to draw the label.Font
java.awt.Font getFont()
void setLayer(Layer layer)
Layer getLayer()
void setOrientation(int orient)
orient
- The orientation.int getOrientation()
void setHAlign(int halign)
horz
- The horizontal alignment.int getHAlign()
void setVAlign(int valign)
vert
- The vertical alignment.int getVAlign()
void setLocation(java.awt.Point loc)
loc
- label positionjava.awt.Point getLocation()
void setBounds(int x, int y, int width, int height)
x
- x location of labely
- y location of labelwidth
- label widthheight
- label heightjava.awt.Rectangle getBounds()
void setLocationP(Point2D.Double loc)
loc
- physical location of labelPoint2D.Double getLocationP()
Rectangle2D.Double getBoundsP()
void setAngle(double angle)
double getAngle()
void setHeightP(double hgt)
hgt
- The label height.double getHeightP()
void setVisible(boolean vis)
boolean isVisible()
float getStringWidth(java.awt.Graphics g)
float getStringHeight(java.awt.Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |