org.opensourcephysics.display
Class BoundedTextLine

java.lang.Object
  extended by org.opensourcephysics.display.AbstractInteractive
      extended by org.opensourcephysics.display.InteractiveShape
          extended by org.opensourcephysics.display.BoundedShape
              extended by org.opensourcephysics.display.BoundedImage
                  extended by org.opensourcephysics.display.BoundedTextLine
All Implemented Interfaces:
java.awt.image.ImageObserver, Drawable, Interactive, Measurable, Selectable

public class BoundedTextLine
extends BoundedImage

A BoundedTextLine is a line of text that can be rotated and scaled using a mouse.

Version:
1.0
Author:
W. Christian

Nested Class Summary
 
Nested classes/interfaces inherited from class org.opensourcephysics.display.BoundedShape
BoundedShape.BoundedShapeLoader
 
Nested classes/interfaces inherited from class org.opensourcephysics.display.InteractiveShape
InteractiveShape.InteractiveShapeLoader
 
Field Summary
 
Fields inherited from class org.opensourcephysics.display.BoundedImage
image
 
Fields inherited from class org.opensourcephysics.display.InteractiveShape
edgeColor, height, pixelSized, shape, shapeClass, theta, width, xoff, yoff
 
Fields inherited from class org.opensourcephysics.display.AbstractInteractive
color, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
BoundedTextLine(java.lang.String text, double x, double y)
          Constructor BoundedTextLine
 
Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws the image.
 java.awt.Font getFont()
          Gets the font.
 void setFont(java.awt.Font font)
          Sets the font text font.
 
Methods inherited from class org.opensourcephysics.display.BoundedImage
imageUpdate
 
Methods inherited from class org.opensourcephysics.display.BoundedShape
createBoundedArrow, createBoundedCenteredArrow, createBoundedCircle, createBoundedEllipse, createBoundedImage, createBoundedRectangle, createBoundedTriangle, findInteractive, getLoader, getPreferredCursor, isHeightDrag, isInside, isRotateDrag, isSelected, isWidthDrag, isXYDrag, setHeightDrag, setRotateDrag, setSelected, setWidthDrag, setXYDrag, toggleSelected, toString
 
Methods inherited from class org.opensourcephysics.display.InteractiveShape
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, tranform, transform
 
Methods inherited from class org.opensourcephysics.display.AbstractInteractive
getX, getY, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.display.Interactive
getX, getY, isEnabled, setEnabled, setX, setXY, setY
 
Methods inherited from interface org.opensourcephysics.display.Measurable
getXMax, getXMin, getYMax, getYMin, isMeasured
 

Constructor Detail

BoundedTextLine

public BoundedTextLine(java.lang.String text,
                       double x,
                       double y)
Constructor BoundedTextLine

Parameters:
text -
x -
y -
Method Detail

setFont

public void setFont(java.awt.Font font)
Sets the font text font.

Parameters:
font - Font

getFont

public java.awt.Font getFont()
Gets the font.

Returns:
Font

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Draws the image.

Specified by:
draw in interface Drawable
Overrides:
draw in class BoundedImage
Parameters:
panel - the world in which the arrow is viewed
g - the graphics context upon which to draw