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 booleanisDestroyedprotected java.util.ArrayList<InterfaceTreeNode>tree_nodes -
Constructor Summary
Constructors Constructor Description AbstractInterfaceObject() -
Method Summary
Modifier and Type Method Description voidclean()Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.voiddestroy()Destroy this object (prepare it to be removed from memory)java.lang.StringgetName()Gets the name for this object.java.lang.StringgetTreeLabel()Returns the label text to appear in a tree node.booleanisDestroyed()Test whether this object has been destroyedInterfaceTreeNodeissueTreeNode()Issues a new tree node and sets it usingsetTreeNode(mgui.interfaces.trees.InterfaceTreeNode).voidsetName(java.lang.String name)Sets the name for this object.voidsetTreeNode(InterfaceTreeNode tree_node)Sets the children for this node'sInterfaceTreeNode.voidupdateTreeNodes()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:CleanableObjectInstructs this object to search its members for any object which has been destroyed, and release the pointer to it.- Specified by:
cleanin 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:
issueTreeNodein interfaceTreeObject- Returns:
- a new
InterfaceTreeNode
-
setTreeNode
Description copied from interface:TreeObjectSets the children for this node'sInterfaceTreeNode.- Specified by:
setTreeNodein interfaceTreeObject
-
getTreeLabel
public java.lang.String getTreeLabel()Description copied from interface:TreeObjectReturns the label text to appear in a tree node.- Specified by:
getTreeLabelin interfaceTreeObject- Returns:
-
updateTreeNodes
public void updateTreeNodes() -
destroy
public void destroy()Description copied from interface:InterfaceObjectDestroy this object (prepare it to be removed from memory)- Specified by:
destroyin interfaceInterfaceObject
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObjectTest whether this object has been destroyed- Specified by:
isDestroyedin interfaceInterfaceObject- Returns:
-
getName
public java.lang.String getName()Description copied from interface:NamedObjectGets the name for this object.- Specified by:
getNamein interfaceNamedObject- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObjectSets the name for this object.- Specified by:
setNamein interfaceNamedObject
-