Package mgui.interfaces
Class AbstractInterfaceObject
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
- All Implemented Interfaces:
InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
- Direct Known Subclasses:
AbstractEnvironmentDataSource
,AbstractGraphEdge
,AbstractGraphNode
,AbstractNetworkComponent
,Attribute
,AttributeList
,Axes3D
,Camera3D
,Camera3D.CameraLightSource
,ClipPlane
,ColourMap
,DataConnection
,DataField
,DataQuery
,DataSource
,DataTable
,DataTableSet
,Function
,Graphic2DGrid
,GraphShape
,InterfaceAbstractModel
,InterfaceNeuroAtlas
,InterfacePlotObject
,InterfaceProject
,InterfaceShape
,InterfaceShape.VertexDataSet
,InterfaceWorkspace
,InterfaceWorkspace.CollectionTreeNode
,LayoutDocument
,LayoutItem
,LinkedDataStream
,Map
,NameMap
,PathDataRenderer
,PipelineProcessLibrary
,PipelineTask
,ProjectDataItem
,ProjectDirectory
,ProjectInstance
,ProjectInstanceGroup
,PulseTrainUpdater.CurrentPulse
,PulseTrainUpdater.CurrentPulse
,SgtAxis
,ShapeModel3D
,ShapeSelectionSet
,SimpleEnvironment
,SimpleEnvironmentUpdater
,VariableInt
,VertexDataColumn
,VertexSelection
,Video
,View3D
public abstract class AbstractInterfaceObject extends java.lang.Object implements InterfaceObject
Abstract class which acts as the base class for all "interface" objects; i.e., objects which provide
an interface between user and the underlying model. Provides generic implementations for tree nodes
and object destruction.
- Since:
- 1.0.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isDestroyed
protected java.util.ArrayList<InterfaceTreeNode>
tree_nodes
-
Constructor Summary
Constructors Constructor Description AbstractInterfaceObject()
-
Method Summary
Modifier and Type Method Description void
clean()
Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.void
destroy()
Destroy this object (prepare it to be removed from memory)java.lang.String
getName()
Gets the name for this object.java.lang.String
getTreeLabel()
Returns the label text to appear in a tree node.boolean
isDestroyed()
Test whether this object has been destroyedInterfaceTreeNode
issueTreeNode()
Issues a new tree node and sets it usingsetTreeNode(mgui.interfaces.trees.InterfaceTreeNode)
.void
setName(java.lang.String name)
Sets the name for this object.void
setTreeNode(InterfaceTreeNode tree_node)
Sets the children for this node'sInterfaceTreeNode
.void
updateTreeNodes()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
isDestroyed
protected boolean isDestroyed -
tree_nodes
-
-
Constructor Details
-
AbstractInterfaceObject
public AbstractInterfaceObject()
-
-
Method Details
-
clean
public void clean()Description copied from interface:CleanableObject
Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.- Specified by:
clean
in interfaceCleanableObject
-
issueTreeNode
Issues a new tree node and sets it usingsetTreeNode(mgui.interfaces.trees.InterfaceTreeNode)
. The tree node is stored in this object, which facilitates their destruction when necessary (e.g., when this object is destroyed). All issued tree nodes can informed of changes to their user object using the methodupdateTreeNodes()
.- Specified by:
issueTreeNode
in interfaceTreeObject
- Returns:
- a new
InterfaceTreeNode
-
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
-
getTreeLabel
public java.lang.String getTreeLabel()Description copied from interface:TreeObject
Returns the label text to appear in a tree node.- Specified by:
getTreeLabel
in interfaceTreeObject
- Returns:
-
updateTreeNodes
public void updateTreeNodes() -
destroy
public void destroy()Description copied from interface:InterfaceObject
Destroy this object (prepare it to be removed from memory)- Specified by:
destroy
in interfaceInterfaceObject
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObject
Test whether this object has been destroyed- Specified by:
isDestroyed
in interfaceInterfaceObject
- Returns:
-
getName
public java.lang.String getName()Description copied from interface:NamedObject
Gets the name for this object.- Specified by:
getName
in interfaceNamedObject
- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObject
Sets the name for this object.- Specified by:
setName
in interfaceNamedObject
-