|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJLogView_.datastructs.LGAnnotation
public class LGAnnotation
LGAnnotation is a class representing the data of an annotation. This includes text of the annotation, the x, y coordinates on the canvas, the rotation of the text, the font and the colour.
Constructor Summary | |
---|---|
LGAnnotation(java.awt.Color c,
java.awt.Font f,
int X,
int Y,
int ang,
java.lang.String s)
This is the LGAnnotation constructor with all the initials parameters to be given |
Method Summary | |
---|---|
void |
draw(java.awt.Graphics2D g)
This methods draws the annotation on the given graphic context |
java.awt.Color |
getColour()
This method returns the annotation colour |
java.awt.Font |
getFont()
This method returns all font information, the font face, the style and the font size |
int[] |
getPos()
This methods returns the position in pixel coordinates of the annotation |
int |
getRotation()
This method returns the rotation angle of the annotation text, in degree. |
java.lang.String |
getText()
This method returns the text of the annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LGAnnotation(java.awt.Color c, java.awt.Font f, int X, int Y, int ang, java.lang.String s)
c
- a Color object representing the annotation colourf
- a Font object representing the annotation font (face+style+size)X
- the x coordinate in pixels on the canvasY
- the y coordinate in pixels on the canvasang
- the rotation angle of the text in degreess
- a String object representing the text of the annotationColor
,
Font
,
String
Method Detail |
---|
public void draw(java.awt.Graphics2D g)
g
- the graphic context we will draw the annotation onGraphics2D
public int[] getPos()
public int getRotation()
public java.lang.String getText()
String
public java.awt.Font getFont()
Font
public java.awt.Color getColour()
Color
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |