lt.monarch.chart
Class IndexedChartElementEntity

java.lang.Object
  extended by lt.monarch.chart.IndexedChartElementEntity
All Implemented Interfaces:
java.io.Serializable, ChartEntity
Direct Known Subclasses:
MarkerDecorableSeries.MarkerEntity

public class IndexedChartElementEntity
extends java.lang.Object
implements ChartEntity, java.io.Serializable

Simple entity class for virtual chart objects which do not have a corresponding UI object and are indexed by an index. Bar chart bars and pie chart segments fall into this category.

See Also:
ChartEntity, Serialized Form

Constructor Summary
Constructor and Description
IndexedChartElementEntity(ChartEntity parentEntity, MetaDataModel metaModel, DataModel model, int index)
          Constructs a new IndexedChartElementEntity object with the specified parent entity, data model and index.
 
Method Summary
Modifier and Type Method and Description
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 void fillEntitySheet(java.util.Properties id)
          Fills in the property sheet of the entity.
protected  DataModel getDataModel()
           
 java.lang.String getDescription()
          Returns a textual description of the chart entity.
 int getIndex()
          Returns index of the entity.
protected  MetaDataModel getMetaDataModel()
           
 ChartEntity getParentEntity()
          Returns parent chart entity.
 java.lang.String getShortDescription()
          Returns a short textual description.
 int hashCode()
          Returns a nodeHash code value for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedChartElementEntity

public IndexedChartElementEntity(ChartEntity parentEntity,
                                 MetaDataModel metaModel,
                                 DataModel model,
                                 int index)
Constructs a new IndexedChartElementEntity object with the specified parent entity, data model and index. If the data model implements ChartDataModelAnnotations interface, it's getLabelAt and getDescriptionAt methods are used for this entity description.

Parameters:
parentEntity - the parent chart entity
metaModel - meta data model
model - the chart data model
index - the entity index
See Also:
getShortDescription(), getDescription()
Method Detail

hashCode

public int hashCode()
Returns a nodeHash code value for the object. The hash code for an IndexedChartElementEntity object is computed as getParentEntity().hashCode() + getIndex() + 1

Overrides:
hashCode in class java.lang.Object
Returns:
a nodeHash code value for this object.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if (o != null) && (getClass() != o.getClass()) and both these entities have the same parent entity and index

getShortDescription

public java.lang.String getShortDescription()
Returns a short textual description. If the object is constructed using constructor with data model parameter and if the data model implements ChartDataModelAnnotations interface, then value returned by model's getLabelAt method is used as short description of this entity. If data model isn't set returns null.

Specified by:
getShortDescription in interface ChartEntity
Returns:
description text

getDescription

public java.lang.String getDescription()
Returns a textual description of the chart entity. If the object is constructed using constructor with data model parameter and if the data model implements ChartDataModelAnnotations interface, then value returned by model's getLabelAt method is used as description of the entity. If data model isn't set returns null.

Specified by:
getDescription in interface ChartEntity
Returns:
description text

getParentEntity

public ChartEntity getParentEntity()
Returns parent chart entity.

Specified by:
getParentEntity in interface ChartEntity
Returns:
parent chart entity.

getIndex

public int getIndex()
Returns index of the entity.

Returns:
index of the entity.

fillEntitySheet

public void fillEntitySheet(java.util.Properties id)
Fills in the property sheet of the entity. Puts a "index" property into the property sheet. The value of the property is string representation of the entity index.

Specified by:
fillEntitySheet in interface ChartEntity
Parameters:
id - the property sheet
See Also:
ChartEntity.fillEntitySheet(java.util.Properties)

getMetaDataModel

protected MetaDataModel getMetaDataModel()

getDataModel

protected DataModel getDataModel()