Class WStandardChartProxyModel
public class WStandardChartProxyModel extends WAbstractChartModel
WAbstractChartModel
implementation that wraps a WAbstractItemModel
.
This model delegates all functions to an underlying WAbstractItemModel
, using the
appropriate roles.
This model also triggers the WAbstractChartModel.changed()
signal whenever the
underlying WAbstractItemModel
is changed.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
Constructors Constructor Description WStandardChartProxyModel(WAbstractItemModel sourceModel)
Creates a newWStandardChartProxyModel
that wraps the given source model.WStandardChartProxyModel(WAbstractItemModel sourceModel, WObject parent)
Creates a newWStandardChartProxyModel
that wraps the given source model. -
Method Summary
Modifier and Type Method Description java.util.EnumSet<ItemFlag>
flags(int row, int column)
Returns the item flags for the given row and column.WColor
getBarBrushColor(int row, int column)
Returns the bar brush color to use for a given row and column.WColor
getBarPenColor(int row, int column)
Returns the bar pen color to use for a given row and column.int
getColumnCount()
Returns the number of columns.double
getData(int row, int column)
Returns data at a given row and column.WString
getDisplayData(int row, int column)
Returns display data at a given row and column.WString
getHeaderData(int column)
Returns the given column's header data.WColor
getMarkerBrushColor(int row, int column)
Returns the marker brush color to use for a given row and column.WColor
getMarkerPenColor(int row, int column)
Returns the marker pen color to use for a given row and column.java.lang.Double
getMarkerScaleFactor(int row, int column)
Returns the marker scale factor to use for a given row and column.int
getRowCount()
Returns the number of rows.WAbstractItemModel
getSourceModel()
Returns the wrapped source model.WString
getToolTip(int row, int column)
Returns the tooltip text to use on a given row and column.WLink
link(int row, int column)
Returns the link to use on a given row and column.MarkerType
markerType(int row, int column)
Returns the marker type to use for a given row and column.Methods inherited from class eu.webtoolkit.jwt.chart.WAbstractChartModel
changed
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getId, getObjectName, remove, setFormData, setObjectName, tr
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WStandardChartProxyModel
Creates a newWStandardChartProxyModel
that wraps the given source model. -
WStandardChartProxyModel
Creates a newWStandardChartProxyModel
that wraps the given source model.
-
-
Method Details
-
getData
public double getData(int row, int column)Returns data at a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theDisplayRole
as a double.- Specified by:
getData
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getDisplayData
Returns display data at a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theDisplayRole
as aWString
.- Overrides:
getDisplayData
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getHeaderData
Returns the given column's header data.Returns the result of
WAbstractItemModel#getHeaderData()
for the given column with theDisplayRole
as aWString
.- Overrides:
getHeaderData
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getHeaderData(int section, Orientation orientation, int role)
-
getToolTip
Returns the tooltip text to use on a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theToolTipRole
as aWString
.- Overrides:
getToolTip
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
flags
Returns the item flags for the given row and column.Returns the result of WAbstractItemModel::index(row, column).
flags()
for the given row and column.- Overrides:
flags
in classWAbstractChartModel
- See Also:
WModelIndex.getFlags()
-
link
Returns the link to use on a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theLinkRole
as aWLink
.- Overrides:
link
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getMarkerPenColor
Returns the marker pen color to use for a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theMarkerPenColorRole
, or null if no color is defined.- Overrides:
getMarkerPenColor
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getMarkerBrushColor
Returns the marker brush color to use for a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theMarkerBrushColorRole
, or null if no color is defined.- Overrides:
getMarkerBrushColor
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
markerType
Returns the marker type to use for a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theMarkerTypeRole
, or null if no marker type is defined.- Overrides:
markerType
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getBarPenColor
Returns the bar pen color to use for a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theBarPenColorRole
, or null if no color is defined.- Overrides:
getBarPenColor
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getBarBrushColor
Returns the bar brush color to use for a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theBarBrushColorRole
, or null if no color is defined.- Overrides:
getBarBrushColor
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getMarkerScaleFactor
public java.lang.Double getMarkerScaleFactor(int row, int column)Returns the marker scale factor to use for a given row and column.Returns the result of
WAbstractItemModel#getData()
for the given row and column with theMarkerScaleFactorRole
, or null if no color is defined.- Overrides:
getMarkerScaleFactor
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
getColumnCount
public int getColumnCount()Returns the number of columns.- Specified by:
getColumnCount
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getColumnCount(WModelIndex parent)
-
getRowCount
public int getRowCount()Returns the number of rows.- Specified by:
getRowCount
in classWAbstractChartModel
- See Also:
WAbstractItemModel.getRowCount(WModelIndex parent)
-
getSourceModel
Returns the wrapped source model.
-