Class TLcdSVGUnStyledShapeWriter

java.lang.Object
com.luciad.format.svg.ALcdSVGShapeWriter
com.luciad.format.svg.TLcdSVGUnStyledShapeWriter
All Implemented Interfaces:
ILcdSVGShapeWriter

public class TLcdSVGUnStyledShapeWriter extends ALcdSVGShapeWriter
This class is an implementation of ILcdSVGShapeWriter to write a ILcdShape down without extra properties like color, line-width, etc... This class can be set to the TLcdSVGModelEncoder TLcdSVGModelEncoder .
  • Constructor Details

    • TLcdSVGUnStyledShapeWriter

      public TLcdSVGUnStyledShapeWriter()
  • Method Details

    • setClassTraceOn

      public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • isClassTraceOn

      public static boolean isClassTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • writeCircle

      protected void writeCircle(ILcdCircle aCircle, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdCircle to a StringBuffer.
      Specified by:
      writeCircle in class ALcdSVGShapeWriter
      Parameters:
      aCircle - the ILcdCircle element
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writeCircleProperties

      protected void writeCircleProperties(ILcdCircle aCircle, Writer aTarget) throws IOException
      Writes properties specific to a circle object:
      • the position of the center point (x,y)
      • the radius
      .
      Parameters:
      aCircle - the circle to write the properties of.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writePolyline

      protected void writePolyline(ILcdPolyline aPolyline, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdPolyline to a StringBuffer.
      Specified by:
      writePolyline in class ALcdSVGShapeWriter
      Parameters:
      aPolyline - the ILcdPolyline
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writePolylineProperties

      protected void writePolylineProperties(ILcdPolyline aPolyline, Writer aTarget) throws IOException
      Writes properties specific to a polyline object:
      • the position of the points (x,y): x1,y1,x2,y2,x3,y3,
      .
      Parameters:
      aPolyline - the polygon for which to write the properties.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writePolygon

      protected void writePolygon(ILcdPolygon aPolygon, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdPolygon to a StringBuffer.
      Specified by:
      writePolygon in class ALcdSVGShapeWriter
      Parameters:
      aPolygon - the ILcdPolygon
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writePolygonProperties

      protected void writePolygonProperties(ILcdPolygon aPolygon, Writer aTarget) throws IOException
      Writes properties specific to a polygon object:
      • the position of the points (x,y): x1,y1,x2,y2,x3,y3,
      .
      Parameters:
      aPolygon - the polygon for which to write the properties.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writeBounds

      protected void writeBounds(ILcdBounds aBounds, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdBounds to a StringBuffer.
      Specified by:
      writeBounds in class ALcdSVGShapeWriter
      Parameters:
      aBounds - the ILcdBounds
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writeUnknownShape

      protected void writeUnknownShape(ILcdShape aShape, Writer aTarget) throws IOException
      This implementation does nothing. Override this method to export unknown shapes to the writer.
      Specified by:
      writeUnknownShape in class ALcdSVGShapeWriter
      Parameters:
      aShape - a shape that is not part of the set of exported shapes (see ALcdSVGShapeWriter.writeElement(java.lang.Object, java.io.Writer).
      aTarget - the writer to write to.
      Throws:
      IOException - when an I/O error occurred writing this shape. Never in this implementation.
    • writeBoundsProperties

      protected void writeBoundsProperties(ILcdBounds aBounds, Writer aTarget) throws IOException
      Writes properties specific to a bounds (rectangle) object:
      • the coordinates of the bottom left point (x,y)
      • the width
      • the height
      .
      Parameters:
      aBounds - the bounds to write the properties of.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writeText

      protected void writeText(ILcdText aText, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdText to a StringBuffer.
      Specified by:
      writeText in class ALcdSVGShapeWriter
      Parameters:
      aText - the ILcdText
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writeTextProperties

      protected void writeTextProperties(ILcdText aText, Writer aTarget) throws IOException
      Writes properties specific to a text object:
      • the position of the text (x,y)
      • the angle of the text
      .
      Parameters:
      aText - the text to write the properties of.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writeShapeList

      protected void writeShapeList(ILcdShapeList aShapeList, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdShapeList to a StringBuffer.
      Specified by:
      writeShapeList in class ALcdSVGShapeWriter
      Parameters:
      aShapeList - the ILcdShapeList
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writePoint

      protected void writePoint(ILcdPoint aPoint, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdPoint to a StringBuffer. Warning: not a true svg tag shape !
      Specified by:
      writePoint in class ALcdSVGShapeWriter
      Parameters:
      aPoint - the ILcdPoint
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writePointProperties

      protected void writePointProperties(ILcdPoint aPoint, Writer aTarget) throws IOException
      Writes properties specific to a point object:
      • the position (x,y)
      .
      Parameters:
      aPoint - the point for which the properties are to be written.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writeArcBand

      protected void writeArcBand(ILcdArcBand aArcBand, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdArcBand to a StringBuffer. Warning: not a true svg tag shape !
      Specified by:
      writeArcBand in class ALcdSVGShapeWriter
      Parameters:
      aArcBand - the ILcdArcBand
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writeArcBandProperties

      protected void writeArcBandProperties(ILcdArcBand aArcBand, Writer aTarget) throws IOException
      Writes the properties specific to an arcband:
      • center (x,y)
      • minimum radius
      • maximum radius
      • start angle
      • end angle
      .
      Parameters:
      aArcBand - the arcband whose properties to write.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • writeEllipse

      protected void writeEllipse(ILcdEllipse aEllipse, Writer aTarget) throws IOException
      Description copied from class: ALcdSVGShapeWriter
      Appends an ILcdEllipse to a StringBuffer. Warning: not a true svg tag shape !
      Specified by:
      writeEllipse in class ALcdSVGShapeWriter
      Parameters:
      aEllipse - the ILcdEllipse
      aTarget - the StringBuffer
      Throws:
      IOException - when output to aTarget fails.
    • writeEllipseProperties

      protected void writeEllipseProperties(ILcdEllipse aEllipse, Writer aTarget) throws IOException
      Writes properties specific to an ellipse:
      • center (x,y)
      • short axis
      • long axis
      .
      Parameters:
      aEllipse - the Ellipse to write the properties of.
      aTarget - the output sink.
      Throws:
      IOException - when the output fails.
    • createTextStyleAttribute

      protected String createTextStyleAttribute(ILcdText aText)
      Creates the style attribute for a text element from a ILcd2DEditableText. Properties encoded are:
      • horizontal alignment.
      • vertical alignment.
      . If encoding is non standard SVG the properties:
      • character width
      • character height
      are also encoded.
      Parameters:
      aText - ILcd2DEditableText to create the style String for.
      Returns:
      a String representation of the text style.
    • createTextTransformAttribute

      protected String createTextTransformAttribute(ILcdText aText)
      Creates a rotation attribute.
      Parameters:
      aText - ILcd2DEditableText to read the rotation angle from.
      Returns:
      a String representing the rotation attribute.