public class DataSetDataElement extends DataElement<de.esoco.lib.model.DataSet<?>>
DataSet
for a chart.Modifier and Type | Class and Description |
---|---|
static class |
DataSetDataElement.ChartType
Redefinition of chart types to make them available on the server side.
|
static class |
DataSetDataElement.LegendPosition
Redefinition of legend positions to make them available on the server
side.
|
DataElement.CopyMode, DataElement.Flag
Modifier and Type | Field and Description |
---|---|
static de.esoco.lib.property.PropertyName<java.lang.Boolean> |
CHART_3D
Boolean property: display chart in 3D
|
static de.esoco.lib.property.PropertyName<de.esoco.lib.property.Color> |
CHART_BACKGROUND
The chart background color
|
static de.esoco.lib.property.PropertyName<DataSetDataElement.LegendPosition> |
CHART_LEGEND_POSITION
Enum property: the legend position of the chart (for possible values see
DataSetDataElement.LegendPosition ) |
static de.esoco.lib.property.PropertyName<DataSetDataElement.ChartType> |
CHART_TYPE
Enum property: the type of the chart to render (for possible values see
DataSetDataElement.ChartType ) |
ALLOWED_VALUES_CHANGED, ANONYMOUS_ELEMENT_PREFIX, DISPLAY_FLAGS, HIDDEN_URL, INPUT_FLAGS, INTERACTION_URL, ITEM_ALL_RESOURCE, ITEM_NEW_RESOURCE, ITEM_RESOURCE_PREFIX, PATH_SEPARATOR_CHAR, SERVER_PROPERTIES
Constructor and Description |
---|
DataSetDataElement(java.lang.String sName,
de.esoco.lib.model.DataSet<?> aDataSet,
DataSetDataElement.ChartType eChartType,
DataSetDataElement.LegendPosition eLegendPosition,
java.lang.String sBackgroundColor,
boolean b3D)
Creates a new instance with certain display properties set.
|
DataSetDataElement(java.lang.String sName,
de.esoco.lib.model.DataSet<?> rDataSet,
java.util.Set<DataElement.Flag> rFlags)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
DataSetDataElement |
copy(DataElement.CopyMode eMode,
de.esoco.lib.property.PropertyName<?>... rCopyProperties)
Returns a copy of this data element that contains all or a subset of it's
current state.
|
de.esoco.lib.model.DataSet<?> |
getValue()
//~ Methods
----------------------------------------------------------------
/*************************************** Returns the value of this
element.
|
static void |
init()
This method should be invoked to initialize the property name constants
for de-serialization.
|
protected DataSetDataElement |
newInstance()
Returns a new instance of the respective data element sub-type on which
it is invoked.
|
protected void |
updateValue(de.esoco.lib.model.DataSet<?> rNewDataSet)
Updates the element value.
|
checkImmutable, checkValidValue, copyAttributes, copyValue, createItemName, createItemResource, createResourceId, equals, getAllowedValues, getElementValidator, getName, getParent, getPath, getResourceId, getRoot, getSimpleName, getValidator, getValueHashCode, hasEqualValueAs, hashCode, isImmutable, isModified, isOptional, isSelected, isValidValue, markAsChanged, readFrom, removeProperty, setModified, setProperty, setSelected, setStringValue, setValidator, setValue, toDebugString, toString, valuesEqual, writeTo
clearFlag, clearProperties, setFlag, setProperties, setProperty, setProperty
convertCollection, convertMap, convertValue, ensurePropertyMapExists, findValue, getIntProperty, getProperty, getPropertyCount, getPropertyMap, getPropertyNames, hasEqualProperties, hasFlag, hasProperty, parseCollection, parseMap, parseValue, setPropertyMap
public static final de.esoco.lib.property.PropertyName<DataSetDataElement.ChartType> CHART_TYPE
DataSetDataElement.ChartType
)public static final de.esoco.lib.property.PropertyName<DataSetDataElement.LegendPosition> CHART_LEGEND_POSITION
DataSetDataElement.LegendPosition
)public static final de.esoco.lib.property.PropertyName<de.esoco.lib.property.Color> CHART_BACKGROUND
public static final de.esoco.lib.property.PropertyName<java.lang.Boolean> CHART_3D
public DataSetDataElement(java.lang.String sName, de.esoco.lib.model.DataSet<?> rDataSet, java.util.Set<DataElement.Flag> rFlags)
sName
- The name of the data elementrDataSet
- The data set for the chartrFlags
- The flags for this instancepublic DataSetDataElement(java.lang.String sName, de.esoco.lib.model.DataSet<?> aDataSet, DataSetDataElement.ChartType eChartType, DataSetDataElement.LegendPosition eLegendPosition, java.lang.String sBackgroundColor, boolean b3D)
sName
- The name of the data elementaDataSet
- The chart dataeChartType
- The chart typeeLegendPosition
- The legend positionsBackgroundColor
- The chart background colorb3D
- TRUE for a 3D chartpublic static void init()
public DataSetDataElement copy(DataElement.CopyMode eMode, de.esoco.lib.property.PropertyName<?>... rCopyProperties)
flags
. Never
copied is the parent reference because upon copying typically a reference
to a copied parent needs to be set. The further data the copy contains
depends on the copy mode:
DataElement.CopyMode.FULL
: The copy contains all data (except the
parent reference).DataElement.CopyMode.FLAT
: like DataElement.CopyMode.FULL
but without
sub-ordinate data elements.DataElement.CopyMode.PROPERTIES
: The copy contains only the properties
but not the element value and attributes.DataElement.CopyMode.PLACEHOLDER
: The copy contains only the element
name to serve as a placeholder.The copy instance is created by invoking DataElement.newInstance()
which
has the recommendation to overwrite the return type to the concrete
subtype to prevent the need for casting by the invoking code. For the
same reason it is recommended that subclasses also override this method
with the concrete return type and cast the result of
super.copy()
to that type.
copy
in class DataElement<de.esoco.lib.model.DataSet<?>>
eMode
- The copy moderCopyProperties
- An optional list of properties to copy. If not
provided all properties will be copied (unless
the mode is DataElement.CopyMode.PLACEHOLDER
)public de.esoco.lib.model.DataSet<?> getValue()
DataElement
getValue
in class DataElement<de.esoco.lib.model.DataSet<?>>
DataElement.getValue()
protected DataSetDataElement newInstance()
DataElement.copy(CopyMode, PropertyName...)
for cloning an instance.
Implementations should overwrite the return type with their concrete type
to prevent the need for casting by the invoking code.newInstance
in class DataElement<de.esoco.lib.model.DataSet<?>>
protected void updateValue(de.esoco.lib.model.DataSet<?> rNewDataSet)
DataElement
DataElement.setValue(Object)
to store a new value after validation. If a subclass wants to reject
certain values it should do so in the DataElement.isValidValue(Validator,
Object)
method. Subclasses that are always immutable should implement an
assertion because if the element has been initialized correctly
(validator = NULL) this method should then be reached.updateValue
in class DataElement<de.esoco.lib.model.DataSet<?>>
rNewDataSet
- The new value for this elementDataElement.updateValue(Object)