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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ConnectorfromString(CharBuffer buf, @Nullable org.jhotdraw8.base.converter.IdResolver idResolver) @Nullable Connector@Nullable ConnectorparseConnector(CssTokenizer tt, org.jhotdraw8.base.converter.IdResolver idResolver) Parses a Locator.voidtoString(Appendable out, @Nullable org.jhotdraw8.base.converter.IdSupplier idSupplier, @Nullable Connector value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.base.converter.Converter
fromString, fromString, fromString, fromStringNonNull, fromStringNonNull, fromStringNonNull, fromStringNonNull, getHelpText, needsIdResolver, toString, toString, toString
-
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:
toStringin interfaceorg.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:
fromStringin interfaceorg.jhotdraw8.base.converter.Converter<Connector>- Throws:
ParseException
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceorg.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 tokenizeridResolver-- Returns:
- the parsed color
- Throws:
ParseException- if parsing failsIOException- if IO fails
-