Package com.macrofocus.treemap
Class AbstractTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- java.lang.Object
-
- com.macrofocus.treemap.AbstractTreeMapModel<N,Row,Column,Color,Font>
-
- Type Parameters:
N
- the type of nodes
- All Implemented Interfaces:
TreeMapModel<N,Row,Column,Color,Font>
- Direct Known Subclasses:
DefaultTreeMapModel
public abstract class AbstractTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font> extends java.lang.Object implements TreeMapModel<N,Row,Column,Color,Font>
This class provides a skeletal implementation of the TreeMapModel interface to minimize the effort required to implement this interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AbstractTreeMapModel.Worker
-
Field Summary
Fields Modifier and Type Field Description protected TreeMapSettings
_settings
protected com.macrofocus.igraphics.CPColorFactory<Color>
colorFactory
protected com.macrofocus.colormap.ColorMapFactory<Color>
colorMapFactory
protected com.macrofocus.crossplatform.CPHelper
cpHelper
protected com.macrofocus.igraphics.CPFontFactory<Font>
fontFactory
protected com.macrofocus.format.FormatFactory
formatFactory
protected com.macrofocus.igraphics.CPImageFactory
imageFactory
protected java.util.Map<Row,N>
rowNode
-
Fields inherited from interface com.macrofocus.treemap.TreeMapModel
PROPERTY_CURRENT_ROOT, PROPERTY_PROGRESS
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeMapModel(com.macrofocus.crossplatform.CPFactory<?,Font,?,Color> cpFactory, com.macrofocus.colormap.ColorMapFactory<Color> colorMapFactory, com.macrofocus.igraphics.CPImageFactory imageFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addListener(TreeMapListener treeMapListener)
Add a listener for receiving interesting events about changes in the model.java.lang.Iterable<N>
breadthFirstIterator(N parent)
Creates and returns an iterable that traverses the subhierarchy rooted at the give node in breadth-first order.protected void
clearAggregationCache()
protected void
computeSize(N node, TreeMapWorker worker)
protected void
computeSizeLeafs(N root, TreeMapWorker worker)
protected void
computeSizeParents(N node, TreeMapWorker worker)
protected abstract com.macrofocus.colormap.MutableColorMap<Color>
createCategoricalColorMap(TreeMapField<N,Column> field)
protected abstract AbstractTreeMapNode
createRootNode(TreeMapField<N,Column> groupByField)
protected TreeMapSettings
createSettings()
java.lang.Iterable<N>
depthFirstIterator(N parent)
Creates and returns an iterable that traverses the subhierarchy rooted at the give node in depth-first order.protected boolean
doColors(N parent, TreeMapWorker worker)
protected abstract boolean
doGroupBy(N parent, TreeMapWorker worker)
protected boolean
doLayout(N parent, TreeMapWorker worker)
protected boolean
doLayoutChildren(N currentRoot, TreeMapWorker worker)
protected void
fireTableModelChanged()
java.lang.Object
getAggregateValue(N node, TreeMapField<N,Column> field)
Returns the aggregated value of a variable for a given node.java.awt.geom.Rectangle2D
getBounds(N node)
Gets the bounding rectangle of the item in the map.com.macrofocus.colormap.MutableColorMap<Color>
getCategoricalColorMap(Column columnIndex)
TreeMapField<N,Column>
getChildrenGroupByField(N node)
Gets the depth in hierarchy.com.macrofocus.igraphics.CPColor<Color>
getColor(N node)
Gets the color of the given node.com.macrofocus.igraphics.CPColorFactory<Color>
getColorFactory()
protected com.macrofocus.colormap.MutableColorMap
getColorMap()
com.macrofocus.colormap.MutableColorMap<Color>
getColorMap(TreeMapField<N,Column> field)
com.macrofocus.igraphics.ColorProvider<N,Color>
getColorProvider()
java.lang.Iterable<TreeMapField<N,Column>>
getColorTreeMapFields()
N
getCurrentRoot()
Gets the currently selected root node from which the treemap should be displayed.com.macrofocus.colormap.MutableColorMap<Color>
getCustomColorMap(Column columnIndex)
MutableFilter<N>
getFilter()
Obtains the model used for filtering nodes in the treemap.java.lang.String
getFormatPattern(int columnIndex)
TreeMapField<N,Column>
getGroupByField(N node)
Gets the depth in hierarchy.java.lang.Iterable<TreeMapField<N,Column>>
getGroupByTreeMapFields()
java.lang.Iterable<TreeMapField<N,Column>>
getHeightTreeMapFields()
MutableSelection<N>
getHighlighting()
Obtains the model used to highlight nodes in the treemap.com.macrofocus.igraphics.CPImageFactory
getImageFactory()
java.lang.Iterable<TreeMapField<N,Column>>
getLabelsTreeMapFields()
int
getLevel(N node)
Gets the depth in hierarchy.double
getMaximumSize()
Corresponds to area in map.java.awt.Shape
getNestedShape(N node)
Gets the shape after nesting of the item in the map.N
getNode(java.awt.Point position)
/** Gets the node at the specified positiondouble
getNormalizedLightSourceX()
Gets the the position of the light source along the X axis.double
getNormalizedLightSourceY()
Gets the the position of the light source along the Y axis.double
getNormalizedLightSourceZ()
Gets the the position of the light source along the Z axis.com.macrofocus.colormap.MutableColorMap<Color>
getPredefinedColorMap(Column columnIndex)
MutableSingleSelection<N>
getProbing()
Obtains the model used for probing (aka mouse over).MutableProperties<java.lang.String>
getProperties()
N
getRoot()
Returns the root node of the treemap.MutableFilter<N>
getSearch()
Obtains the model used to carry out search in the treemap.MutableSelection<N>
getSelection()
Obtains the model used for selecting nodes in the treemap.TreeMapSettings
getSettings()
Gets the settings currently selected.java.awt.Shape
getShape(N node)
Gets the shape of the item in the map.double
getSize(N node)
Corresponds to area in map.java.lang.Iterable<TreeMapField<N,Column>>
getSizeTreeMapFields()
java.lang.String
getStringValue(N node, TreeMapField<N,Column> field)
Returns the string value for the cell atcolumnIndex
and ofnode
.double
getSumSize(N node)
java.lang.Iterable<TreeMapField<N,Column>>
getTooltipTreeMapFields()
protected java.lang.Iterable<TreeMapField<N,Column>>
getTreeMapFields(boolean includeNone)
protected TreeMapField[]
getTreeMapFields(int... columns)
protected TreeMapField[]
getTreeMapFields(Column... columns)
protected TreeMapField[]
getTreeMapFields(java.lang.String... columnNames)
protected java.awt.geom.Rectangle2D
getViewport()
TreeMapWorker
getWorker()
Gets the worker task updating the layout.java.util.concurrent.Future<java.lang.Void>
getWorkerFuture()
Gets the worker task updating the layout.boolean
hasNoChildren(N node)
Tells whether the given node is a leaf node or not.protected void
initDefaults()
boolean
isDirty()
Tells whether the current layout need to be reprocessed.boolean
isLeaf(N node)
boolean
isNumericType(TreeMapField<N,Column> field)
boolean
isTemporalType(TreeMapField<N,Column> field)
boolean
isVisualType(TreeMapField<N,Column> field)
java.lang.Iterable<N>
parentPreorderEnumeration(N parent)
Creates and returns an iterable that traverses the subhierarchy rooted at the give node in preorder.java.lang.Iterable<N>
preorderEnumeration(N parent)
Creates and returns an iterable that traverses the subhierarchy rooted at the give node in preorder.MutableProperty<java.lang.Integer>
progressProperty()
void
removeListener(TreeMapListener treeMapListener)
Remove a listener from the list of listeners that should be notified about changes in the model.protected void
scheduleUpdateColors()
protected void
scheduleUpdateGroupBy()
protected void
scheduleUpdateLayout()
void
setColor(N node, com.macrofocus.igraphics.CPColor<Color> color)
Sets the color of the given node.void
setColorProvider(com.macrofocus.igraphics.ColorProvider<N,Color> colorProvider)
void
setCurrentRoot(N currentRoot)
Sets the currently selected root node from which the treemap should be displayed.void
setFormatPattern(int columnIndex, java.lang.String pattern)
void
setNestedShape(N node, java.awt.Shape shape)
Sets the shape after nesting of the item in the map.void
setProgress(int progress)
void
setShape(N node, java.awt.Shape shape)
Sets the shape of the item in the map.void
waitUntilReady()
Wait until all processing are completed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.macrofocus.treemap.TreeMapModel
columns, createDefaultColorMap, getChildCount, getChildren, getChildrenOfTypeParent, getColumnClass, getColumnCount, getColumnName, getCushionColor, getCushionImage, getDataFrame, getLabelName, getNode, getNumericMax, getNumericMin, getParent, getRowCount, getTreeMapField, getTreeMapField, getTreeMapFieldByName, getValueAt, isEveryValueUnique, isRoot, setNumericMax, setNumericMin
-
-
-
-
Field Detail
-
rowNode
protected final java.util.Map<Row,N extends MutableTreeMapNode<N,Column,Color,Font>> rowNode
-
_settings
protected final TreeMapSettings _settings
-
cpHelper
protected final com.macrofocus.crossplatform.CPHelper cpHelper
-
colorFactory
protected final com.macrofocus.igraphics.CPColorFactory<Color> colorFactory
-
fontFactory
protected final com.macrofocus.igraphics.CPFontFactory<Font> fontFactory
-
colorMapFactory
protected final com.macrofocus.colormap.ColorMapFactory<Color> colorMapFactory
-
formatFactory
protected final com.macrofocus.format.FormatFactory formatFactory
-
imageFactory
protected final com.macrofocus.igraphics.CPImageFactory imageFactory
-
-
Method Detail
-
getProperties
public MutableProperties<java.lang.String> getProperties()
- Specified by:
getProperties
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getGroupByTreeMapFields
public java.lang.Iterable<TreeMapField<N,Column>> getGroupByTreeMapFields()
- Specified by:
getGroupByTreeMapFields
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getSizeTreeMapFields
public java.lang.Iterable<TreeMapField<N,Column>> getSizeTreeMapFields()
- Specified by:
getSizeTreeMapFields
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getColorTreeMapFields
public java.lang.Iterable<TreeMapField<N,Column>> getColorTreeMapFields()
- Specified by:
getColorTreeMapFields
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getHeightTreeMapFields
public java.lang.Iterable<TreeMapField<N,Column>> getHeightTreeMapFields()
- Specified by:
getHeightTreeMapFields
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getLabelsTreeMapFields
public java.lang.Iterable<TreeMapField<N,Column>> getLabelsTreeMapFields()
- Specified by:
getLabelsTreeMapFields
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getTooltipTreeMapFields
public java.lang.Iterable<TreeMapField<N,Column>> getTooltipTreeMapFields()
- Specified by:
getTooltipTreeMapFields
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getTreeMapFields
protected java.lang.Iterable<TreeMapField<N,Column>> getTreeMapFields(boolean includeNone)
-
isNumericType
public boolean isNumericType(TreeMapField<N,Column> field)
- Specified by:
isNumericType
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
isTemporalType
public boolean isTemporalType(TreeMapField<N,Column> field)
- Specified by:
isTemporalType
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
isVisualType
public boolean isVisualType(TreeMapField<N,Column> field)
- Specified by:
isVisualType
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
initDefaults
protected void initDefaults()
-
scheduleUpdateGroupBy
protected void scheduleUpdateGroupBy()
-
createSettings
protected TreeMapSettings createSettings()
-
clearAggregationCache
protected void clearAggregationCache()
-
createRootNode
protected abstract AbstractTreeMapNode createRootNode(TreeMapField<N,Column> groupByField)
-
scheduleUpdateColors
protected void scheduleUpdateColors()
-
fireTableModelChanged
protected void fireTableModelChanged()
-
getTreeMapFields
protected TreeMapField[] getTreeMapFields(int... columns)
-
getTreeMapFields
protected TreeMapField[] getTreeMapFields(Column... columns)
-
getTreeMapFields
protected TreeMapField[] getTreeMapFields(java.lang.String... columnNames)
-
doGroupBy
protected abstract boolean doGroupBy(N parent, TreeMapWorker worker)
-
doLayout
protected boolean doLayout(N parent, TreeMapWorker worker)
-
getViewport
protected java.awt.geom.Rectangle2D getViewport()
-
computeSize
protected void computeSize(N node, TreeMapWorker worker)
-
computeSizeLeafs
protected void computeSizeLeafs(N root, TreeMapWorker worker)
-
computeSizeParents
protected void computeSizeParents(N node, TreeMapWorker worker)
-
doLayoutChildren
protected boolean doLayoutChildren(N currentRoot, TreeMapWorker worker)
-
getSumSize
public double getSumSize(N node)
- Specified by:
getSumSize
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
doColors
protected boolean doColors(N parent, TreeMapWorker worker)
-
getColorMap
protected com.macrofocus.colormap.MutableColorMap getColorMap()
-
getColorMap
public com.macrofocus.colormap.MutableColorMap<Color> getColorMap(TreeMapField<N,Column> field)
- Specified by:
getColorMap
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getCategoricalColorMap
public com.macrofocus.colormap.MutableColorMap<Color> getCategoricalColorMap(Column columnIndex)
- Specified by:
getCategoricalColorMap
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
createCategoricalColorMap
protected abstract com.macrofocus.colormap.MutableColorMap<Color> createCategoricalColorMap(TreeMapField<N,Column> field)
-
getPredefinedColorMap
public com.macrofocus.colormap.MutableColorMap<Color> getPredefinedColorMap(Column columnIndex)
- Specified by:
getPredefinedColorMap
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getCustomColorMap
public com.macrofocus.colormap.MutableColorMap<Color> getCustomColorMap(Column columnIndex)
- Specified by:
getCustomColorMap
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getSize
public double getSize(N node)
Corresponds to area in map.
-
getMaximumSize
public double getMaximumSize()
Description copied from interface:TreeMapModel
Corresponds to area in map.- Specified by:
getMaximumSize
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the maximum area
-
setShape
public void setShape(N node, java.awt.Shape shape)
Sets the shape of the item in the map.
-
getShape
public java.awt.Shape getShape(N node)
Gets the shape of the item in the map.
-
setNestedShape
public void setNestedShape(N node, java.awt.Shape shape)
Sets the shape after nesting of the item in the map.- Specified by:
setNestedShape
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node.shape
- the shape of the item in the map.
-
getNestedShape
public java.awt.Shape getNestedShape(N node)
Gets the shape after nesting of the item in the map.- Specified by:
getNestedShape
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node.- Returns:
- the shape of the item in the map.
-
getBounds
public java.awt.geom.Rectangle2D getBounds(N node)
Gets the bounding rectangle of the item in the map.
-
getLevel
public int getLevel(N node)
Gets the depth in hierarchy.
-
getGroupByField
public TreeMapField<N,Column> getGroupByField(N node)
Description copied from interface:TreeMapModel
Gets the depth in hierarchy.- Specified by:
getGroupByField
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node.- Returns:
- the depth in hierarchy.
-
getChildrenGroupByField
public TreeMapField<N,Column> getChildrenGroupByField(N node)
Description copied from interface:TreeMapModel
Gets the depth in hierarchy.- Specified by:
getChildrenGroupByField
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node.- Returns:
- the depth in hierarchy.
-
hasNoChildren
public boolean hasNoChildren(N node)
Tells whether the given node is a leaf node or not.- Specified by:
hasNoChildren
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node- Returns:
- true if it is a leaf node, false otherwise.
-
isLeaf
public boolean isLeaf(N node)
-
parentPreorderEnumeration
public java.lang.Iterable<N> parentPreorderEnumeration(N parent)
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.- Specified by:
parentPreorderEnumeration
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
parent
- the root of the hierarchy to traverse- Returns:
- an iterable that traverses the subtree rooted at this node in preorder.
-
preorderEnumeration
public java.lang.Iterable<N> preorderEnumeration(N parent)
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.- Specified by:
preorderEnumeration
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
parent
- the root of the hierarchy to traverse- Returns:
- an iterable that traverses the subtree rooted at this node in preorder.
-
breadthFirstIterator
public java.lang.Iterable<N> breadthFirstIterator(N parent)
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.- Specified by:
breadthFirstIterator
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
parent
- the root of the hierarchy to traverse- Returns:
- an iterable that traverses the subtree rooted at this node in breadth-first order.
-
depthFirstIterator
public java.lang.Iterable<N> depthFirstIterator(N parent)
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.- Specified by:
depthFirstIterator
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
parent
- the root of the hierarchy to traverse- Returns:
- an iterable that traverses the subtree rooted at this node in depth-first order.
-
getNormalizedLightSourceX
public double getNormalizedLightSourceX()
Gets the the position of the light source along the X axis.- Specified by:
getNormalizedLightSourceX
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the position along the X axis.
-
getNormalizedLightSourceY
public double getNormalizedLightSourceY()
Gets the the position of the light source along the Y axis.- Specified by:
getNormalizedLightSourceY
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the position along the Y axis.
-
getNormalizedLightSourceZ
public double getNormalizedLightSourceZ()
Gets the the position of the light source along the Z axis.- Specified by:
getNormalizedLightSourceZ
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the position along the Z axis.
-
getAggregateValue
@JsMethod public java.lang.Object getAggregateValue(N node, TreeMapField<N,Column> field)
Returns the aggregated value of a variable for a given node.- Specified by:
getAggregateValue
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node whose value is to be queriedfield
- the field whose value is to be queried- Returns:
- the value Object at the specified cell
-
getStringValue
public java.lang.String getStringValue(N node, TreeMapField<N,Column> field)
Returns the string value for the cell atcolumnIndex
and ofnode
.- Specified by:
getStringValue
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
node
- the node whose value is to be queriedfield
- the field whose value is to be queried- Returns:
- the value Object at the specified cell
-
getRoot
public N getRoot()
Returns the root node of the treemap.
-
getCurrentRoot
public N getCurrentRoot()
Gets the currently selected root node from which the treemap should be displayed.- Specified by:
getCurrentRoot
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the currently selected root node.
-
setCurrentRoot
public void setCurrentRoot(N currentRoot)
Sets the currently selected root node from which the treemap should be displayed.- Specified by:
setCurrentRoot
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
currentRoot
- the root node to use for display.
-
scheduleUpdateLayout
protected void scheduleUpdateLayout()
-
getProbing
public MutableSingleSelection<N> getProbing()
Obtains the model used for probing (aka mouse over).- Specified by:
getProbing
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the model used for probing.
-
getHighlighting
public MutableSelection<N> getHighlighting()
Obtains the model used to highlight nodes in the treemap.- Specified by:
getHighlighting
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the model used for highlighting.
-
getSelection
public MutableSelection<N> getSelection()
Obtains the model used for selecting nodes in the treemap.- Specified by:
getSelection
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the model used for selection.
-
getFilter
public MutableFilter<N> getFilter()
Obtains the model used for filtering nodes in the treemap.
-
getSearch
public MutableFilter<N> getSearch()
Obtains the model used to carry out search in the treemap.
-
getSettings
public TreeMapSettings getSettings()
Gets the settings currently selected.- Specified by:
getSettings
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the settings.
-
getWorker
public TreeMapWorker getWorker()
Gets the worker task updating the layout.
-
getWorkerFuture
public java.util.concurrent.Future<java.lang.Void> getWorkerFuture()
Gets the worker task updating the layout.- Specified by:
getWorkerFuture
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Returns:
- the worker task
-
addListener
public void addListener(TreeMapListener treeMapListener)
Add a listener for receiving interesting events about changes in the model.- Specified by:
addListener
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
treeMapListener
- the listener to add.
-
removeListener
public void removeListener(TreeMapListener treeMapListener)
Remove a listener from the list of listeners that should be notified about changes in the model.- Specified by:
removeListener
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
- Parameters:
treeMapListener
- the listener to remove.
-
getNode
public N getNode(java.awt.Point position)
/** Gets the node at the specified position
-
isDirty
public boolean isDirty()
Tells whether the current layout need to be reprocessed.
-
waitUntilReady
public void waitUntilReady()
Wait until all processing are completed.- Specified by:
waitUntilReady
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getColorProvider
public com.macrofocus.igraphics.ColorProvider<N,Color> getColorProvider()
- Specified by:
getColorProvider
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
setColorProvider
public void setColorProvider(com.macrofocus.igraphics.ColorProvider<N,Color> colorProvider)
- Specified by:
setColorProvider
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getColor
public com.macrofocus.igraphics.CPColor<Color> getColor(N node)
Description copied from interface:TreeMapModel
Gets the color of the given node.
-
setColor
public void setColor(N node, com.macrofocus.igraphics.CPColor<Color> color)
Sets the color of the given node.
-
progressProperty
public MutableProperty<java.lang.Integer> progressProperty()
- Specified by:
progressProperty
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
setProgress
public void setProgress(int progress)
-
getFormatPattern
public java.lang.String getFormatPattern(int columnIndex)
- Specified by:
getFormatPattern
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
setFormatPattern
public void setFormatPattern(int columnIndex, java.lang.String pattern)
- Specified by:
setFormatPattern
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getColorFactory
public com.macrofocus.igraphics.CPColorFactory<Color> getColorFactory()
- Specified by:
getColorFactory
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
getImageFactory
public com.macrofocus.igraphics.CPImageFactory getImageFactory()
- Specified by:
getImageFactory
in interfaceTreeMapModel<N extends MutableTreeMapNode<N,Column,Color,Font>,Row,Column,Color,Font>
-
-