|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.noaa.pmel.sgt.LabelDrawer2
public class LabelDrawer2
Implements label drawing using Java2D functionality.
Constructor Summary | |
---|---|
LabelDrawer2(java.lang.String lbl,
double hgt,
Point2D.Double loc,
int valign,
int halign)
|
Method Summary | |
---|---|
LabelDrawer |
copy()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelDrawer2(java.lang.String lbl, double hgt, Point2D.Double loc, int valign, int halign)
Method Detail |
---|
public LabelDrawer copy()
public void draw(java.awt.Graphics g) throws LayerNotFoundException
LabelDrawer
draw
in interface LabelDrawer
LayerNotFoundException
public void setText(java.lang.String lbl)
LabelDrawer
setText
in interface LabelDrawer
lbl
- the label textpublic java.lang.String getText()
LabelDrawer
getText
in interface LabelDrawer
public void setColor(java.awt.Color clr)
LabelDrawer
setColor
in interface LabelDrawer
Color
public java.awt.Color getColor()
LabelDrawer
getColor
in interface LabelDrawer
public void setFont(java.awt.Font font)
LabelDrawer
setFont
in interface LabelDrawer
Font
public java.awt.Font getFont()
LabelDrawer
getFont
in interface LabelDrawer
public void setLayer(Layer layer)
LabelDrawer
setLayer
in interface LabelDrawer
public Layer getLayer()
LabelDrawer
getLayer
in interface LabelDrawer
public void setOrientation(int orient)
LabelDrawer
setOrientation
in interface LabelDrawer
orient
- The orientation.public int getOrientation()
LabelDrawer
getOrientation
in interface LabelDrawer
public void setHAlign(int halign)
LabelDrawer
setHAlign
in interface LabelDrawer
public int getHAlign()
LabelDrawer
getHAlign
in interface LabelDrawer
public void setVAlign(int valign)
LabelDrawer
setVAlign
in interface LabelDrawer
public int getVAlign()
LabelDrawer
getVAlign
in interface LabelDrawer
public void setLocation(java.awt.Point loc)
LabelDrawer
setLocation
in interface LabelDrawer
loc
- label positionpublic java.awt.Point getLocation()
LabelDrawer
getLocation
in interface LabelDrawer
public void setBounds(int x, int y, int width, int height)
LabelDrawer
setBounds
in interface LabelDrawer
x
- x location of labely
- y location of labelwidth
- label widthheight
- label heightpublic java.awt.Rectangle getBounds()
LabelDrawer
getBounds
in interface LabelDrawer
public void setLocationP(Point2D.Double loc)
LabelDrawer
setLocationP
in interface LabelDrawer
loc
- physical location of labelpublic Point2D.Double getLocationP()
LabelDrawer
getLocationP
in interface LabelDrawer
public Rectangle2D.Double getBoundsP()
LabelDrawer
getBoundsP
in interface LabelDrawer
public void setAngle(double angle)
LabelDrawer
setAngle
in interface LabelDrawer
public double getAngle()
LabelDrawer
getAngle
in interface LabelDrawer
public void setHeightP(double hgt)
LabelDrawer
setHeightP
in interface LabelDrawer
hgt
- The label height.public double getHeightP()
LabelDrawer
getHeightP
in interface LabelDrawer
public void setVisible(boolean vis)
LabelDrawer
setVisible
in interface LabelDrawer
public boolean isVisible()
LabelDrawer
isVisible
in interface LabelDrawer
public float getStringWidth(java.awt.Graphics g)
LabelDrawer
getStringWidth
in interface LabelDrawer
public float getStringHeight(java.awt.Graphics g)
LabelDrawer
getStringHeight
in interface LabelDrawer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |