Container with a layout manager.
active | If false: This frame is invisible | Visibility of this frame. Boolean, default value: true If true: This frame is visible |
allowsChildren | Boolean, default value: true | True if the node is able to have children. |
backgroundcolor | RGB triple, default value [] | The background of the frame. |
border | A modelit.layout.AbstractPainter implementation | The frame's border. |
children (Read-only) | Array, default value: [] | Array of children, May be [] if this node has no children. Children are ordered according to their rank. NOTE: get.children(obj) returns children sorted in rank order. |
clipframe | A modelit.layout.Frame, default value [] | The clipframe. Components outside this frame are hidden |
clipping | Boolean, default value false | The clipping mode. If true, clip components to clipframe, if false do not clip. |
enable | If false: This frame is disabled | The enable status of this frame. Boolean, default value: true If true: This frame is enabled |
exitfunction | Function handle, default value: []. | Function that is called when frame becomes inactive. |
foregroundcolor | RGB triple, default value [] | The foreground color (text color) of the frame. |
lineprops | Struct, default value: []. | Property of line, if used as border. See Matlab - line for more information. Example: lm_lineprops('color','k','shadowed',0 ),... set 'shadowed' to true for a shadow effect created by drawing a second line. |
maxpixelsize | 1x2 array, default value: [Inf Inf] | Maximum pixelsize of this frame. |
minmarges | 1x4 array: default value: [0 0 0 0] | Margin in pixels for this frame [LEFT LOWER RIGHT UPPER]. The margin is relative to the parent frame |
normposition | Note: Only for the root frame | Normalized position of the root frame [x y width height]. 1x4 array, default value: [] |
normsize | this case the normalized size will be computed form the active siblings. | Normalized size of the frame. 1x2 array: Default value: [1 1] NOTE: One may specify NaN for 1 or both dimensions. In |
outborderpos | The outer limits of this Frame. | |
painter | A modelit.layout.AbstractPainter implementation | A background painter. |
parent | modelit.layout.Node or [], default value: [] | This node's parent, or empty if this node has no parent. |
patchprops | Struct, default value: []. | Property of background patch. See Matlab - patch for more information. Example: lm_patchprops('facecolor',C.WINCOLOR,'linewidth',1) |
pixelposition | Note: Only for the root frame | Pixelposition of the root frame [x y width height]. 1x4 array: default value: [] |
pixelsize | this case the pixelsize will be computed form the active siblings. | Size of the frame in pixels. 1x2 array, Default value: [0 0] NOTE: One may specify NaN for one or both dimensions. In |
rank | Integer, default value: 0 | Relative position of the node. When ordering horizontally: Low rank goes left. High rank goes right. When ordering vertically. Low rank goes on top. High rank goes below. NOTE: only the relative ranks are important. |
signature (Read-only) | Unique numeric signature (within objects of class Node) | |
splithor | If false: Children will be stacked vertically. | Orientation of this frame. Boolean: default value: true. If true: Children will be stacked horizontally. |
tag | String, default value: ''. | String with user specified object identifier. Use this tag i.c.w. gch('tag', parent) to find a modelit.layout.Frame |
title | modelit.layout.Title, default value: '' | Frame title. |
userdata | Array, default value: [] | User specified data for this frame. |
modelit.layout.Frame constructor
obj = modelit.layout.Frame No input arguments ==> create frame with gcf as parent obj = modelit.layout.Frame(PARENT, varargin) First arguments obj = modelit.layout.Frame(HANDLE) 1 input argument that defines parent frame
parent | any | parent frame or figure (presumably other types of parent not allowed) |
varargin | any | parameter-value pairs, see the component properties for a description of the parameters and their values |
obj | any | modelit.layout.Frame Documentation for Frame/Frame doc Frame |
Removes all components in this frame.
removeComponents(obj, excepted)
obj | any | modelit.layout.Frame excepted (optional, default value: []): array with handles of components that should not be removed |
No output
ZIJPP 20171019: method added
Remove this frame from the tree.
remove(obj)
obj | any | modelit.layout.Frame |
No output
Returns the number of components in this frame.
value = getComponentCount(obj)
obj | any | modelit.layout.Frame |
value | any | integer with the number of components in this frame |
Returns this frame's components.
value = getComponents(obj)
obj | any | modelit.layout.Frame |
value | any | list of handles with this frame's components. |
Show debug information on the console.
stackdisp(obj)
obj | any | <modelit.layout.Frame> |
The source code line and filename that creates this frame is plotted on the console, inclusing stack and hyperlinks.
Returns the handle of the closest ancestor of the frame that matches one of the types in type,
p = ancestor(obj, type)
obj | any | modelit.layout.Frame |
type | any | String or cell array of strings (types) |
p | any | handle of the closest ancestor of the frame that matches one of the types in type |
Get application data of this frame.
value = getappdata(obj, property)
obj | any | modelit.layout.Frame |
property | any | string of application data field |
value | any | application data stored in application data field |
Set application data of this frame.
value = getappdata(obj, property)
obj | any | modelit.layout.Frame |
property | any | string of application data field |
value | any | application data to be stored in application data field |
No output
Calculate inner margins. There are the margins as specified by the user corrected with the space required for the title and border.
[lineMargin, contentMargin] = innerMargins(obj)
obj | any | <modelit.layout.Frame> |
lineMargin | any | <1x4 array> |
contentMargin | any | <1x4 array> |
Calculate the inner border. This is the outborderpos corrected with the innerMargins.
[lineBorder, contentBorder] = innerBorders(obj)
obj | any | <modelit.layout.Frame> |
lineBorder | any | <1x4 array> |
contentBorder | any | <1x4 array> |
Add a component to a modelit.layout.Frame
addComponent(hframe, hobj, varargin)
hobj : object or array of handles or jacontrol object
hframe | any | frame to link to |
property | any | char string containg property name |
value | any | corresponding property value. Note: property/value combinations may als be passed on as a tructure. <propertye, value> clipframe see lm_resize clipping [0 or 1] clip object if out of frame borders enable Default: enable status is copied from application data "enable" from frame. Note <on> and <off> is supported. <inactive> is not supported. Object | Frame enabled | enabled status 'Frame=on' 'Frame=off' 'Frame=inactive' ========================================== 0 ==> 'off' 'off' <not supported> 1 ==> 'on' 'off' <not supported> 2 ==> 'inactive' 'off' <not supported> 3 ==> 'off' 'off' <not supported> 4 ==> 'on' 'on' <not supported> 5 ==> 'inactive' 'inactive' <not supported> keeppixelsize : is 1 maintain pixel height and width while alignigning in matrix keepypos: if 1 ==> position of slider has no effect on this object normpos [X,Y,WIDTH,HEIGHT] normalized position relative to LL corner of frame pixelpos [X,Y,WIDTH,HEIGHT] pixel position relative to LL corner of frame visible 0 ==> do not show 1 ==> show row: align on position (row,col) in matrix col: align on position (row,col) in matrix |
none AFFECTED OBJECTS -1- affected application data of frame: when an object is linked to a frame, this will affect the following fields of application data of this frame: uichildren textchildren children javachildren -2- affected properties of object: parent: when object-parent differs from frame-parent units : set to "pixel" when object is of type text,uicontainer,hgjavacomponent -3- affected application data of object, required: normpos pixelpos visible enable clipping keepypos -4- affected application data of object, optional: clipframe row col keeppixelsize
Compute the clipping rectangle.
rect = getClipRectangle(obj)
obj | any | <modelit.layout.Frame> |
rect | any |
Initialise de variabele 'inborderpos' voor de frames die geen parent hebben In tegenstelling tot frames met een parent, wordt hier de positie bepaald door de elementen normpos en normpix, waarbij met broers en zussen geen rekening wordt gehouden normpix wordt vermenigvuldigd met de afmetingen van het scherm pixelsize wordt daarbij opgeteld
[FrameData, hax] = initializeTreetops(FrameData, hfig)
FrameData | any | modelit.layout.Frame |
hfig | any | handle of figure |
FrameData | any | |
hax | any |
Hide all components and decorators of this frame
hide(obj)
obj | any | modelit.layout.Frame |
No output
Position and plot all components in this frame.
plotFrame(frame)
frame | any | modelit.layout.Frame |
No output
Calculate position of frame. - Set slider attributes for kth frame. - Set outborder positions for all children of kth frame.
splitFrameFast(FrameData, FrameDataParentIndx, pixelsizes, k)
obj | any | <modelit.layout.Frame> |
No direct output
ChildFrames | any | sub-frames met bijgewerkte eigenschappen: activenode inborderpos outborderpos |
showslider | any | true wanneer hoogte viewport<required |
VERTICALSHIFT | any | verticale verschuiving oiv slider |
Get the implied pixelsizes of all frame. Note that another methods computes the implied size of a single frame (method: impliedpixelsize)
pixelsizes = pixelsizeFast(FrameData, FrameDataParentIndx)
FrameData | any | Nx1 list of frames. Sorted with root first. FrameDataParentIndx Nx1 list of indices in Framedata |
Compute implied pixel size of frame or frames. Note that method "pixelsizeFast" does the same faster if all pixelsizes are required.
value = impliedpixelsize(obj)
Update handle graphics properties of object and frame
Determines if this node is active. This method is used by the activenode property getter and can be overridden by subclasses.
value = isActivenode(obj)
obj | any | <modelit.layout.Frame> |
value | any | <boolean>, if true this frame if active (visible) |
Removes all components in this frame
removeAll(obj)
obj | any | modelit.layout.Frame excepted (optional, default value: []): array with handles of components that should not be removed |
No output
Find a Frame with the specified tag
h = find(tag, HWIN)
tag | any | string with tag of Frame to look for |
HWIN | any | handle of figure in which to look for the Frame |
h | any | Array of modelit.layout.Frame, possible empty if no Frame with specified tag exists |
Stores the tree (root node) in the specified figure
layout = storeTree(HWIN)
HWIN | any | handle of figure in which to store the tree. |
layout | any | modelit.layout.Frame with the root of the tree |
No output
Retrieves the tree (root node) from the specified figure
layout = retrieveTree(HWIN)
HWIN | any | handle of figure in which the tree is stored. |
layout | any | modelit.layout.Frame with the root of the tree |
Helper for migration to new layout manager
Helper for migration to new layout manager
Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.
value = getPathToRoot(obj)
obj | any | modelit.layout.Node |
value | any | list of modelit.layout.Node Help for Frame/getPathToRoot is inherited from superclass modelit.layout.Node |
Returns the number of levels above this node, i.e. the distance from the root to this node.
value = getLevel(obj)
obj | any | modelit.layout.Node |
value | any | integer Help for Frame/getLevel is inherited from superclass modelit.layout.Node |
Creates a list on nodes in depth-first order for the subtree starting at the specified node.
list = getDepthFirstList(obj, list)
obj | any | modelit.layout.Node |
list | any | array of modelit.layout.Node in depth-first order Help for Frame/getDepthFirstList is inherited from superclass modelit.layout.Node |
Creates a list on nodes in breadth-first order for the subtree starting at the specified node.
list = getBreadthFirstList(obj)
obj | any | <modelit.layout.Node> |
list | any | <array of modelit.layout.Node> in breadth-first order Help for Frame/getBreadthFirstList is inherited from superclass modelit.layout.Node |
Determine if a node is active.
selectindx = isactivenode(list, parentIndex)
list | any | Nx1 array of Frames |
parentIndex | any | Nx1 array of parent index |
selectindx | any | Mx1 array, index in list, sorted according to parent and rank. Sorting is essential for correct display. Help for Frame/isactivenode is inherited from superclass modelit.layout.Node |
Create list of active frames only, see getBreadthFirstList.
list = getBreadthFirstList(obj)
obj | any | modelit.layout.Node |
list | any | array of modelit.layout.Node in breadth-first order Help for Frame/getBreadthFirstListActive is inherited from superclass modelit.layout.Node |
Returns the previous sibling of this node. Returns [] if this node has no parent or if it is the parent's first child.
value = getPreviousSibling(obj)
obj | any | modelit.layout.Node |
value | any | modelit.layout.Node or [] Help for Frame/getPreviousSibling is inherited from superclass modelit.layout.Node |
Returns the next sibling of this node. Returns [] if this node has no parent or if it is the parent's last child.
value = getNextSibling(obj)
obj | any | modelit.layout.Node |
value | any | modelit.layout.Node or [] Help for Frame/getNextSibling is inherited from superclass modelit.layout.Node |
Gets the siblings (nodes with the same parent) of this node. Note that this node is its own sibling
value = getSiblings(obj)
obj | any | modelit.layout.Node |
value | any | modelit.layout.Node Help for Frame/getSiblings is inherited from superclass modelit.layout.Node |
Move a child of this frame to another frame.
moveChild(obj, child, newparent)
obj | any | modelit.layout.Node |
child | any | modelit.layout.Node |
newparent | any | modelit.layout.Node |
Child is removed from this frame and add as a child to the new parent frame. Help for Frame/moveChild is inherited from superclass modelit.layout.Node
Removes all of this node's children.
removeAllChildren(obj)
obj | any | modelit.layout.Node |
No output Help for Frame/removeAllChildren is inherited from superclass modelit.layout.Node
Returns true if this node is the root of the tree.
obj = isRoot(obj)
obj | any | modelit.layout.Node |
value | any | boolean, true if this node is a root node Help for Frame/isRoot is inherited from superclass modelit.layout.Node |
Returns true if this node is a leaf.
value = isLeaf(obj)
obj | any | modelit.layout.Node |
value | any | boolean, true if this node is a leaf (has no children) Help for Frame/isLeaf is inherited from superclass modelit.layout.Node |
Returns the root of this node.
obj = getRoot(obj)
obj | any | modelit.layout.Node |
obj | any | modelit.layout.Node Help for Frame/getRoot is inherited from superclass modelit.layout.Node |
Returns the index of this node in its parent's children.
value = getIndex(obj)
obj | any | modelit.layout.Node |
value | any | integer with index of this node in its parent's children, 0 if this node is a root Help for Frame/getIndex is inherited from superclass modelit.layout.Node |
Returns the number of children of this node.
value = getChildCount(obj)
obj | any | modelit.layout.Node |
value | any | integer with number of children of this node Help for Frame/getChildCount is inherited from superclass modelit.layout.Node |
Returns the child of obj at index childIndex.
value = getChildAt(obj, childIndex)
obj | any | modelit.layout.Node |
childIndex | any | integer |
obj | any | modelit.layout.Node or [] if index exceeds number of children Help for Frame/getChildAt is inherited from superclass modelit.layout.Node |
Returns the childs in sorted order.
value = getChildAt(obj, childIndex)
obj | any | modelit.layout.Node |
childIndex | any | integer |
obj | any | modelit.layout.Node or [] if index exceeds number of children Help for Frame/getSortedChildren is inherited from superclass modelit.layout.Node |
Returns the objects whose property values match those passed as param-value pairs to the findobj command. Help for Frame/eq is inherited from superclass modelit.layout.Node
Returns the objects whose property values match those passed as param-value pairs to the findobj command. Help for Frame/findobj is inherited from superclass modelit.layout.Node
Each node has its own unique numeric signature Help for Frame/ismember is inherited from superclass modelit.layout.Node
DOUBLE Convert to double precision. DOUBLE(X) returns the double precision value for X. If X is already a double precision array, DOUBLE has no effect. DOUBLE is called for the expressions in FOR, IF, and WHILE loops if the expression isn't already double precision. DOUBLE should be overloaded for all objects where it makes sense to convert it into a double precision value. See also SINGLE, DATATYPES, ISFLOAT, ISNUMERIC.
Removes newChild from its parent and makes it a child of this node by adding it to the end of this node's child array.
add(obj, newChild)
obj | any | modelit.layout.Node |
newChild | any | modelit.layout.Node, node to be added as a child of obj |
No output Help for Frame/add is inherited from superclass modelit.layout.Node