Package com.macrofocus.treemap
Class AbstractTreeMap<C,N,Row,Column,Color,Font>
- java.lang.Object
-
- com.macrofocus.treemap.AbstractTreeMap<C,N,Row,Column,Color,Font>
-
- All Implemented Interfaces:
TreeMap<C,N,Row,Column,Color,Font>
- Direct Known Subclasses:
SwingTreeMap
@JsType public abstract class AbstractTreeMap<C,N,Row,Column,Color,Font> extends java.lang.Object implements TreeMap<C,N,Row,Column,Color,Font>
Created by luc on 03/02/16.
-
-
Field Summary
Fields Modifier and Type Field Description protected TreeMapController<C,N,Row,Column,Color,Font>
controller
protected static LicenseModel
licenseModel
protected TreeMapView<C,N,Row,Column,Color,Font>
view
-
Constructor Summary
Constructors Constructor Description AbstractTreeMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeMapController<C,N,Row,Column,Color,Font>
getController()
Returns the controller used for the treemap.TreeMapModel<N,Row,Column,Color,Font>
getModel()
Returns the model used for the treemap.TreeMapView<C,N,Row,Column,Color,Font>
getView()
Returns the view used for the treemap.void
setAggregation(Aggregation aggregation)
Defines the aggregation scheme to use to aggregate values of the treemap.void
setAlgorithm(Algorithm algorithm)
Defines the algorithm to use to lay out the treemap.void
setBackground(int column)
Defines the field to use for background labeling.void
setBackgroundByName(java.lang.String columnName)
Defines the field to use for background labeling.void
setColor(int column)
Defines the field to use for coloring.void
setColorByName(java.lang.String columnName)
Defines the field to use for coloring.void
setController(TreeMapController<C,N,Row,Column,Color,Font> controller)
Sets the controller to be used for the treemap and register the view currently in use.void
setDepth(Depth depth)
Defines the depth to use to lay out the treemap.void
setGroupBy(int... columns)
Defines the fields to be use for grouping.void
setGroupByByNames(java.lang.String... columnNames)
Defines the fields to be use for grouping.void
setHeaderBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the background color to use for drawing the headers.void
setHeaderFont(com.macrofocus.igraphics.CPFont<Font> font)
Sets the font used for labeling the headings.void
setHeaderForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the foreground color to use for drawing the headers.void
setHeight(int column)
Defines the field to use for mapping the height.void
setHeightByName(java.lang.String columnName)
Defines the field to use for mapping the height.void
setLabeling(Labeling labeling)
Defines the labeling scheme to use to draw the treemap.void
setLabelingBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the background color to use for drawing the labels.void
setLabelingFont(com.macrofocus.igraphics.CPFont<Font> font)
Sets the font used for labeling.void
setLabelingForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the foreground color to use for drawing the labels.void
setLabels(int... columns)
Defines the fields to be use for labeling.void
setLabelsByNames(java.lang.String... columnNames)
Defines the fields to be use for labeling.static void
setLicenseKey(java.lang.String username, java.lang.String key)
Register the license key that legally entitle the use of CartoPlot.void
setLightSourceAmbient(double value)
Sets the light source ambient intensity used for drawing the cushions.void
setLightSourceHeight(double value)
Sets the light source height used for drawing the cushions.void
setLightSourceX(double value)
Sets the light source X position used for drawing the cushions.void
setLightSourceY(double value)
Sets the light source Y position used for drawing the cushions.void
setLightSourceZ(double value)
Sets the light source Z position used for drawing the cushions.void
setModel(TreeMapModel<N,Row,Column,Color,Font> model)
Sets the model to be used for the treemap and register it to the view.void
setNesting(Nesting nesting)
Defines the nesting to use to lay out the treemap.void
setOrdering(Ordering ordering)
Defines the ordering to use to lay out the treemap.void
setRendering(Rendering rendering)
Defines the rendering scheme to use to draw the treemap.void
setScale(Scale scale)
Defines the scaling scheme to use to project values the treemap.void
setSize(int column)
Defines the field to use to represent the size.void
setSizeByName(java.lang.String columnName)
Defines the field to use to represent the size.void
setToolTip(int... columns)
Defines the fields to be use for grouping.void
setToolTipByNames(java.lang.String... columnNames)
Defines the fields to be use for grouping.void
setView(TreeMapView<C,N,Row,Column,Color,Font> view)
Sets the view to be used for the treemap and register the model currently in use.-
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.TreeMap
getNativeComponent
-
-
-
-
Field Detail
-
licenseModel
protected static LicenseModel licenseModel
-
-
Method Detail
-
setLicenseKey
public static void setLicenseKey(java.lang.String username, java.lang.String key)
Register the license key that legally entitle the use of CartoPlot. This should be called prior to the first instantiation of this component.- Parameters:
username
- the user namekey
- the license key
-
getModel
public TreeMapModel<N,Row,Column,Color,Font> getModel()
Returns the model used for the treemap.
-
setModel
public void setModel(TreeMapModel<N,Row,Column,Color,Font> model)
Sets the model to be used for the treemap and register it to the view.
-
getView
@JsMethod public TreeMapView<C,N,Row,Column,Color,Font> getView()
Returns the view used for the treemap.
-
setView
public void setView(TreeMapView<C,N,Row,Column,Color,Font> view)
Sets the view to be used for the treemap and register the model currently in use. It will also register itself to the controller.
-
getController
public TreeMapController<C,N,Row,Column,Color,Font> getController()
Returns the controller used for the treemap.
-
setController
public void setController(TreeMapController<C,N,Row,Column,Color,Font> controller)
Sets the controller to be used for the treemap and register the view currently in use.
-
setGroupBy
public void setGroupBy(int... columns)
Defines the fields to be use for grouping.- Specified by:
setGroupBy
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- 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.- Specified by:
setGroupByByNames
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columnNames
- the names of the columns to be used for grouping- See Also:
DefaultTreeMapSettings.getGroupByTreeMapFields()
-
setLabels
public void setLabels(int... columns)
Defines the fields to be use for labeling.
-
setLabelsByNames
public void setLabelsByNames(java.lang.String... columnNames)
Defines the fields to be use for labeling.- Specified by:
setLabelsByNames
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columnNames
- the names of the columns to be used for labeling- See Also:
DefaultTreeMapSettings.getLabelTreeMapFields()
-
setBackground
public void setBackground(int column)
Defines the field to use for background labeling.- Specified by:
setBackground
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
column
- the index of the column to be used for background labeling- See Also:
DefaultTreeMapSettings.getBackgroundTreeMapField()
-
setBackgroundByName
public void setBackgroundByName(java.lang.String columnName)
Defines the field to use for background labeling.- Specified by:
setBackgroundByName
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columnName
- the name of the column to be used for background labeling- See Also:
DefaultTreeMapSettings.getBackgroundTreeMapField()
-
setSize
public void setSize(int column)
Defines the field to use to represent the size.
-
setSizeByName
public void setSizeByName(java.lang.String columnName)
Defines the field to use to represent the size.- Specified by:
setSizeByName
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- 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.
-
setColorByName
public void setColorByName(java.lang.String columnName)
Defines the field to use for coloring.- Specified by:
setColorByName
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columnName
- the name of the column to be used for coloring- See Also:
DefaultTreeMapSettings.getColorTreeMapField()
-
setHeight
public void setHeight(int column)
Defines the field to use for mapping the height.
-
setHeightByName
public void setHeightByName(java.lang.String columnName)
Defines the field to use for mapping the height.- Specified by:
setHeightByName
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columnName
- the name of the column to be used for mapping the height- See Also:
DefaultTreeMapSettings.getHeightTreeMapField()
-
setToolTip
public void setToolTip(int... columns)
Defines the fields to be use for grouping.- Specified by:
setToolTip
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columns
- the indexes of the columns to be used for grouping- See Also:
DefaultTreeMapSettings.getGroupByTreeMapFields()
-
setToolTipByNames
public void setToolTipByNames(java.lang.String... columnNames)
Defines the fields to be use for grouping.- Specified by:
setToolTipByNames
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
columnNames
- the names of the columns to be used for grouping- See Also:
DefaultTreeMapSettings.getGroupByTreeMapFields()
-
setAlgorithm
public void setAlgorithm(Algorithm algorithm)
Defines the algorithm to use to lay out the treemap.- Specified by:
setAlgorithm
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
algorithm
- the algorithm to use- See Also:
TreeMapFieldSettings.getAlgorithm()
,AlgorithmFactory
-
setAggregation
public void setAggregation(Aggregation aggregation)
Defines the aggregation scheme to use to aggregate values of the treemap.- Specified by:
setAggregation
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
aggregation
- the aggregation scheme to use- See Also:
TreeMapFieldSettings.getAggregation()
,AggregationFactory
-
setScale
public void setScale(Scale scale)
Defines the scaling scheme to use to project values the treemap.- Specified by:
setScale
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
scale
- the scale scheme to use- See Also:
TreeMapFieldSettings.getScale()
,ScaleFactory
-
setNesting
public void setNesting(Nesting nesting)
Defines the nesting to use to lay out the treemap.- Specified by:
setNesting
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
nesting
- the nesting scheme to use- See Also:
TreeMapFieldSettings.getNesting()
,NestingFactory
-
setOrdering
public void setOrdering(Ordering ordering)
Defines the ordering to use to lay out the treemap.- Specified by:
setOrdering
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
ordering
- the ordering to use- See Also:
TreeMapFieldSettings.getOrdering()
,OrderingFactory
-
setDepth
public void setDepth(Depth depth)
Defines the depth to use to lay out the treemap.- Specified by:
setDepth
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
depth
- the depth to use- See Also:
DefaultTreeMapSettings.getDepth()
,DepthFactory
-
setLabeling
public void setLabeling(Labeling labeling)
Defines the labeling scheme to use to draw the treemap.- Specified by:
setLabeling
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
labeling
- the labeling schem to use- See Also:
DefaultTreeMapFieldSettings.getLabeling()
,LabelingFactory
-
setRendering
public void setRendering(Rendering rendering)
Defines the rendering scheme to use to draw the treemap.- Specified by:
setRendering
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
rendering
- the rendering scheme to use- See Also:
DefaultTreeMapSettings.getRendering()
,RenderingFactory
-
setLightSourceHeight
public void setLightSourceHeight(double value)
Sets the light source height used for drawing the cushions.- Specified by:
setLightSourceHeight
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
value
- the height- See Also:
DefaultTreeMapSettings.getLightSourceHeight()
-
setLightSourceAmbient
public void setLightSourceAmbient(double value)
Sets the light source ambient intensity used for drawing the cushions.- Specified by:
setLightSourceAmbient
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
value
- the ambient intensity- See Also:
DefaultTreeMapSettings.getLightSourceAmbient()
-
setLightSourceX
public void setLightSourceX(double value)
Sets the light source X position used for drawing the cushions.- Specified by:
setLightSourceX
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
value
- the X position- See Also:
DefaultTreeMapSettings.getLightSourceX()
-
setLightSourceY
public void setLightSourceY(double value)
Sets the light source Y position used for drawing the cushions.- Specified by:
setLightSourceY
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
value
- the Y position- See Also:
DefaultTreeMapSettings.getLightSourceY()
-
setLightSourceZ
public void setLightSourceZ(double value)
Sets the light source Z position used for drawing the cushions.- Specified by:
setLightSourceZ
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
value
- the Z position- See Also:
DefaultTreeMapSettings.getLightSourceZ()
-
setLabelingFont
public void setLabelingFont(com.macrofocus.igraphics.CPFont<Font> font)
Sets the font used for labeling.- Specified by:
setLabelingFont
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
font
- the font to be used- See Also:
TreeMapFieldSettings.getLabelingFont()
-
setLabelingForegroundColor
public void setLabelingForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the foreground color to use for drawing the labels.- Specified by:
setLabelingForegroundColor
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
color
- the color to be used- See Also:
TreeMapFieldSettings.getLabelingForeground()
-
setLabelingBackgroundColor
public void setLabelingBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the background color to use for drawing the labels.- Specified by:
setLabelingBackgroundColor
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
color
- the color to be used- See Also:
TreeMapFieldSettings.getLabelingEffectColor()
-
setHeaderFont
public void setHeaderFont(com.macrofocus.igraphics.CPFont<Font> font)
Sets the font used for labeling the headings.- Specified by:
setHeaderFont
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
font
- the font to be used- See Also:
TreeMapFieldSettings.getHeaderFont()
-
setHeaderForegroundColor
public void setHeaderForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the foreground color to use for drawing the headers.- Specified by:
setHeaderForegroundColor
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
color
- the color to be used- See Also:
TreeMapFieldSettings.getHeaderForeground()
-
setHeaderBackgroundColor
public void setHeaderBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)
Sets the background color to use for drawing the headers.- Specified by:
setHeaderBackgroundColor
in interfaceTreeMap<C,N,Row,Column,Color,Font>
- Parameters:
color
- the color to be used- See Also:
TreeMapFieldSettings.getHeaderBackground()
-
-