MasterScan  Lab_Matlab_control Master Branch
List of all members | Properties and Events | Protected Properties | Methods | Protected Methods
topsTreePanel Class Reference
Inheritance diagram for topsTreePanel:
Inheritance graph
[legend]

Properties and Events

Property autoExpandDepth = 1
 Show an collection of items with a tree browser. More...
 
- Properties and Events inherited from topsPanel
Property isLocked = false
 The bottom-level container for Tower of Psych GUIs. More...
 
Property isBaseItemTitle = false
 whether to show a title for baseItem
 

Protected Properties

Property tree
 the uitree for displaying items connected to baseItem
 
Property treeContainer
 the graphical container of the tree
 
- Protected Properties inherited from topsPanel
Property parentFigure
 the topsFigure that holds this panel
 
Property pan
 the Matlab uipanel
 
Property currentItem
 the "current item" in use in the GUI
 
Property currentItemName
 name to give the "current item"
 
Property baseItem
 the item this panel is representing
 
Property baseItemName
 name to give baseItem
 

Methods

self topsTreePanel (varargin)
 Make a new panel in the given figure. More...
 
 selectItem (self, tree, event)
 Set the GUI current item from a selected node. More...
 
nodes childNodesForExpand (self, tree, value)
 Create new child nodes for an expanded node. More...
 
- Methods inherited from topsPanel
self topsPanel (parentFigure)
 Make a new panel in the given figure. More...
 
 delete (self)
 Clear references to graphics and handle objects.
 
 setBaseItem (self, baseItem, baseItemName)
 Choose the item to represent. More...
 
 setCurrentItem (self, currentItem, currentItemName)
 Choose the current item. More...
 
 refresh (self)
 Refresh the panel's contents.
 

Protected Methods

 initialize (self)
 Create and arrange fresh components.
 
 updateContents (self)
 Refresh the panel's contents.
 
 expandToDepth (self, node, depth)
 Expand tree nodes to the given depth. More...
 
node nodeForItem (self, item, name, subPath)
 Make a new tree node to represent the given item. More...
 
- Protected Methods inherited from topsPanel
 initialize (self)
 Create and arrange fresh components.
 
 updateContents (self)
 Update the panel's contents (used internally)
 
item subItemFromPath (self, subPath)
 Get an item referenced below baseItem. More...
 

Constructor

◆ topsTreePanel()

self topsTreePanel ( varargin  )

Make a new panel in the given figure.

Parameters
parentFiguretopsFigure to work with

Creates a new topsTreePanel. parentFigure must be a topsFigure object, otherwise the panel won't display any content.

Methods

◆ selectItem()

selectItem ( self  ,
tree  ,
event   
)

Set the GUI current item from a selected node.

Parameters
treeuitree object or a "peer" object
eventevent object related to the selection

Sets the value of the current item for the parent figure, based on the selected node.

◆ childNodesForExpand()

nodes childNodesForExpand ( self  ,
tree  ,
value   
)

Create new child nodes for an expanded node.

Parameters
treeuitree object or a "peer" object
valuevalue associated with the expanding node

Must create new uitreenode objects for a node that is currently expanding, based on the value of baseItem, and the sub-path contained by the expanding node.

◆ expandToDepth()

expandToDepth ( self  ,
node  ,
depth   
)
protected

Expand tree nodes to the given depth.

Parameters
nodea uitree node in the tree
depthhow far down to expand the tree

Recursively expands all tree nodes, starting with the given node, as far down as the given depth. If node is the root node, the entire tree can be expanded. If depth is zero, no nodes will be expanded. If depth is one, only the given node will be expanded. If depth is inf, all nodes beneath node will be expanded.

◆ nodeForItem()

node nodeForItem ( self  ,
item  ,
name  ,
subPath   
)
protected

Make a new tree node to represent the given item.

Parameters
itemany item
namestring name for the item
subPathstring sub-path path from baseItem to item

Makes a new uitreenode to represent the given item. subPath must be a string to pass to eval(), which contains a reference from baseItem to this item. For example, if item is located in a field of baseItem named 'data', subPath might be '.data', '(1).data', or similar.

Properties and Events

◆ autoExpandDepth

Property autoExpandDepth = 1

Show an collection of items with a tree browser.

topsTreePanel shows tree that can browse items connected to baseItem. The user can select individual nodes of the tree to set the currentItem for a Tower of Psych GUI. how far to expand the tree automatically when building it


The documentation for this class was generated from the following file: