Class ConnectorXmlConverter

java.lang.Object
org.jhotdraw8.draw.xml.converter.ConnectorXmlConverter
All Implemented Interfaces:
org.jhotdraw8.base.converter.Converter<Connector>

public class ConnectorXmlConverter extends Object implements org.jhotdraw8.base.converter.Converter<Connector>
XmlConnectorConverter.

This converter supports the following connectors:

  • PathConnector
  • RectangleConnector
  • EllipseConnector
Author:
Werner Randelshofer
  • Constructor Details

    • ConnectorXmlConverter

      public ConnectorXmlConverter()
  • Method Details

    • toString

      public void toString(Appendable out, @Nullable org.jhotdraw8.base.converter.IdSupplier idSupplier, @Nullable Connector value) throws IOException
      Specified by:
      toString in interface org.jhotdraw8.base.converter.Converter<Connector>
      Throws:
      IOException
    • fromString

      public @Nullable Connector fromString(CharBuffer buf, @Nullable org.jhotdraw8.base.converter.IdResolver idResolver) throws ParseException
      Specified by:
      fromString in interface org.jhotdraw8.base.converter.Converter<Connector>
      Throws:
      ParseException
    • getDefaultValue

      public @Nullable Connector getDefaultValue()
      Specified by:
      getDefaultValue in interface org.jhotdraw8.base.converter.Converter<Connector>
    • parseConnector

      public @Nullable Connector parseConnector(CssTokenizer tt, org.jhotdraw8.base.converter.IdResolver idResolver) throws ParseException, IOException
      Parses a Locator.
      Parameters:
      tt - the tokenizer
      idResolver -
      Returns:
      the parsed color
      Throws:
      ParseException - if parsing fails
      IOException - if IO fails