Package com.macrofocus.treeplot
Class DefaultTreePlotSettings<Color,Font>
- java.lang.Object
-
- com.macrofocus.treeplot.AbstractTreePlotSettings<Color,Font>
-
- com.macrofocus.treeplot.DefaultTreePlotSettings<Color,Font>
-
- All Implemented Interfaces:
TreePlotSettings<Color,Font>,PropertyChange
public class DefaultTreePlotSettings<Color,Font> extends AbstractTreePlotSettings<Color,Font>
Default implementation of the TreeMapSettings interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected MutableBoundedIntervalbubbleSizeprotected MutableBoundedIntervalgridThicknessprotected TreeMapModelmodel-
Fields inherited from interface com.macrofocus.treeplot.TreePlotSettings
PROPERTY_COLOR_FIELD, PROPERTY_DEPTH, PROPERTY_GROUP_BY_FIELD, PROPERTY_HIDE_FILTER_RESULTS, PROPERTY_HIDE_SEARCH_RESULTS, PROPERTY_PROBING_COLOR, PROPERTY_RENDERING, PROPERTY_SELECTION_COLOR, PROPERTY_SIZE_FIELD, PROPERTY_TOOLTIP_BACKGROUND, PROPERTY_TOOLTIP_FIELD, PROPERTY_TREEPLOT_BACKGROUND_COLOR, PROPERTY_TREEPLOT_BUBBLE_SIZE, PROPERTY_TREEPLOT_GRID_COLOR, PROPERTY_TREEPLOT_GRID_THICKNESS, PROPERTY_TREEPLOT_GROUPBY
-
-
Constructor Summary
Constructors Constructor Description DefaultTreePlotSettings(TreeMapModel model, com.macrofocus.igraphics.CPColorFactory<Color> colorFactory, com.macrofocus.igraphics.CPFontFactory<Font> fontFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.macrofocus.igraphics.CPColor<Color>getBackground()Returns the backgroun color to use for drawing the treeplot.MutableProperty<com.macrofocus.igraphics.CPColor<Color>>getBackgroundProperty()MutableBoundedIntervalgetBubbleSizeInterval()TreeMapFieldgetColorTreeMapField()Gets the model used to hold the field used to represent the color.TreeMapFieldSettings<Color,Font>getDefaultFieldSettings()DepthgetDepth()Returns the depth to use to lay out the treemap.TreeMapFieldSettings<Color,Font>getFieldSettings(TreeMapField field)com.macrofocus.igraphics.CPColor<Color>getGridColor()Returns the color to use for drawing the grid.MutableProperty<com.macrofocus.igraphics.CPColor<Color>>getGridColorProperty()java.lang.DoublegetGridThickness()Returns the thickness used for drawing the grid.MutableBoundedIntervalgetGridThicknessInterval()java.lang.BooleangetGroupBy()Returns whether the groups should be displayed.TreeMapField[]getGroupByTreeMapFields()Gets the model used to hold the list of fields to be use for grouping.com.macrofocus.igraphics.CPColor<Color>getProbingColor()Returns the color to use for drawing the borders.RenderinggetRendering()Returns the rendering scheme to use to draw the treemap.com.macrofocus.igraphics.CPColor<Color>getSelectionColor()Returns the color to use for drawing the borders.booleangetShowPopup(TreeMapField field)Tells whether the specified field should be shown in the popup.TreeMapFieldgetSizeTreeMapField()Gets the model used to hold the field used to represent the size.com.macrofocus.igraphics.CPColor<Color>getTooltipBackground()Returns the background color to use for drawing the tooltips.TreeMapField[]getToolTipTreeMapFields()Gets the model used to hold the list of fields to be use by the tooltip.java.lang.ObjectgetValue(java.lang.String key)Gets the value of the specified property.MutableProperty<java.lang.Boolean>groupByProperty()java.lang.BooleanisHideFilterResults()Gets the model used to indicate whether filtered nodes should be hidden.java.lang.BooleanisHideSearchResults()Gets the model used to indicate whether nodes that do not match the search criteria should be hidden.voidresetToDefaults()voidsetBackground(com.macrofocus.igraphics.CPColor<Color> color)Sets the background color to use for drawing the treeplot.voidsetColor(int column)Defines the field to use for coloring.voidsetColorByName(java.lang.String columnName)Defines the field to use for coloring.voidsetColorTreeMapField(TreeMapField field)voidsetDepth(Depth depth)Defines the depth to use to lay out the treemap.voidsetGridColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the color to use for drawing the grid.voidsetGridThickness(java.lang.Double value)Sets the thickness used for drawing the grid.voidsetGroupBy(int... columns)Defines the fields to be use for grouping.voidsetGroupBy(java.lang.Boolean groupBy)Sets whether the groups should be displayed.voidsetGroupByByNames(java.lang.String... columnNames)Defines the fields to be use for grouping.voidsetGroupByTreeMapFields(TreeMapField[] fields)voidsetHideFilterResults(java.lang.Boolean hideFilterResults)voidsetHideSearchResults(java.lang.Boolean hideSearchResults)voidsetProbingColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the color to use for drawing the borders.voidsetRendering(Rendering rendering)Defines the rendering scheme to use to draw the treemap.voidsetSelectionColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the color to use for drawing the borders.voidsetShowPopup(TreeMapField field, boolean show)Sets whether the specified field should be displayed or no in the popup.voidsetSize(int column)Defines the field to use to represent the size.voidsetSizeByName(java.lang.String columnName)Defines the field to use to represent the size.voidsetSizeTreeMapField(TreeMapField field)voidsetTooltipBackground(com.macrofocus.igraphics.CPColor<Color> color)Sets the background color to use for drawing the tooltips.voidsetToolTipTreeMapFields(TreeMapField[] fields)-
Methods inherited from class com.macrofocus.treeplot.AbstractTreePlotSettings
addPropertyChangeListener, addPropertyChangeListener, addTreeMapSettingsListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, notifySettingsChanged, removePropertyChangeListener, removePropertyChangeListener, removeTreeMapSettingsListener, removeTreeMapSettingsListener
-
-
-
-
Field Detail
-
model
protected final TreeMapModel model
-
gridThickness
protected final MutableBoundedInterval gridThickness
-
bubbleSize
protected final MutableBoundedInterval bubbleSize
-
-
Constructor Detail
-
DefaultTreePlotSettings
public DefaultTreePlotSettings(TreeMapModel model, com.macrofocus.igraphics.CPColorFactory<Color> colorFactory, com.macrofocus.igraphics.CPFontFactory<Font> fontFactory)
-
-
Method Detail
-
getDefaultFieldSettings
public TreeMapFieldSettings<Color,Font> getDefaultFieldSettings()
-
getFieldSettings
public TreeMapFieldSettings<Color,Font> getFieldSettings(TreeMapField field)
-
getGroupByTreeMapFields
public TreeMapField[] getGroupByTreeMapFields()
Gets the model used to hold the list of fields to be use for grouping.- Returns:
- the model of fields to be use for grouping
-
setGroupByTreeMapFields
public void setGroupByTreeMapFields(TreeMapField[] fields)
-
getSizeTreeMapField
public TreeMapField getSizeTreeMapField()
Gets the model used to hold the field used to represent the size.- Returns:
- the model holding the field that represent the size.
-
getColorTreeMapField
public TreeMapField getColorTreeMapField()
Gets the model used to hold the field used to represent the color.- Returns:
- the model holding the field that represent the color.
-
getToolTipTreeMapFields
public TreeMapField[] getToolTipTreeMapFields()
Gets the model used to hold the list of fields to be use by the tooltip.- Returns:
- the model of fields to be use by the tooltip.
-
setToolTipTreeMapFields
public void setToolTipTreeMapFields(TreeMapField[] fields)
-
isHideFilterResults
public java.lang.Boolean isHideFilterResults()
Gets the model used to indicate whether filtered nodes should be hidden.- Returns:
- the model indicating whether filtered nodes should be hidden.
-
isHideSearchResults
public java.lang.Boolean isHideSearchResults()
Gets the model used to indicate whether nodes that do not match the search criteria should be hidden.- Returns:
- the model indicating whether nodes that do not match the search criteria should be hidden.
-
setGroupBy
public void setGroupBy(int... columns)
Defines the fields to be use for grouping.- Parameters:
columns- the indexes of the columns to be used for grouping- See Also:
DefaultTreeMapSettings.getGroupByTreeMapFields()
-
setGroupByByNames
public void setGroupByByNames(java.lang.String... columnNames)
Defines the fields to be use for grouping.- Parameters:
columnNames- the names of the columns to be used for grouping- See Also:
DefaultTreeMapSettings.getGroupByTreeMapFields()
-
getShowPopup
public boolean getShowPopup(TreeMapField field)
Description copied from interface:TreePlotSettingsTells whether the specified field should be shown in the popup.- Parameters:
field- the field.- Returns:
- true if it should be displayed, false otherwise.
-
setShowPopup
public void setShowPopup(TreeMapField field, boolean show)
Description copied from interface:TreePlotSettingsSets whether the specified field should be displayed or no in the popup.- Parameters:
field- the field.show- true if it should be displayed, false otherwise.
-
setSize
public void setSize(int column)
Defines the field to use to represent the size.- Parameters:
column- the index of the column to be used for representing the size- See Also:
DefaultTreeMapSettings.getSizeTreeMapField()
-
setSizeTreeMapField
public void setSizeTreeMapField(TreeMapField field)
-
setSizeByName
public void setSizeByName(java.lang.String columnName)
Defines the field to use to represent the size.- Parameters:
columnName- the name of the column to be used for representing the size- See Also:
DefaultTreeMapSettings.getSizeTreeMapField()
-
setColor
public void setColor(int column)
Defines the field to use for coloring.- Parameters:
column- the index of the column to be used for coloring- See Also:
DefaultTreeMapSettings.getColorTreeMapField()
-
setColorByName
public void setColorByName(java.lang.String columnName)
Defines the field to use for coloring.- Parameters:
columnName- the name of the column to be used for coloring- See Also:
DefaultTreeMapSettings.getColorTreeMapField()
-
setColorTreeMapField
public void setColorTreeMapField(TreeMapField field)
-
getDepth
public Depth getDepth()
Returns the depth to use to lay out the treemap.- Returns:
- the depth to use
- See Also:
DefaultTreeMapSettings.getDepth(),DepthFactory
-
setDepth
public void setDepth(Depth depth)
Defines the depth to use to lay out the treemap.- Parameters:
depth- the depth to use- See Also:
DefaultTreeMapSettings.getDepth(),DepthFactory
-
setRendering
public void setRendering(Rendering rendering)
Defines the rendering scheme to use to draw the treemap.- Parameters:
rendering- the rendering scheme to use- See Also:
DefaultTreeMapSettings.getRendering(),RenderingFactory
-
setHideFilterResults
public void setHideFilterResults(java.lang.Boolean hideFilterResults)
-
setHideSearchResults
public void setHideSearchResults(java.lang.Boolean hideSearchResults)
-
getRendering
public Rendering getRendering()
Returns the rendering scheme to use to draw the treemap.- Returns:
- the rendering scheme to use
- See Also:
DefaultTreeMapSettings.getRendering(),RenderingFactory
-
getTooltipBackground
public com.macrofocus.igraphics.CPColor<Color> getTooltipBackground()
Returns the background color to use for drawing the tooltips.- Returns:
- the color to be used
- See Also:
DefaultTreeMapSettings.getTooltipBackground()
-
setTooltipBackground
public void setTooltipBackground(com.macrofocus.igraphics.CPColor<Color> color)
Sets the background color to use for drawing the tooltips.- Parameters:
color- the color to be used- See Also:
DefaultTreeMapSettings.getTooltipBackground()
-
getProbingColor
public com.macrofocus.igraphics.CPColor<Color> getProbingColor()
Returns the color to use for drawing the borders.- Returns:
- the color to be used
- See Also:
DefaultTreeMapSettings.getProbingColor()
-
setProbingColor
public void setProbingColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the color to use for drawing the borders.- Parameters:
color- the color to be used- See Also:
DefaultTreeMapSettings.getProbingColor()
-
getSelectionColor
public com.macrofocus.igraphics.CPColor<Color> getSelectionColor()
Returns the color to use for drawing the borders.- Returns:
- the color to be used
- See Also:
DefaultTreeMapSettings.getSelectionColor()
-
setSelectionColor
public void setSelectionColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the color to use for drawing the borders.- Parameters:
color- the color to be used- See Also:
DefaultTreeMapSettings.getSelectionColor()
-
getValue
public java.lang.Object getValue(java.lang.String key)
Description copied from interface:TreePlotSettingsGets the value of the specified property.- Parameters:
key- the property name- Returns:
- the value
-
resetToDefaults
public void resetToDefaults()
-
getBackground
public com.macrofocus.igraphics.CPColor<Color> getBackground()
Returns the backgroun color to use for drawing the treeplot.- Returns:
- the color to be used
-
setBackground
public void setBackground(com.macrofocus.igraphics.CPColor<Color> color)
Sets the background color to use for drawing the treeplot.- Parameters:
color- the color to be used
-
getBackgroundProperty
public MutableProperty<com.macrofocus.igraphics.CPColor<Color>> getBackgroundProperty()
-
getGridColor
public com.macrofocus.igraphics.CPColor<Color> getGridColor()
Returns the color to use for drawing the grid.- Returns:
- the color to be used
-
setGridColor
public void setGridColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the color to use for drawing the grid.- Parameters:
color- the color to be used
-
getGridColorProperty
public MutableProperty<com.macrofocus.igraphics.CPColor<Color>> getGridColorProperty()
-
getGridThicknessInterval
public MutableBoundedInterval getGridThicknessInterval()
-
getGridThickness
public java.lang.Double getGridThickness()
Returns the thickness used for drawing the grid.- Returns:
- the thickness
-
setGridThickness
public void setGridThickness(java.lang.Double value)
Sets the thickness used for drawing the grid.- Parameters:
value- the thickness
-
getGroupBy
public java.lang.Boolean getGroupBy()
Returns whether the groups should be displayed.- Returns:
- the font to be used
-
setGroupBy
public void setGroupBy(java.lang.Boolean groupBy)
Sets whether the groups should be displayed.- Parameters:
groupBy- true to display the groups; false to display the leaves
-
groupByProperty
public MutableProperty<java.lang.Boolean> groupByProperty()
-
getBubbleSizeInterval
public MutableBoundedInterval getBubbleSizeInterval()
-
-