java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.graph.object.impl.GraphObjectImpl
- All Implemented Interfaces:
GraphContext,GraphManagerContext,GraphObject,ProducingNode,Manageable,Shareable,RegistryContext,Selectable,Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone the graph of the rootnode and returns itGives an array of node types and number contained in the GraphObjectgetGraph()Return the graph manager of the GraphObject.getName()Gives the name if one existsReturn a node of the given nameReturns theRegistrywhich is linked with this instance.Return the root node of the GraphObject, i.e. the root of the object loadedvoidreload()If the GraphObject uses some modules defined in the project, reload forces the modules in the GraphObject to be relinked after compilationresolve()Resolves the real object if a reference is used If the real object is used the function returns it selfvoidsetRootNode(Node root) Set the rootnode of a GraphObject object.toSelection(Context ctx) Converts this object into aSelection.voidOpens the 2d view of the current graphvoidOpens the 3d view of the current graphvoidwrite()Override the file GraphObject in the project with its current version.Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
MIME_TYPE
-
registry
-
-
Constructor Details
-
GraphObjectImpl
public GraphObjectImpl() -
GraphObjectImpl
-
GraphObjectImpl
-
-
Method Details
-
getRootNode
Description copied from interface:GraphObjectReturn the root node of the GraphObject, i.e. the root of the object loaded- Specified by:
getRootNodein interfaceGraphObject- Returns:
- a Node
-
setRootNode
Description copied from interface:GraphObjectSet the rootnode of a GraphObject object.- Specified by:
setRootNodein interfaceGraphObject- Parameters:
root-
-
cloneGraph
Description copied from interface:GraphObjectclone the graph of the rootnode and returns it- Specified by:
cloneGraphin interfaceGraphObject- Returns:
- Throws:
CloneNotSupportedException
-
write
public void write()Description copied from interface:GraphObjectOverride the file GraphObject in the project with its current version. Required on GraphObject created in RGG to be saved- Specified by:
writein interfaceGraphObject
-
reload
public void reload()Description copied from interface:GraphObjectIf the GraphObject uses some modules defined in the project, reload forces the modules in the GraphObject to be relinked after compilation- Specified by:
reloadin interfaceGraphObject
-
view2d
Description copied from interface:GraphObjectOpens the 2d view of the current graph- Specified by:
view2din interfaceGraphObject- Parameters:
ctx-
-
view3d
Description copied from interface:GraphObjectOpens the 3d view of the current graph- Specified by:
view3din interfaceGraphObject- Parameters:
ctx-
-
getName
Description copied from interface:GraphObjectGives the name if one exists- Specified by:
getNamein interfaceGraphObject- Returns:
-
describes
Description copied from interface:GraphObjectGives an array of node types and number contained in the GraphObject- Specified by:
describesin interfaceGraphObject- Returns:
-
getGraph
Description copied from interface:GraphObjectReturn the graph manager of the GraphObject. It is different from the graph manager of the project invalid input: '&' workbench.- Specified by:
getGraphin interfaceGraphContext- Specified by:
getGraphin interfaceGraphManagerContext- Specified by:
getGraphin interfaceGraphObject- Returns:
-
getNode
Description copied from interface:GraphObjectReturn a node of the given name- Specified by:
getNodein interfaceGraphObject- Parameters:
key- : the name of the type of node
-
getManageableType
- Specified by:
getManageableTypein interfaceManageable
-
getRegistry
Description copied from interface:RegistryContextReturns theRegistrywhich is linked with this instance.- Specified by:
getRegistryin interfaceRegistryContext- Returns:
- the registry linked with this instance
-
produceNode
- Specified by:
produceNodein interfaceProducingNode
-
resolve
Description copied from interface:GraphObjectResolves the real object if a reference is used If the real object is used the function returns it self- Specified by:
resolvein interfaceGraphObject- Returns:
-
toSelection
Description copied from interface:SelectableConverts this object into aSelection.- Specified by:
toSelectionin interfaceSelectable- Parameters:
ctx- the UI context- Returns:
- a selection, or
nullif this is not possible
-