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>controllerprotected static LicenseModellicenseModelprotected 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.voidsetAggregation(Aggregation aggregation)Defines the aggregation scheme to use to aggregate values of the treemap.voidsetAlgorithm(Algorithm algorithm)Defines the algorithm to use to lay out the treemap.voidsetBackground(int column)Defines the field to use for background labeling.voidsetBackgroundByName(java.lang.String columnName)Defines the field to use for background labeling.voidsetColor(int column)Defines the field to use for coloring.voidsetColorByName(java.lang.String columnName)Defines the field to use for coloring.voidsetController(TreeMapController<C,N,Row,Column,Color,Font> controller)Sets the controller to be used for the treemap and register the view currently in use.voidsetDepth(Depth depth)Defines the depth to use to lay out the treemap.voidsetGroupBy(int... columns)Defines the fields to be use for grouping.voidsetGroupByByNames(java.lang.String... columnNames)Defines the fields to be use for grouping.voidsetHeaderBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the background color to use for drawing the headers.voidsetHeaderFont(com.macrofocus.igraphics.CPFont<Font> font)Sets the font used for labeling the headings.voidsetHeaderForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the foreground color to use for drawing the headers.voidsetHeight(int column)Defines the field to use for mapping the height.voidsetHeightByName(java.lang.String columnName)Defines the field to use for mapping the height.voidsetLabeling(Labeling labeling)Defines the labeling scheme to use to draw the treemap.voidsetLabelingBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the background color to use for drawing the labels.voidsetLabelingFont(com.macrofocus.igraphics.CPFont<Font> font)Sets the font used for labeling.voidsetLabelingForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)Sets the foreground color to use for drawing the labels.voidsetLabels(int... columns)Defines the fields to be use for labeling.voidsetLabelsByNames(java.lang.String... columnNames)Defines the fields to be use for labeling.static voidsetLicenseKey(java.lang.String username, java.lang.String key)Register the license key that legally entitle the use of CartoPlot.voidsetLightSourceAmbient(double value)Sets the light source ambient intensity used for drawing the cushions.voidsetLightSourceHeight(double value)Sets the light source height used for drawing the cushions.voidsetLightSourceX(double value)Sets the light source X position used for drawing the cushions.voidsetLightSourceY(double value)Sets the light source Y position used for drawing the cushions.voidsetLightSourceZ(double value)Sets the light source Z position used for drawing the cushions.voidsetModel(TreeMapModel<N,Row,Column,Color,Font> model)Sets the model to be used for the treemap and register it to the view.voidsetNesting(Nesting nesting)Defines the nesting to use to lay out the treemap.voidsetOrdering(Ordering ordering)Defines the ordering to use to lay out the treemap.voidsetRendering(Rendering rendering)Defines the rendering scheme to use to draw the treemap.voidsetScale(Scale scale)Defines the scaling scheme to use to project values the treemap.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.voidsetToolTip(int... columns)Defines the fields to be use for grouping.voidsetToolTipByNames(java.lang.String... columnNames)Defines the fields to be use for grouping.voidsetView(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:
setGroupByin 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:
setGroupByByNamesin 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:
setLabelsByNamesin 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:
setBackgroundin 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:
setBackgroundByNamein 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:
setSizeByNamein 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:
setColorByNamein 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:
setHeightByNamein 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:
setToolTipin 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:
setToolTipByNamesin 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:
setAlgorithmin 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:
setAggregationin 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:
setScalein 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:
setNestingin 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:
setOrderingin 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:
setDepthin 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:
setLabelingin 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:
setRenderingin 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:
setLightSourceHeightin 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:
setLightSourceAmbientin 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:
setLightSourceXin 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:
setLightSourceYin 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:
setLightSourceZin 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:
setLabelingFontin 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:
setLabelingForegroundColorin 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:
setLabelingBackgroundColorin 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:
setHeaderFontin 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:
setHeaderForegroundColorin 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:
setHeaderBackgroundColorin interfaceTreeMap<C,N,Row,Column,Color,Font>- Parameters:
color- the color to be used- See Also:
TreeMapFieldSettings.getHeaderBackground()
-
-