FreeHEP API
Version current

org.freehep.graphicsio.cgm
Class CGMTag

java.lang.Object
  extended byorg.freehep.util.io.Tag
      extended byorg.freehep.graphicsio.cgm.CGMTag
Direct Known Subclasses:
AlternateCharacterSetIndex, AppendText, ApplicationData, AspectSourceFlags, AuxiliaryColor, BackgroundColor, BeginFigure, BeginMetafile, BeginPicture, BeginPictureBody, BeginSegment, CellArray, CGMDummyTag, CharacterCodingAnnouncer, CharacterExpansionFactor, CharacterHeight, CharacterOrientation, CharacterSetIndex, CharacterSetList, CharacterSpacing, Circle, CircularArc3Point, CircularArcCentre, ClipIndicator, ClipRectangle, ColorIndexPrecision, ColorPrecision, ColorSelectionMode, ColorTable, ColorValueExtent, ConnectingEdge, EdgeBundleIndex, EdgeCap, EdgeColor, EdgeJoin, EdgeType, EdgeVisibility, EdgeWidth, EdgeWidthSpecificationMode, Ellipse, EndFigure, EndMetafile, EndPicture, EndSegment, Escape, FillBundleIndex, FillColor, FillReferencePoint, FontList, GeneralizedDrawingPrimitive, HatchIndex, IndexPrecision, IntegerPrecision, InteriorStyle, InteriorStyleSpecificationMode, LineBundleIndex, LineCap, LineColor, LineJoin, LineType, LineWidth, LineWidthSpecificationMode, MarkerBundleIndex, MarkerColor, MarkerSize, MarkerSizeSpecificationMode, MarkerType, MaximumColorIndex, MaximumVDCExtent, Message, MetafileDefaultsReplacement, MetafileDescription, MetafileElementList, MetafileVersion, MitreLimit, NamePrecision, NoOp, PatternIndex, PatternSize, PatternTable, PolygonSet, Polyline, RealPrecision, Rectangle, ScalingMode, SegmentPriorityExtent, TextAlignment, TextBundleIndex, TextColor, TextFontIndex, TextPath, TextPrecision, Transparency, TransparentCellColour, VDCExtent, VDCIntegerPrecision, VDCRealPrecision, VDCType

public abstract class CGMTag
extends Tag

CGM specific tag, from which all other CGM Tags inherit.

Version:
$Id: CGMTag.java,v 1.3 2003/12/01 16:54:17 duns Exp $
Author:
Mark Donszelmann, Charles Loomis
Source Code:
CGMTag.java

Field Summary
 
Fields inherited from class org.freehep.util.io.Tag
DEFAULT_TAG
 
Constructor Summary
protected CGMTag(int elementClass, int id, int version)
          Constructs a CGMTag.
 
Method Summary
 CGMTag read(int tagID, CGMInputStream cgm, int len)
           
 Tag read(int tagID, TaggedInputStream input, int len)
          This reads the information from the given input and returns a new Tag
 String toString()
           
 void write(int tagID, CGMOutputStream cgm)
          Writes the extra tag information to the outputstream in binary format.
abstract  void write(int tagID, CGMWriter cgm)
          Writes the full tag to the Writer in Clear Text format.
 void write(int tagID, TaggedOutputStream output)
          This writes the information to the given output
 
Methods inherited from class org.freehep.util.io.Tag
getName, getTag, getTagType, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CGMTag

protected CGMTag(int elementClass,
                 int id,
                 int version)
Constructs a CGMTag.

Parameters:
elementClass - class of the element
id - id of the element
version - cgm version in which this element was first supported
Method Detail

read

public Tag read(int tagID,
                TaggedInputStream input,
                int len)
         throws IOException
Description copied from class: Tag
This reads the information from the given input and returns a new Tag

Specified by:
read in class Tag
Throws:
IOException

read

public CGMTag read(int tagID,
                   CGMInputStream cgm,
                   int len)
            throws IOException
Throws:
IOException

write

public void write(int tagID,
                  TaggedOutputStream output)
           throws IOException
Description copied from class: Tag
This writes the information to the given output

Specified by:
write in class Tag
Throws:
IOException

write

public void write(int tagID,
                  CGMOutputStream cgm)
           throws IOException
Writes the extra tag information to the outputstream in binary format. This implementation writes nothing, but concrete tags may override this method. This method is called just after the TagHeader is written.

Parameters:
tagID - id of the tag
cgm - Binary CGM output stream
Throws:
IOException

write

public abstract void write(int tagID,
                           CGMWriter cgm)
                    throws IOException
Writes the full tag to the Writer in Clear Text format.

Parameters:
tagID - id of the tag
cgm - Clear Text CGM Writer
Throws:
IOException

toString

public String toString()
Specified by:
toString in class Tag
Returns:
a description of the tagName and tagID

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.