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 TypeMethodDescriptionfromString(@NonNull CharBuffer buf, @Nullable org.jhotdraw8.base.converter.IdResolver idResolver) parseConnector(@NonNull CssTokenizer tt, org.jhotdraw8.base.converter.IdResolver idResolver) Parses a Locator.voidtoString(@NonNull 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, getHelpText, needsIdResolver, toString, toString, toString
-
Constructor Details
-
ConnectorXmlConverter
public ConnectorXmlConverter()
-
-
Method Details
-
toString
public void toString(@NonNull 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(@NonNull 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(@NonNull 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
-