Search this API

y.io.graphml.graph2d
Class NodeLabelSerializer.SmartNodeLabelModelSerializer

java.lang.Object
  extended by y.io.graphml.graph2d.NodeLabelSerializer.SmartNodeLabelModelSerializer
All Implemented Interfaces:
java.util.EventListener, SerializationHandler
Enclosing class:
NodeLabelSerializer

public static class NodeLabelSerializer.SmartNodeLabelModelSerializer
extends java.lang.Object
implements SerializationHandler

Handles serialization of SmartNodeLabelModel instances and their model parameters.

 

Constructor Summary
NodeLabelSerializer.SmartNodeLabelModelSerializer()
           
 
Method Summary
 void onHandleSerialization(SerializationEvent event)
          Callback method to handle the serialization of the data contained in event.
protected  void serializeModel(SmartNodeLabelModel model, XmlWriter writer, GraphMLWriteContext context)
          Serializes SmartNodeLabelModel instances with their fields.
protected  void serializeParameter(y.view.SmartNodeLabelModel.ModelParameter parameter, XmlWriter writer, GraphMLWriteContext context)
          Serializes the model parameter of SmartNodeLabelModel instances with all its fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeLabelSerializer.SmartNodeLabelModelSerializer

public NodeLabelSerializer.SmartNodeLabelModelSerializer()
Method Detail

onHandleSerialization

public void onHandleSerialization(SerializationEvent event)
                           throws GraphMLWriteException
Description copied from interface: SerializationHandler
Callback method to handle the serialization of the data contained in event.

If this callback could serialize the data in event, it should set the SerializationEvent.setHandled(boolean) property to true to prevent further serialization code from processing this data.

Specified by:
onHandleSerialization in interface SerializationHandler
Parameters:
event - Event that contains all data that is needed for serialization.
Throws:
GraphMLWriteException

serializeParameter

protected void serializeParameter(y.view.SmartNodeLabelModel.ModelParameter parameter,
                                  XmlWriter writer,
                                  GraphMLWriteContext context)
Serializes the model parameter of SmartNodeLabelModel instances with all its fields.

Parameters:
parameter - The model parameter of SmartNodeLabelModel to write
writer - The writer to use
context - The current write context

serializeModel

protected void serializeModel(SmartNodeLabelModel model,
                              XmlWriter writer,
                              GraphMLWriteContext context)
Serializes SmartNodeLabelModel instances with their fields.

Parameters:
model - The SmartNodeLabelModel to write
writer - The writer to use
context - The current write context

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.