# TreeMapModel

interface TreeMapModel<N, Row, Column> : TreeMapAccessor<N>

Main interface for the model part of TreeMap.

#### Parameters

the type of columns

#### Inheritors

AbstractTreeMapModel

## Properties

colorColumns
Link copied to clipboard
abstract val colorColumns: Iterable<Column?>
colorFactory
Link copied to clipboard
abstract val colorFactory: MkColorFactory
colorProvider
Link copied to clipboard
abstract var colorProvider: ColorProvider<N>
columnCount
Link copied to clipboard
abstract val columnCount: Int

Returns the number of columns in the model.

currentRoot
Link copied to clipboard
abstract var currentRoot: N?

Sets the currently selected root node from which the treemap should be displayed.

dataFrame
Link copied to clipboard
abstract val dataFrame: DataFrame<Row, Column, *>?
filter
Link copied to clipboard
abstract val filter: MutableFilter<N>

Obtains the model used for filtering nodes in the treemap.

groupByColumns
Link copied to clipboard
abstract val groupByColumns: Iterable<Column?>
heightColumns
Link copied to clipboard
abstract val heightColumns: Iterable<Column?>
highlighting
Link copied to clipboard
abstract val highlighting: MutableSelection<N>

Obtains the model used to highlight nodes in the treemap.

isDirty
Link copied to clipboard
abstract val isDirty: Boolean

Tells whether the current layout need to be reprocessed.

labelsColumns
Link copied to clipboard
abstract val labelsColumns: Iterable<Column?>
maximumSize
Link copied to clipboard
abstract val maximumSize: Double

Corresponds to area in map.

normalizedLightSourceX
Link copied to clipboard
abstract val normalizedLightSourceX: Double

Gets the position of the light source along the X axis.

normalizedLightSourceY
Link copied to clipboard
abstract val normalizedLightSourceY: Double

Gets the position of the light source along the Y axis.

normalizedLightSourceZ
Link copied to clipboard
abstract val normalizedLightSourceZ: Double

Gets the position of the light source along the Z axis.

probing
Link copied to clipboard
abstract val probing: MutableSingleSelection<N?>

Obtains the model used for probing (aka mouse over).

properties
Link copied to clipboard
abstract val properties: MutableProperties<String?>
root
Link copied to clipboard
abstract val root: N?

Returns the root node of the treemap.

rowCount
Link copied to clipboard
abstract val rowCount: Int

Returns the number of columns in the model.

search
Link copied to clipboard
abstract val search: MutableFilter<N>

Obtains the model used to carry out search in the treemap.

selection
Link copied to clipboard
abstract val selection: MutableSelection<N>

Obtains the model used for selecting nodes in the treemap.

settings
Link copied to clipboard
abstract val settings: TreeMapSettings<Column>

Gets the settings currently selected.

sizeColumns
Link copied to clipboard
abstract val sizeColumns: Iterable<Column?>
tooltipColumns
Link copied to clipboard
abstract val tooltipColumns: Iterable<Column?>
worker
Link copied to clipboard
abstract val worker: TreeMapWorker?

Gets the worker task updating the layout.

workerFuture
Link copied to clipboard
abstract val workerFuture: Future<*>?

Gets the worker task updating the layout.

## Functions

addListener
Link copied to clipboard
abstract fun addListener(treeMapListener: TreeMapListener)

Add a listener for receiving interesting events about changes in the model.

breadthFirstIterator
Link copied to clipboard
abstract fun breadthFirstIterator(parent: N): Iterable<N>

Creates and returns an iterable that traverses the subhierarchy rooted at the give node in breadth-first order. The first node returned by the iterator's next() method is the given node.

columns
Link copied to clipboard
abstract fun columns(): Iterable<Column>?
createDefaultColorMap
Link copied to clipboard
abstract fun createDefaultColorMap(column: Column): MutableColorMap?
depthFirstIterator
Link copied to clipboard
abstract fun depthFirstIterator(parent: N): Iterable<N>

Creates and returns an iterable that traverses the subhierarchy rooted at the give node in depth-first order. The first node returned by the iterator's next() method is the leftmost leaf.

getAggregateValue
Link copied to clipboard
abstract fun getAggregateValue(node: N, column: Column?): Any?

Returns the aggregated value of a variable for a given node.

getBounds
Link copied to clipboard
expect abstract fun getBounds(node: N): Rectangle2D

Gets the bounding rectangle of the item in the map.

getCategoricalColorMap
Link copied to clipboard
abstract fun getCategoricalColorMap(column: Column): MutableColorMap
getChildCount
Link copied to clipboard
abstract fun getChildCount(node: N): Int

Returns the number of children of a given node.

getChildren
Link copied to clipboard
abstract fun getChildren(parent: N): Iterable<N>

Returns an iterator of the children of the given node.

getChildrenGroupByColumn
Link copied to clipboard
abstract fun getChildrenGroupByColumn(node: N): Column?

Gets the depth in hierarchy.

getChildrenOfTypeParent
Link copied to clipboard
abstract fun getChildrenOfTypeParent(parent: N): Iterable<N>

Returns an iterator of the children of the given node.

getColor
Link copied to clipboard
abstract fun getColor(node: N): MkColor?

Gets the color of the given node.

getColorMap
Link copied to clipboard
abstract fun getColorMap(column: Column?): MutableColorMap?
getColumnClass
Link copied to clipboard
abstract fun getColumnClass(columnIndex: Column): KClass<*>?

Returns the most specific superclass for all the cell values in the column.

getColumnName
Link copied to clipboard
abstract fun getColumnName(columnIndex: Column): String?

Returns the name of the column at `columnIndex`. Note: this name does not need to be unique; two columns in a table can have the same name.

