public class InteractiveTextLine extends InteractiveShape
| Modifier and Type | Class and Description |
|---|---|
protected static class |
InteractiveTextLine.InteractiveTextLineLoader
A class to save and load InteractiveArrow in an XMLControl.
|
InteractiveShape.InteractiveShapeLoaderedgeColor, height, pixelSized, shape, shapeClass, theta, width, xoff, yoffcolor, x, y| Constructor and Description |
|---|
InteractiveTextLine(java.lang.String text,
double x,
double y)
Constructs an interactive TextLinme with the given text and location.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the text.
|
java.awt.Font |
getFont()
Gets the font used to display the text.
|
static XML.ObjectLoader |
getLoader()
Gets the XML object loader for this class.
|
java.lang.String |
getText()
Gets the text to be dispalyed.
|
boolean |
isInside(DrawingPanel panel,
int xpix,
int ypix)
Determines if the shape is enabled and if the given pixel coordinates are within the image.
|
void |
setFont(java.awt.Font font)
Sets the font used to display the text.
|
void |
setJustification(int justification)
Sets the justification to center, left, or right.
|
void |
setText(java.lang.String text)
Sets the text to be displayed.
|
contains, createArrow, createCenteredArrow, createCircle, createEllipse, createImage, createRectangle, createSquare, createTextLine, createTriangle, getHeight, getShape, getWidth, getXMax, getXMin, getYMax, getYMin, isMeasured, setHeight, setMarkerColor, setMeasured, setOffset, setPixelSized, setTheta, setWidth, setX, setXY, setY, toString, tranform, transformfindInteractive, getX, getY, isEnabled, setEnabledpublic InteractiveTextLine(java.lang.String text,
double x,
double y)
text - Stringx - doubley - doublepublic void setJustification(int justification)
TextLine.CENTER, TextLine.LEFT, TextLine.RIGHT justification - intpublic void setText(java.lang.String text)
text - Stringpublic java.lang.String getText()
public void setFont(java.awt.Font font)
font - Fontpublic java.awt.Font getFont()
public boolean isInside(DrawingPanel panel, int xpix, int ypix)
isInside in class InteractiveShapepanel - DrawingPanelxpix - intypix - intpublic void draw(DrawingPanel panel, java.awt.Graphics g)
draw in interface Drawabledraw in class InteractiveShapepanel - the world in which the arrow is viewedg - the graphics context upon which to drawpublic static XML.ObjectLoader getLoader()