Class WAbstractChartModel
- java.lang.Object
-
- eu.webtoolkit.jwt.WObject
-
- eu.webtoolkit.jwt.chart.WAbstractChartModel
-
- Direct Known Subclasses:
WStandardChartProxyModel
public abstract class WAbstractChartModel extends WObject
An abstract model for use with JWt's charts.This abstract model is used by
WAbstractChartas data model.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
-
Constructor Summary
Constructors Constructor Description WAbstractChartModel()Creates a new chart model.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Signalchanged()A signal that notifies of any change to the model.java.util.EnumSet<ItemFlag>flags(int row, int column)Returns the item flags for the given row and column.WColorgetBarBrushColor(int row, int column)Returns the bar brush color to use for a given row and column.WColorgetBarPenColor(int row, int column)Returns the bar pen color to use for a given row and column.abstract intgetColumnCount()Returns the number of columns.abstract doublegetData(int row, int column)Returns data at a given row and column.WStringgetDisplayData(int row, int column)Returns display data at a given row and column.WStringgetHeaderData(int column)Returns the given column's header data.WColorgetMarkerBrushColor(int row, int column)Returns the marker brush color to use for a given row and column.WColorgetMarkerPenColor(int row, int column)Returns the marker pen color to use for a given row and column.java.lang.DoublegetMarkerScaleFactor(int row, int column)Returns the marker scale factor to use for a given row and column.abstract intgetRowCount()Returns the number of rows.WStringgetToolTip(int row, int column)Returns the tooltip text to use on a given row and column.WLinklink(int row, int column)Returns the link for a given row and column.MarkerTypemarkerType(int row, int column)Returns the marker type to use for a given row and column.-
Methods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
-
-
-
Method Detail
-
getData
public abstract double getData(int row, int column)Returns data at a given row and column.This value determines the position of a data point on the chart.
-
getDisplayData
public WString getDisplayData(int row, int column)
-
getHeaderData
public WString getHeaderData(int column)
Returns the given column's header data.This is used as the name in the legend for a data series.
Defaults to an empty string.
-
getToolTip
public WString getToolTip(int row, int column)
Returns the tooltip text to use on a given row and column.Defaults to an empty string, signifying that no tooltip should be shown.
-
flags
public java.util.EnumSet<ItemFlag> flags(int row, int column)
Returns the item flags for the given row and column.Only the ItemIsXHTMLText and ItemHasDeferredTooltip flags are supported for charts.
ItemIsXHTMLText determines whether the tooltip text should be rendered as XHTML or as plain text, and ItemHasDeferredTooltip makes it so that tooltips are only loaded on demand.
Note: An XHTML text tooltip will be forced to be deferred. Non-deferred XHTML tooltips are not supported.
Note: When not using deferred tooltips, the HTML <area> tag will be used. If there are many tooltips and the chart is interactive this may cause client-side performance issues. If deferred tooltips are used, this will cause some load on the server, as it calculates server-side what marker or bar the user is hovering over.
Note: If the chart is interactive, and tooltips are not deferred, they will be scaled according to the first Y axis, and thus multiple Y axes will not be supported in combination with plain tooltips.
-
link
public WLink link(int row, int column)
Returns the link for a given row and column.Defaults to an empty link, signifying that no link should be shown.
-
getMarkerPenColor
public WColor getMarkerPenColor(int row, int column)
Returns the marker pen color to use for a given row and column.This is used as the color of the outline of markers when drawing a
SeriesType.Point. The default is null, indicating that the default color, as determined byWDataSeries.getMarkerPen(), should be used.- See Also:
WDataSeries.setMarkerPen(WPen pen)
-
getMarkerBrushColor
public WColor getMarkerBrushColor(int row, int column)
Returns the marker brush color to use for a given row and column.This is used as the color of the brush used when drawing a
SeriesType.Point. The default is null, indicating that the default color, as determined byWDataSeries.getMarkerBrush(), should be used.- See Also:
WDataSeries.setMarkerBrush(WBrush brush)
-
markerType
public MarkerType markerType(int row, int column)
Returns the marker type to use for a given row and column.This is used as the shape of the marker used when drawing a PointSeries. The default is null, indicating that the default marker, as determined by
WDataSeries.getMarker(), should be used.- See Also:
WDataSeries.setMarker(MarkerType marker)
-
getBarPenColor
public WColor getBarPenColor(int row, int column)
Returns the bar pen color to use for a given row and column.This is used as the color of the outline of bars when drawing a
SeriesType.Bar. The default is null, indicating that the default color, as determined byWDataSeries.getPen(), should be used.- See Also:
WDataSeries.setPen(WPen pen)
-
getBarBrushColor
public WColor getBarBrushColor(int row, int column)
Returns the bar brush color to use for a given row and column.This is used as the color of the brush used when drawing a
SeriesType.Bar. The default is null, indicating that the default color, as determined byWDataSeries.getBrush(), should be used.- See Also:
WDataSeries.setBrush(WBrush brush)
-
getMarkerScaleFactor
public java.lang.Double getMarkerScaleFactor(int row, int column)Returns the marker scale factor to use for a given row and column.This is used to scale the size of the marker when drawing a
SeriesType.Point. The default is null, indicating that the default scale should be used.
-
getColumnCount
public abstract int getColumnCount()
Returns the number of columns.- See Also:
getRowCount()
-
getRowCount
public abstract int getRowCount()
Returns the number of rows.- See Also:
getColumnCount()
-
changed
public Signal changed()
A signal that notifies of any change to the model.Implementations should trigger this signal in order to update the chart.
-
-