|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.models.MetaDataModel
public class MetaDataModel extends java.lang.Object implements java.io.Serializable
Meta data model. Used to set the styles for the specified series also style and labels for specified markers. Here are some examples of the meta data:
setData(MetaDataType.LABEL_DATA,"x1==null||x0==null","There is no data");
setData(MetaDataType.STYLE_DATA,"x1==null||x0==null",new Style());
setData(MetaDataType.HINT_DATA,"x1==null||x0==null","Wow!");
setData(MetaDataType.HINT_DATA,"$index$%2==0","Wow!");
setData(MetaDataType.HINT_DATA,"$row$==$column$","Diagonal!");
setData(MetaDataType.HINT_DATA,1,"$index$ data");
setData(MetaDataType.LABEL_DATA,"x1==200","$x1$ km/h");
setData(MetaDataType.LABEL_DATA,"x1<200","Too little");
setData(MetaDataType.LABEL_DATA,"x1==null","No data");
setData(MetaDataType.DATE_FORMAT,"yy.MM.dd");
setData(MetaDataType.NUMBER_FORMAT,"#.00");
setData(MetaDataType.BAR_WIDTH,"x0>70 && x0<100","x0/1000") This one is handy, since it lets to specify the bar width according to the logical expression and dynamic value according to the data model.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<MetaDataType,DataModelColumn> |
virtualColumns
|
| Constructor and Description |
|---|
MetaDataModel()
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
|
void |
dispose()
Disposes the object |
protected java.lang.String |
exchangeExpression(int index,
java.lang.String expression)
Exchanges $index$ value in the expression to be integer value |
protected void |
finalize()
|
java.lang.Object |
getData(MetaDataType dataType,
int index,
DataModel dataModel)
Gets the object for the specified data point (array model) |
java.lang.Object |
getData(MetaDataType dataType,
int row,
int column,
DataModel dataModel)
Gets the object for the specified data point (matrix model) |
java.lang.Object |
getData(MetaDataType dataType,
java.lang.String value,
int index)
Gets the object for the specified label |
void |
setData(MetaDataType dataType,
DataModelColumn column)
Sets the data type calculation function |
void |
setData(MetaDataType dataType,
int row,
int column,
java.lang.Object object)
Sets object for the specified data point (used for matrix) |
void |
setData(MetaDataType dataType,
int index,
java.lang.Object object)
Sets object for the specified data point (array) |
void |
setData(MetaDataType dataType,
java.lang.Object object)
Sets general object for all data points |
void |
setData(MetaDataType dataType,
java.lang.String logExpression,
java.lang.Object object)
Sets the label when the data point satisfies the logical expression |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<MetaDataType,DataModelColumn> virtualColumns
| Constructor Detail |
|---|
public MetaDataModel()
| Method Detail |
|---|
protected java.lang.String exchangeExpression(int index,
java.lang.String expression)
index - indexexpression - expression
public void setData(MetaDataType dataType,
java.lang.Object object)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.object - general object for all data points
public void setData(MetaDataType dataType,
int index,
java.lang.Object object)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.index - index of the data modelobject - object for specified index
public void setData(MetaDataType dataType,
int row,
int column,
java.lang.Object object)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.row - row of the data modelcolumn - column of the data modelobject - object for specified column and row
public void setData(MetaDataType dataType,
java.lang.String logExpression,
java.lang.Object object)
throws java.lang.Exception
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.logExpression - logical expression, which will have to be evaluated for each data pointobject - object, which satisfies the conditionjava.lang.Exception - throws exception if any error occurs parsing the logical formula
public void setData(MetaDataType dataType,
DataModelColumn column)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.column - function which evaluates data model data and returns required meta model value
public java.lang.Object getData(MetaDataType dataType,
int index,
DataModel dataModel)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.index - data point indexdataModel - data model
public java.lang.Object getData(MetaDataType dataType,
java.lang.String value,
int index)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.value - label to evaluate valueindex - label index
public java.lang.Object getData(MetaDataType dataType,
int row,
int column,
DataModel dataModel)
dataType - enumeration form MetaDataType, which specifies the type of the data: label,
hint, style and etc.row - row of the data modelcolumn - column of the data modeldataModel - matrix data modelpublic void dispose()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void clear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||