getCushionColor
Link copied to clipboard
abstract fun getCushionColor(node: N): MkColor?

Returns the color of the cushion.

getCushionImage
Link copied to clipboard
abstract fun getCushionImage(node: N): CPImage?

Returns the image used for painting the cushion.

getCustomColorMap
Link copied to clipboard
abstract fun getCustomColorMap(column: Column): MutableColorMap
getFormatPattern
Link copied to clipboard
abstract fun getFormatPattern(columnIndex: Int): String?
getGroupByColumn
Link copied to clipboard
abstract fun getGroupByColumn(node: N): Column?

Gets the depth in hierarchy.

getLabelName
Link copied to clipboard
abstract fun getLabelName(node: N): String?

Gets the label of the given node.

getLevel
Link copied to clipboard
expect abstract fun getLevel(node: N): Int

Gets the depth in hierarchy.

getNestedShape
Link copied to clipboard
abstract fun getNestedShape(node: N): Shape?

Gets the shape after nesting of the item in the map.

getNode
Link copied to clipboard
abstract fun getNode(row: Row): N
abstract fun getNode(position: Point?): N?

/ ** Gets the node at the specified position

getNumericMax
Link copied to clipboard
abstract fun getNumericMax(columnIndex: Column?): Double?

Gets the maximum value contained in the specified column.

getNumericMin
Link copied to clipboard
abstract fun getNumericMin(columnIndex: Column?): Double?

Gets the minimum value contained in the specified column.

getParent
Link copied to clipboard
abstract fun getParent(node: N): N?

Gets the parent node of the given node.

getPredefinedColorMap
Link copied to clipboard
abstract fun getPredefinedColorMap(column: Column): MutableColorMap
getShape
Link copied to clipboard
expect abstract fun getShape(node: N): Shape?

Gets the shape of the item in the map.

getSize
Link copied to clipboard
expect abstract fun getSize(node: N): Double

Corresponds to area in map.

getStringValue
Link copied to clipboard
abstract fun getStringValue(node: N, column: Column): String?

Returns the string value for the cell at `columnIndex` and of `node`.

getSumSize
Link copied to clipboard
abstract fun getSumSize(node: N): Double
getTreeMapColumn
Link copied to clipboard
abstract fun getTreeMapColumn(columnIndex: Int): Column?

Gets the field corresponding to the specified column index.

getTreeMapColumnByName
Link copied to clipboard
abstract fun getTreeMapColumnByName(columnName: String?): Column?

Gets the field corresponding to the specified column name.

getTreeMapColumns
Link copied to clipboard
abstract fun getTreeMapColumns(vararg columns: Column): List<Column>
abstract fun getTreeMapColumns(vararg columnNames: String?): List<Column>
abstract fun getTreeMapColumns(includeNone: Boolean): Iterable<Column?>
abstract fun getTreeMapColumns(vararg columns: Int): List<Column>
getValueAt
Link copied to clipboard
abstract fun getValueAt(node: N, columnIndex: Column): Any?

Returns the value for the cell at `columnIndex` and of `node`.

hasNoChildren
Link copied to clipboard
expect abstract fun hasNoChildren(node: N): Boolean

Tells whether the given node is a leaf node or not.

isEveryValueUnique
Link copied to clipboard
abstract fun isEveryValueUnique(column: Column?): Boolean

Indicates whether all the values in the given field are unique.

isLeaf
Link copied to clipboard
abstract fun isLeaf(node: N): Boolean

Tells whether the given node is a leaf node or not.

isNumericType
Link copied to clipboard
abstract fun isNumericType(column: Column): Boolean
isRoot
Link copied to clipboard
abstract fun isRoot(node: N): Boolean

Tells whether the given node is the root node or not.

isTemporalType
Link copied to clipboard
abstract fun isTemporalType(column: Column): Boolean
isVisualType
Link copied to clipboard
abstract fun isVisualType(column: Column): Boolean
parentPreorderEnumeration
Link copied to clipboard
abstract fun parentPreorderEnumeration(parent: N): Iterable<N>

Creates and returns an iterable that traverses the subhierarchy rooted at the give node in preorder. Only non-leaf nodes are included. The first node returned by the iterator's next() method is the given node.

preorderEnumeration
Link copied to clipboard
abstract fun preorderEnumeration(parent: N): Iterable<N>

Creates and returns an iterable that traverses the subhierarchy rooted at the give node in preorder. The first node returned by the iterator's next() method is the given node.

progressProperty
Link copied to clipboard
abstract fun progressProperty(): MutableProperty<Int>
removeListener
Link copied to clipboard
abstract fun removeListener(treeMapListener: TreeMapListener)

Remove a listener from the list of listeners that should be notified about changes in the model.

setColor
Link copied to clipboard
abstract fun setColor(node: N, color: MkColor?)

Sets the color of the given node.

setFormatPattern
Link copied to clipboard
abstract fun setFormatPattern(columnIndex: Int, pattern: String?)
setNestedShape
Link copied to clipboard
abstract fun setNestedShape(node: N, shape: Shape?)

Sets the shape after nesting of the item in the map.

setNumericMax
Link copied to clipboard
abstract fun setNumericMax(columnIndex: Column?, max: Double)

Sets the maximum value contained in the specified column.

setNumericMin
Link copied to clipboard
abstract fun setNumericMin(columnIndex: Column?, min: Double)

Sets the minimum value contained in the specified column.

setShape
Link copied to clipboard
expect abstract fun setShape(node: N, shape: Shape?)

Sets the shape of the item in the map.

waitUntilReady
Link copied to clipboard
abstract fun waitUntilReady()

Wait until all processing are completed.