Search this API

y.view
Interface GenericNodeRealizer.UserDataHandler

All Known Implementing Classes:
SimpleUserDataHandler
Enclosing class:
GenericNodeRealizer

public static interface GenericNodeRealizer.UserDataHandler

This interface is used by GenericNodeRealizer to delegate the copying and serialization/deserialization of any user-defined data to. Registered implementations of this interface will be used to perform the actual serialization and deserialization of the user-defined data object. Additionally, implementations are responsible for creating appropriate copies of the user-defined data.

 

Method Summary
 java.lang.Object copyUserData(NodeRealizer srcContext, java.lang.Object srcData, NodeRealizer targetContext)
          Used as a callback for the GenericNodeRealizer.createCopy(NodeRealizer) method to copy the user data from the original node to the target node.
 java.lang.Object readUserData(NodeRealizer context, java.io.ObjectInputStream ois)
          Used as a callback for the GenericNodeRealizer.read(java.io.ObjectInputStream) method to read the user data from the stream.
 void storeUserData(NodeRealizer context, java.lang.Object userData, java.io.ObjectOutputStream oos)
          Used as a callback for the GenericNodeRealizer.write(java.io.ObjectOutputStream) method to store the user data to the stream.
 

Method Detail

storeUserData

void storeUserData(NodeRealizer context,
                   java.lang.Object userData,
                   java.io.ObjectOutputStream oos)
                   throws java.io.IOException
Used as a callback for the GenericNodeRealizer.write(java.io.ObjectOutputStream) method to store the user data to the stream.

Throws:
java.io.IOException

readUserData

java.lang.Object readUserData(NodeRealizer context,
                              java.io.ObjectInputStream ois)
                              throws java.io.IOException
Used as a callback for the GenericNodeRealizer.read(java.io.ObjectInputStream) method to read the user data from the stream.

Throws:
java.io.IOException

copyUserData

java.lang.Object copyUserData(NodeRealizer srcContext,
                              java.lang.Object srcData,
                              NodeRealizer targetContext)
Used as a callback for the GenericNodeRealizer.createCopy(NodeRealizer) method to copy the user data from the original node to the target node.


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