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
 Object copyUserData(NodeRealizer srcContext, 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.
 Object readUserData(NodeRealizer context, 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, Object userData, 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,
                   Object userData,
                   ObjectOutputStream oos)
                   throws IOException
Used as a callback for the GenericNodeRealizer.write(java.io.ObjectOutputStream) method to store the user data to the stream.

Throws:
IOException

readUserData

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

Throws:
IOException

copyUserData

Object copyUserData(NodeRealizer srcContext,
                    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-2013,
yWorks GmbH.
All rights reserved.