Package org.dashbuilder.displayer.client
Interface Displayer
-
- All Superinterfaces:
DisplayerListener,com.google.gwt.user.client.ui.IsWidget
- All Known Implementing Classes:
AbstractDisplayer,AbstractErraiDisplayer,AbstractGwtDisplayer
public interface Displayer extends DisplayerListener, com.google.gwt.user.client.ui.IsWidget
A Displayer takes care of drawing a DisplayerSettings instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFormatter(String columnId, ValueFormatter formatter)Registers a custom formatter for the given columnvoidaddListener(DisplayerListener... listeners)Add a listener interested in receive events generated within this displayer component.voidclose()Frees any resource the displayer is consuming.voiddraw()Draw the chartvoidexport(ExportFormat format, int maxRows, ExportCallback callback)Export the data being displayed into the specified output format.DataSetHandlergetDataSetHandler()org.dashbuilder.displayer.DisplayerConstraintsgetDisplayerConstraints()Every Displayer implementation must define the set of features it supports as well as other behavioral settings.org.dashbuilder.displayer.DisplayerSettingsgetDisplayerSettings()booleanisDrawn()Check if the displayer is completely drawn.booleanisRefreshOn()Check if the automatic refresh is on.voidredraw()Same as draw but does not necessary implies to repaint everything again.voidsetDataSetHandler(DataSetHandler dataSetHandler)The handler used to fetch and manipulate the data set.voidsetDisplayerSettings(org.dashbuilder.displayer.DisplayerSettings displayerSettings)The data displayer to draw.voidsetRefreshOn(boolean enabled)Enables or disables the automatic refresh capability (enabled by default).-
Methods inherited from interface org.dashbuilder.displayer.client.DisplayerListener
onClose, onDataLoaded, onDataLookup, onDraw, onError, onFilterEnabled, onFilterEnabled, onFilterReset, onFilterReset, onFilterUpdate, onRedraw
-
-
-
-
Method Detail
-
setDisplayerSettings
void setDisplayerSettings(org.dashbuilder.displayer.DisplayerSettings displayerSettings)
The data displayer to draw.
-
getDisplayerSettings
org.dashbuilder.displayer.DisplayerSettings getDisplayerSettings()
-
setDataSetHandler
void setDataSetHandler(DataSetHandler dataSetHandler)
The handler used to fetch and manipulate the data set.
-
getDataSetHandler
DataSetHandler getDataSetHandler()
-
getDisplayerConstraints
org.dashbuilder.displayer.DisplayerConstraints getDisplayerConstraints()
Every Displayer implementation must define the set of features it supports as well as other behavioral settings. These "constrains" are needed for two main reasons:- Validation purposes: in order to ensure the DisplayerSettings are valid and ready for rendering.
- Edition purposes: in order to let the DisplayerEditor know what features/settings/behaviour this Displayer implementation supports.
-
addListener
void addListener(DisplayerListener... listeners)
Add a listener interested in receive events generated within this displayer component.
-
addFormatter
void addFormatter(String columnId, ValueFormatter formatter)
Registers a custom formatter for the given column
-
draw
void draw()
Draw the chart
-
redraw
void redraw()
Same as draw but does not necessary implies to repaint everything again. It's just a matter of update & display the latest data set changes.
-
isDrawn
boolean isDrawn()
Check if the displayer is completely drawn.
-
setRefreshOn
void setRefreshOn(boolean enabled)
Enables or disables the automatic refresh capability (enabled by default).- See Also:
DisplayerSettings.getRefreshInterval()
-
isRefreshOn
boolean isRefreshOn()
Check if the automatic refresh is on.
-
export
void export(ExportFormat format, int maxRows, ExportCallback callback)
Export the data being displayed into the specified output format.- Parameters:
format- The output formatmaxRows- Max rows to be exported. If lower or equals to 0 then all rows will be exported.callback- The callback instance to be notified
-
close
void close()
Frees any resource the displayer is consuming.
-
-