java.lang.Object
org.jhotdraw8.draw.io.AbstractInputFormat
org.jhotdraw8.draw.io.SimpleXmlReader
- All Implemented Interfaces:
ClipboardInputFormat,InputFormat
This reader does not support
FigureFactory.nodeListToValue(MapAccessor, List).-
Constructor Summary
ConstructorsConstructorDescriptionSimpleXmlReader(@NonNull FigureFactory figureFactory, @NonNull org.jhotdraw8.base.converter.IdFactory idFactory, @Nullable String namespaceURI) -
Method Summary
Modifier and TypeMethodDescription@NonNull org.jhotdraw8.base.converter.IdFactoryread(@NonNull InputStream in, @Nullable Drawing drawing, @Nullable URI documentHome, @NonNull WorkState<Void> workState) Reads figures from an input stream and adds them to the specified drawing.read(@NonNull Reader in, @Nullable Drawing drawing, @Nullable URI documentHome, @NonNull WorkState<Void> workState) read(javafx.scene.input.Clipboard clipboard, DrawingModel model, Drawing drawing, @Nullable Figure parent) Reads a Drawing from the clipboard.voidsetFigureFactory(@NonNull FigureFactory figureFactory) protected voidvoidsetLayerFactory(Supplier<Layer> layerFactory) voidsetNamespaceURI(@Nullable String namespaceURI) Methods inherited from class org.jhotdraw8.draw.io.AbstractInputFormat
getOptions, setOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.io.InputFormat
read, read
-
Constructor Details
-
SimpleXmlReader
public SimpleXmlReader(@NonNull FigureFactory figureFactory, @NonNull org.jhotdraw8.base.converter.IdFactory idFactory, @Nullable String namespaceURI)
-
-
Method Details
-
getIdFactory
-
getLayerFactory
-
setLayerFactory
-
read
public @NonNull Figure read(@NonNull InputStream in, @Nullable Drawing drawing, @Nullable URI documentHome, @NonNull WorkState<Void> workState) throws IOException Description copied from interface:InputFormatReads figures from an input stream and adds them to the specified drawing.- Specified by:
readin interfaceInputFormat- Parameters:
in- The input stream.drawing- If you provide a non-null value, the contents of the file is added to the drawing. Otherwise a new drawing is created.documentHome- the URI used to resolve external references from the documentworkState- for progress monitoring and cancelling the operation- Returns:
- the drawing
- Throws:
IOException- if an IO error occurs
-
read
public @Nullable Figure read(@NonNull Reader in, @Nullable Drawing drawing, @Nullable URI documentHome, @NonNull WorkState<Void> workState) throws IOException - Throws:
IOException
-
read
public SequencedSet<Figure> read(javafx.scene.input.Clipboard clipboard, DrawingModel model, Drawing drawing, @Nullable Figure parent) throws IOException Description copied from interface:ClipboardInputFormatReads a Drawing from the clipboard.- Specified by:
readin interfaceClipboardInputFormat- Parameters:
clipboard- The clipboard.model- the drawing model over which updates of the drawing must be performed.drawing- The contents of the clipboard is added to this drawing.parent- If you provide a non-null value, the contents of the clipboard is added to this parent. Otherwise, the content is added into an unspecified layer.- Returns:
- the figures that were read from the clipboard
- Throws:
IOException- if an IO error occurs
-
setFigureFactory
-
setId
-
setNamespaceURI
-