Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.unibe.iam.scg.archie.model
Class ChartModel

java.lang.Object
  extended by ch.unibe.iam.scg.archie.model.ChartModel

public class ChartModel
extends java.lang.Object

Represents a model of a chart. Contains information on how to render a chart.

$Id$


Field Summary
static int CHART_BAR
          Constant for bar chart types, 2.
static int CHART_PIE
          Constant for pie chart types, 1.
 
Constructor Summary
ChartModel()
           
 
Method Summary
 int getCategoryColumnIndex()
          Returns the index of the column used for grouping columns for each row in a bar chart.
 java.lang.String getChartName()
           
 int getChartType()
           
 int[] getColumns()
           
 DataSet getDataSet()
           
 int getKeysIndex()
           
 int[] getRows()
           
 int getValuesIndex()
           
 boolean hasDataSet()
          Checks whether the chart model has a dataset set.
 boolean hasValidChartType()
           
 boolean isLineChart()
          Checks whether the chart type is a line chart.
 boolean isThreeDimensional()
           
 boolean isValid()
           
 void setCategoryColumnIndex(int columnIndex)
           
 void setChartName(java.lang.String chartName)
           
 void setChartType(int chartType)
           
 void setColumns(int[] columns)
           
 void setDataSet(DataSet dataSet)
           
 void setKeysIndex(int keysIndex)
           
 void setLineChart(boolean isLineChart)
           
 void setRows(int[] rows)
           
 void setThreeDimensional(boolean isThreeDimensional)
           
 void setValuesIndex(int valuesIndex)
           
 java.lang.String toString()
          String representation of this chart model which means string representations of all chart model variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHART_PIE

public static final int CHART_PIE
Constant for pie chart types, 1.

See Also:
Constant Field Values

CHART_BAR

public static final int CHART_BAR
Constant for bar chart types, 2. Bar charts can also be handled as line charts as they both are created from a category dataset. There's a switch in the bar chart type that can be activated for line charts.

See Also:
Constant Field Values
Constructor Detail

ChartModel

public ChartModel()
Method Detail

setChartType

public void setChartType(int chartType)
Parameters:
chartType -

getChartType

public int getChartType()
Returns:
int chartType

getChartName

public java.lang.String getChartName()
Returns:
String ChartName

setChartName

public void setChartName(java.lang.String chartName)
Parameters:
chartName -

getDataSet

public DataSet getDataSet()
Returns:
DataSet

hasDataSet

public boolean hasDataSet()
Checks whether the chart model has a dataset set.

Returns:
True if the dataset in this model is other than null , false else.

setDataSet

public void setDataSet(DataSet dataSet)
Parameters:
dataSet -

getKeysIndex

public int getKeysIndex()
Returns:
int keysIndex

setKeysIndex

public void setKeysIndex(int keysIndex)
Parameters:
keysIndex -

getValuesIndex

public int getValuesIndex()
Returns:
int valuesIndex

setValuesIndex

public void setValuesIndex(int valuesIndex)
Parameters:
valuesIndex -

setRows

public void setRows(int[] rows)
Parameters:
rows -

getRows

public int[] getRows()
Returns:
rows

setColumns

public void setColumns(int[] columns)
Parameters:
columns -

getColumns

public int[] getColumns()
Returns:
rows

isThreeDimensional

public boolean isThreeDimensional()
Returns:
isThreeDimensional

setThreeDimensional

public void setThreeDimensional(boolean isThreeDimensional)
Parameters:
isThreeDimensional -

setCategoryColumnIndex

public void setCategoryColumnIndex(int columnIndex)
Parameters:
columnIndex -

getCategoryColumnIndex

public int getCategoryColumnIndex()
Returns the index of the column used for grouping columns for each row in a bar chart.

Returns:
The index of the column used for grouping columns for each row in a bar chart, or -1 if the index was not set yet.

setLineChart

public void setLineChart(boolean isLineChart)
Parameters:
isLineChart -

isLineChart

public boolean isLineChart()
Checks whether the chart type is a line chart. Line chart is a specialized case of a bar chart, so the chart type in the model also needs to be a bar chart.

Returns:
True if the chart type set in the model is a line chart, false else.

toString

public java.lang.String toString()
String representation of this chart model which means string representations of all chart model variables.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

isValid

public boolean isValid()
Returns:
true if this model is valid

hasValidChartType

public boolean hasValidChartType()
Returns:
true, if this model has a valid chartType defined.

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013