|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsystem.CurveReader
This class reads a Curve Scheme from a file. Actually, the Curve Scheme is an
ESDL file, and this class asks a class from KirkPack, called
ESDLReader, to read the ESDL file. This class then converts the SDL
representation to a grouped shape representation (a Curve Scheme).
This class does not have to be instantiated, a simple call:
CurveReader.readCurveScheme(filename)
will return a Group object, which is the main group.
| Constructor Summary | |
protected |
CurveReader()
Constructs a CurveReader. |
| Method Summary | |
protected Group |
convert(kirk.io.sdl.SDLDocument sdldocument)
Converts the main group and all its subgroups and shapes. |
protected ControlPoint |
convertToControlPoint(kirk.io.sdl.SDLElement sdlelement)
Converts the given SDLElement into a ControlPoint,
providing it represents one (it has to have "controlpoint" as name, and be an
SDL normal element). |
protected Curve |
convertToCurve(kirk.io.sdl.SDLElement sdlelement)
Converts the given SDLElement into a Curve,
providing it represents one (it has to have "curve" as name, and be an SDL
normal element). |
protected Group |
convertToGroup(kirk.io.sdl.SDLElement sdlelement)
Converts the given SDLElement into a Group,
providing it represents one (it has to have "group" as name, and be an SDL
normal element). |
protected Shape |
convertToShape(kirk.io.sdl.SDLElement sdlelement)
Converts the given SDLElement into a Shape,
providing it represents one (it has to have "shape" as name, and be an SDL
normal element). |
static Group |
readCurveScheme(String filename)
This method reads a Curve Scheme from the given filename. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected CurveReader()
CurveReader.
| Method Detail |
protected Group convert(kirk.io.sdl.SDLDocument sdldocument)
throws CurveReadException
sdldocument - The SDLDocument to convert.
CurveReadException - When the SDL is not a correct Curve Scheme.
protected Group convertToGroup(kirk.io.sdl.SDLElement sdlelement)
throws CurveReadException
SDLElement into a Group,
providing it represents one (it has to have "group" as name, and be an SDL
normal element).
sdlelement - The SDLElement to convert into a
Group.
Group made from the SDLElement.
CurveReadException - When the SDL is not a correct Curve Scheme.
protected Shape convertToShape(kirk.io.sdl.SDLElement sdlelement)
throws CurveReadException
SDLElement into a Shape,
providing it represents one (it has to have "shape" as name, and be an SDL
normal element).
sdlelement - The SDLElement to convert into a
Shape.
Shape made from the SDLElement.
CurveReadException - When the SDL is not a correct Curve Scheme.
protected Curve convertToCurve(kirk.io.sdl.SDLElement sdlelement)
throws CurveReadException
SDLElement into a Curve,
providing it represents one (it has to have "curve" as name, and be an SDL
normal element).
sdlelement - The SDLElement to convert into a
Curve.
Curve made from the SDLElement.
CurveReadException - When the SDL is not a correct Curve Scheme.
protected ControlPoint convertToControlPoint(kirk.io.sdl.SDLElement sdlelement)
throws CurveReadException
SDLElement into a ControlPoint,
providing it represents one (it has to have "controlpoint" as name, and be an
SDL normal element).
sdlelement - The SDLElement to convert into a
ControlPoint.
ControlPoint made from the SDLElement.
CurveReadException - When the SDL is not a correct Curve Scheme.
public static Group readCurveScheme(String filename)
throws IOException,
CurveReadException,
kirk.io.sdl.ESDLReadException
filename - The file to read the Curve Scheme from.
IOException - When file errors happen.
CurveReadException - When the Scheme is incorrect.
kirk.io.sdl.ESDLReadException - When the ESDL structure is incorrect.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||