org.askalon.graph.chart
Interface HierarchyChart

All Superinterfaces:
Chart, Cleanable, OrderedChart, SectionChart

public interface HierarchyChart
extends OrderedChart

Provides an interface for the hierarchy chart, providing access to basic functionality like the setting of values, descriptions, showing level and layouts.
The Hierarchy Chart is a very specialized chart to display data that is logically arranged in several levels of hierarchy. In other words the displayed values are the leaves of a tree with constant depth. The number of levels is unrestricted. The structure can vary dynamically at runtime, nodes can be added and removed. The user can select the lowest visible level. This chart supports real 3D (rotating, sizing, perspective, ...) and dynamic change of data. The exact values at any level can be observed. Many more options are available.

Author:
Georg Schild and Franz Endstrasser

Method Summary
 Color getColorForLevel(int level)
          Gets the (floor) color for a level.
 String getDescription(String[] path)
          Gets the description of the element at path in the tree.
 HierarchyLayout getLayoutForLevel(int level)
          Gets the current layout for the level.
 String getLevelName(int level)
          Gets the current name of the level specified by the index.
 String[] getLevelNames()
          Gets the current names of all levels for this chart.
 HierarchyMeanFormula getMeanFormula()
          Gets the mean formula for this hierarchy chart.
 int getNumLevels()
          Gets the number of levels (constant depth of the tree) for this hierachy chart.
 int getShowingLevel()
          Gets the current showing level, which is the lowest level of the tree which is graphically displayed.
 double[] getStandardDeviation(int level)
          Gets the standard deviation for all sections of the level and the total standard deviation for these sections.
 double getStandardDeviation(int level, int section)
          Gets the standard deviation for one section of the level specified by the index.
 int getTotalNumElementsForLevel(int level)
          Gets the total number of elements in the tree for this level.
 double getValue(String[] path, int section)
          Gets the value of the section at path.
 void removeAllChildren(String[] path)
          Removes all children of an element from the tree.
 void removeElement(String[] path)
          Removes an element from the tree.
 void setColorForLevel(int level, Color c)
          Sets the (floor) color for a level.
 void setDescription(String[] path, String desc)
          Sets the description for an element of the tree.
 void setLayoutForLevel(int level, HierarchyLayout layout)
          Sets the layout for a given level.
 void setLevelName(int level, String name)
          Sets the name of the level specified by the index.
 void setMeanFormula(HierarchyMeanFormula mf)
          Sets the mean formula for this hierarchy chart.
 void setShowingLevel(int level)
          Sets the current showing level, which is the lowest level of the tree which is graphically displayed.
 void setValue(String[] path, int section, double value)
          Sets the value of a section for low-level element.
 
Methods inherited from interface org.askalon.graph.chart.OrderedChart
decrementOrder, getOrder, incrementOrder, setOrder
 
Methods inherited from interface org.askalon.graph.chart.SectionChart
getSectionColor, getSectionCount, getSectionName, isVisible, setSectionColor, setSectionName, setVisible
 
Methods inherited from interface org.askalon.graph.chart.Chart
getChartConfiguration, getChartMenu, getChartName, getLegend, getUnit, getXAxisText, getYAxisText, isDisableUpdate, isEdgesVisible, refreshConfiguration, resetConfiguration, setChartConfiguration, setDisableUpdate, setEdgesVisible, setUnit, setXAxisText, setYAxisText
 
Methods inherited from interface org.askalon.graph.chart.base.Cleanable
cleanUp
 

Method Detail

setValue

void setValue(String[] path,
              int section,
              double value)
Sets the value of a section for low-level element. Higher levels will be updated according to the current mean-value function. Note that the tree got constant depth and setting of values is only valid at leaves-level (length of path is equals to the number of levels). If a new valid path is given, it will be added to the tree.

Parameters:
path - the path of the element which should be updated
section - the index of the section to update
value - the new value for this section
Throws:
IllegalArgumentException - if the length of the path is not equals the number of levels

getValue

double getValue(String[] path,
                int section)
Gets the value of the section at path. One can query values on all levels.

Parameters:
path -
section -
Returns:
value of section at path

setDescription

void setDescription(String[] path,
                    String desc)
Sets the description for an element of the tree. If a new path is given, the according element will be created an initialized with zero values.

