|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.physics.waves.optics.elements.OpticalElement
org.jscience.physics.waves.optics.elements.OpticalDevice
public class OpticalDevice
The OpticalDevice class is a child of OpticalElement and
enables the user to build a complete optical system of OpticalElement objects.
since OpticalDevice inherits from OpticalElement, devices can be
nested to an arbitrary depth, making it easy to split the system into functional blocks.
OpticalElement
subclasses into an OpticalDevice object and to use an
OpticalCanvas object to display it.
OpticalDevice,
OpticalCanvas| Constructor Summary | |
|---|---|
OpticalDevice()
|
|
| Method Summary | |
|---|---|
void |
append(OpticalElement e)
Adds an element to the end of the child elements list, and calls its PutAfter method to align it on the previous element. |
java.lang.Object |
clone()
|
void |
draw(java.awt.Graphics g)
Draws the device by calling the Draw method for all of its
child elements. |
int |
drawRay(java.awt.Graphics g,
Ray r,
int index)
Draws the part of the Ray going through the device. |
void |
drawSelf(java.awt.Graphics g)
Draws the device's symbol into a Graphics object. |
void |
propagate(Ray r)
Propagates a Ray through each of its child elements, by calling
their Propagate method. |
void |
propagateRayPointSelf(RayPoint r)
Does nothing since all the work is done by the Device's and the child elements Propagate methods. |
void |
rearrange()
Realigns each child element on the previous one and sets the width of the device to the cumulated width of the child elements. |
| Methods inherited from class org.jscience.physics.waves.optics.elements.OpticalElement |
|---|
getAxis, getCenter, getOffAxis, getWidth, getX, moveAxis, moveOffAxis, moveOnAxis, propagateRayPoint, putAfter, setWidth, translateOrigin, translateOriginBack |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OpticalDevice()
| Method Detail |
|---|
public java.lang.Object clone()
clone in class OpticalElementpublic void draw(java.awt.Graphics g)
Draw method for all of its
child elements.
draw in class OpticalElementg - the Graphics object into which the device must be drawn.OpticalElement.draw(java.awt.Graphics)public void drawSelf(java.awt.Graphics g)
Graphics object. Does nothing
since the device is drawn by drawing each of its child elements. Override this
method to add extra drawings to the device.
drawSelf in class OpticalElementg - the Graphics object into which the device must be drawn.
public int drawRay(java.awt.Graphics g,
Ray r,
int index)
Ray going through the device. The DrawRay
method is called for every element in the device.
drawRay in class OpticalElementg - the Graphics object in which the Ray must
be drawn.r - the Ray to draw.index - the index of the RayPoint to draw. Used to keep track of
the position in the Ray in case of multiple
OpticalDevice nesting.
RayPoint to be drawn by the next element.Ray,
RayPointpublic void propagate(Ray r)
Ray through each of its child elements, by calling
their Propagate method.
propagate in class OpticalElementr - the Ray to propagate.OpticalElement.propagate(org.jscience.physics.waves.optics.rays.Ray)public void propagateRayPointSelf(RayPoint r)
propagateRayPointSelf in class OpticalElementr - the RayPoint to propagate.RayPoint,
propagate(org.jscience.physics.waves.optics.rays.Ray),
OpticalElement.propagate(org.jscience.physics.waves.optics.rays.Ray)public void append(OpticalElement e)
PutAfter method to align it on the previous element.
e - the element to add.OpticalElement,
OpticalElement.putAfter(org.jscience.physics.waves.optics.elements.OpticalElement)public void rearrange()
rearrange in class OpticalElementOpticalElement,
OpticalElement.putAfter(org.jscience.physics.waves.optics.elements.OpticalElement)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||