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
-
Constructor Summary
-
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 theRegistry
which is linked with this instance.Return the root node of the GraphObject, i.e. the root of the object loadedvoid
reload()
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 selfvoid
setRootNode
(Node root) Set the rootnode of a GraphObject object.toSelection
(Context ctx) Converts this object into aSelection
.void
Opens the 2d view of the current graphvoid
Opens the 3d view of the current graphvoid
write()
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:GraphObject
Return the root node of the GraphObject, i.e. the root of the object loaded- Specified by:
getRootNode
in interfaceGraphObject
- Returns:
- a Node
-
setRootNode
Description copied from interface:GraphObject
Set the rootnode of a GraphObject object.- Specified by:
setRootNode
in interfaceGraphObject
-
cloneGraph
Description copied from interface:GraphObject
clone the graph of the rootnode and returns it- Specified by:
cloneGraph
in interfaceGraphObject
- Returns:
- Throws:
CloneNotSupportedException
-
write
public void write()Description copied from interface:GraphObject
Override the file GraphObject in the project with its current version. Required on GraphObject created in RGG to be saved- Specified by:
write
in interfaceGraphObject
-
reload
public void reload()Description copied from interface:GraphObject
If the GraphObject uses some modules defined in the project, reload forces the modules in the GraphObject to be relinked after compilation- Specified by:
reload
in interfaceGraphObject
-
view2d
Description copied from interface:GraphObject
Opens the 2d view of the current graph- Specified by:
view2d
in interfaceGraphObject
-
view3d
Description copied from interface:GraphObject
Opens the 3d view of the current graph- Specified by:
view3d
in interfaceGraphObject
-
getName
Description copied from interface:GraphObject
Gives the name if one exists- Specified by:
getName
in interfaceGraphObject
- Returns:
-
describes
Description copied from interface:GraphObject
Gives an array of node types and number contained in the GraphObject- Specified by:
describes
in interfaceGraphObject
- Returns:
-
getGraph
Description copied from interface:GraphObject
Return the graph manager of the GraphObject. It is different from the graph manager of the project & workbench.- Specified by:
getGraph
in interfaceGraphContext
- Specified by:
getGraph
in interfaceGraphManagerContext
- Specified by:
getGraph
in interfaceGraphObject
-
getNode
Description copied from interface:GraphObject
Return a node of the given name- Specified by:
getNode
in interfaceGraphObject
- Parameters:
key
- : the name of the type of node
-
getManageableType
- Specified by:
getManageableType
in interfaceManageable
-
getRegistry
Description copied from interface:RegistryContext
Returns theRegistry
which is linked with this instance.- Specified by:
getRegistry
in interfaceRegistryContext
- Returns:
- the registry linked with this instance
-
produceNode
- Specified by:
produceNode
in interfaceProducingNode
-
resolve
Description copied from interface:GraphObject
Resolves the real object if a reference is used If the real object is used the function returns it self- Specified by:
resolve
in interfaceGraphObject
- Returns:
-
toSelection
Description copied from interface:Selectable
Converts this object into aSelection
.- Specified by:
toSelection
in interfaceSelectable
- Parameters:
ctx
- the UI context- Returns:
- a selection, or
null
if this is not possible
-