Parameters:
path - the path of the element
desc - the description for the element

getDescription

String getDescription(String[] path)
Gets the description of the element at path in the tree.

Parameters:
path -
Returns:
description of element at path or null if no such element exists

removeElement

void removeElement(String[] path)
Removes an element from the tree. All children of the element will also be removed.

Parameters:
path - the path of the element to remove
See Also:
removeAllChildren(String[])

removeAllChildren

void removeAllChildren(String[] path)
Removes all children of an element from the tree.

Parameters:
path - the path of the element whose children should be removed
See Also:
removeElement(String[])

setLayoutForLevel

void setLayoutForLevel(int level,
                       HierarchyLayout layout)
Sets the layout for a given level.

Parameters:
level - the level for which the layout should be updated
layout - the new layout for this level
See Also:
getLayoutForLevel(int), HierarchyLayout

getLayoutForLevel

HierarchyLayout getLayoutForLevel(int level)
Gets the current layout for the level.

Parameters:
level - the level whose layout should be returned
Returns:
the current layout of this level
See Also:
setLayoutForLevel(int, HierarchyLayout), HierarchyLayout

setShowingLevel

void setShowingLevel(int level)
Sets the current showing level, which is the lowest level of the tree which is graphically displayed.

Parameters:
level - the new showing level
See Also:
getShowingLevel()

getShowingLevel

int getShowingLevel()
Gets the current showing level, which is the lowest level of the tree which is graphically displayed.

Returns:
the current showing level, starting from 0 (level of leaves)
See Also:
setShowingLevel(int)

getNumLevels

int getNumLevels()
Gets the number of levels (constant depth of the tree) for this hierachy chart.

Returns:
the number of levels
See Also:
getShowingLevel()

getLevelName

String getLevelName(int level)
Gets the current name of the level specified by the index.

Parameters:
level - the index of the level
Returns:
the name of this level
See Also:
getLevelNames(), setLevelName(int, String)

getLevelNames

String[] getLevelNames()
Gets the current names of all levels for this chart.

Returns:
all names as array with length equals to the number of levels
See Also:
getNumLevels(), getLevelName(int), setLevelName(int, String)

setLevelName

void setLevelName(int level,
                  String name)
Sets the name of the level specified by the index.

Parameters:
level - the index of the level
name - the new name for this level
See Also:
getNumLevels(), getLevelName(int), getLevelNames()

getStandardDeviation

double getStandardDeviation(int level,
                            int section)
Gets the standard deviation for one section of the level specified by the index.

Parameters:
level - the index of the level for which the standard deviation should be returned
section - the index of the section
Returns:
the standard deviation for the given level and section
See Also:
getStandardDeviation(int)

getStandardDeviation

double[] getStandardDeviation(int level)
Gets the standard deviation for all sections of the level and the total standard deviation for these sections.

Parameters:
level - the index of the level
Returns:
an array with the length number of sections + 1 containing one entry for each section and the last entry containing the total standard deviation for all sections
See Also:
getStandardDeviation(int, int)

getTotalNumElementsForLevel

int getTotalNumElementsForLevel(int level)
Gets the total number of elements in the tree for this level.

Parameters:
level - the index of the level
Returns:
the number of elements at this level

getColorForLevel

Color getColorForLevel(int level)
Gets the (floor) color for a level.

Parameters:
level - the index of the level
Returns:
the floor color of this level
See Also:
setColorForLevel(int, Color)

setColorForLevel

void setColorForLevel(int level,
                      Color c)
Sets the (floor) color for a level.

Parameters:
level - the index of the level
c - the new color for this level
See Also:
getColorForLevel(int)

setMeanFormula

void setMeanFormula(HierarchyMeanFormula mf)
Sets the mean formula for this hierarchy chart. The mean formula is used by the parents to summarize the values of their children.

Parameters:
mf - the new mean forumla to use
See Also:
HierarchyMeanFormula, getMeanFormula()

getMeanFormula

HierarchyMeanFormula getMeanFormula()
Gets the mean formula for this hierarchy chart. The mean formula is used by the parents to summarize the values of their children.

Returns:
the currently used mean formula
See Also:
HierarchyMeanFormula, setMeanFormula(HierarchyMeanFormula)


Part of:
Askalon_Logo
ASKALON Visualisation Diagrams