optics.graphics
Class Label2D
java.lang.Object
optics.Optics
optics.graphics.Label2D
- All Implemented Interfaces:
- Diagram2DComponent
public class Label2D
- extends Optics
- implements Diagram2DComponent
Class to implement a Label on a Daigram2D
Constructor Summary |
Label2D(double x,
double y,
java.lang.String s)
|
Label2D(double x,
double y,
java.lang.String s,
java.awt.Color c)
Form a label at a specific location and Colour |
Method Summary |
void |
draw(java.awt.Graphics2D g)
Method draw the Strin on the diagram |
java.awt.geom.Rectangle2D |
getBounds()
Method to get the bounds |
Methods inherited from class optics.Optics |
getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Label2D
public Label2D(double x,
double y,
java.lang.String s,
java.awt.Color c)
- Form a label at a specific location and Colour
Label2D
public Label2D(double x,
double y,
java.lang.String s)
getBounds
public java.awt.geom.Rectangle2D getBounds()
- Method to get the bounds
- Specified by:
getBounds
in interface Diagram2DComponent
- Returns:
Rectangle2D
the bounding Rectangle
draw
public void draw(java.awt.Graphics2D g)
- Method draw the Strin on the diagram
- Specified by:
draw
in interface Diagram2DComponent
- Parameters:
g
- the Graphics2D context