Class Chart<T>
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- com.googlecode.wicket.jquery.core.JQueryContainer
-
- com.googlecode.wicket.jquery.core.JQueryGenericContainer<List<T>>
-
- com.googlecode.wicket.kendo.ui.dataviz.chart.Chart<T>
-
- Type Parameters:
T
- the model object type. It is recommended that the object type implementsJSONString
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.IJQueryWidget
,IChartListener
,Serializable
,Iterable<org.apache.wicket.Component>
,org.apache.wicket.event.IEventSink
,org.apache.wicket.event.IEventSource
,org.apache.wicket.feedback.IFeedbackContributor
,org.apache.wicket.IConverterLocator
,org.apache.wicket.IGenericComponent<List<T>,com.googlecode.wicket.jquery.core.JQueryGenericContainer<List<T>>>
,org.apache.wicket.IMetadataContext<Serializable,org.apache.wicket.Component>
,org.apache.wicket.markup.html.IHeaderContributor
,org.apache.wicket.request.component.IRequestableComponent
,org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>
,org.apache.wicket.util.io.IClusterable
public class Chart<T> extends com.googlecode.wicket.jquery.core.JQueryGenericContainer<List<T>> implements IChartListener
Provides a Kendo UI chart- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Chart(String id, List<Series> series)
ConstructorChart(String id, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorChart(String id, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
ConstructorChart(String id, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Main constructorChart(String id, List<T> data, List<Series> series)
ConstructorChart(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorChart(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
ConstructorChart(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorChart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series)
ConstructorChart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorChart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
ConstructorChart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Main constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CharSequence
getCallbackUrl()
Gets the data-provider behavior's urlprotected com.googlecode.wicket.jquery.core.converter.IJsonConverter<T>
getConverter()
Gets theIJsonConverter
List<Series>
getSeries()
void
hide(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Hides theChart
boolean
isSeriesClickEventEnabled()
Indicates whether the 'seriesClick' event is enabled.
If true, theIChartListener.onSeriesClick(AjaxRequestTarget, String, String, String, long)
event will be triggered by clicking an event or a free event slot.protected com.googlecode.wicket.jquery.core.behavior.AjaxCallbackBehavior
newListModelBehavior(org.apache.wicket.model.IModel<List<T>> model, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Gets a newAjaxCallbackBehavior
com.googlecode.wicket.jquery.core.JQueryBehavior
newWidgetBehavior(String selector)
void
onBeforeRender(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
void
onConfigure(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
protected void
onConfigure(KendoDataSource dataSource)
Configure theKendoDataSource
with additional optionsvoid
onHide(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when theChart
hidesprotected void
onInitialize()
void
onSeriesClick(org.apache.wicket.ajax.AjaxRequestTarget target, String seriesName, String seriesField, String category, long value)
Triggered when a series is clickedvoid
onShow(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when theChart
showsvoid
refresh(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Refreshes the widget by reading from the datasourcevoid
reload(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
void
show(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Shows theChart
String
widget()
Gets the Kendo UI widget-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IGenericComponent
getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObject
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Chart
public Chart(String id, List<Series> series)
Constructor- Parameters:
id
- the markup idseries
- theList
ofSeries
-
Chart
public Chart(String id, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
Constructor- Parameters:
id
- the markup idseries
- theList
ofSeries
options
- theOptions
-
Chart
public Chart(String id, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Constructor- Parameters:
id
- the markup idseries
- theList
ofSeries
converter
- theIJsonConverter
-
Chart
public Chart(String id, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Main constructor- Parameters:
id
- the markup idseries
- theList
ofSeries
options
- theOptions
converter
- theIJsonConverter
-
Chart
public Chart(String id, List<T> data, List<Series> series)
Constructor- Parameters:
id
- the markup iddata
- the list of dataseries
- theList
ofSeries
-
Chart
public Chart(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
Constructor- Parameters:
id
- the markup iddata
- the list of dataseries
- theList
ofSeries
options
- theOptions
-
Chart
public Chart(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Constructor- Parameters:
id
- the markup iddata
- the list of dataseries
- theList
ofSeries
converter
- theIJsonConverter
-
Chart
public Chart(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Constructor- Parameters:
id
- the markup iddata
- the list of dataseries
- theList
ofSeries
options
- theOptions
converter
- theIJsonConverter
-
Chart
public Chart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series)
Constructor- Parameters:
id
- the markup idmodel
- the list model of dataseries
- theList
ofSeries
-
Chart
public Chart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
Constructor- Parameters:
id
- the markup idmodel
- the list model of dataseries
- theList
ofSeries
options
- theOptions
-
Chart
public Chart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Constructor- Parameters:
id
- the markup idmodel
- the list model of dataseries
- theList
ofSeries
converter
- theIJsonConverter
-
Chart
public Chart(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Main constructor- Parameters:
id
- the markup idmodel
- the list model of dataseries
- theList
ofSeries
options
- theOptions
converter
- theIJsonConverter
-
-
Method Detail
-
widget
public String widget()
Gets the Kendo UI widget- Returns:
- the jQuery object
-
show
public final void show(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Shows theChart
- Parameters:
handler
- theIPartialPageRequestHandler
-
hide
public final void hide(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Hides theChart
- Parameters:
handler
- theIPartialPageRequestHandler
-
reload
public void reload(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
- Parameters:
handler
- theIPartialPageRequestHandler
-
refresh
public void refresh(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Refreshes the widget by reading from the datasource- Parameters:
handler
- theIPartialPageRequestHandler
-
getCallbackUrl
protected final CharSequence getCallbackUrl()
Gets the data-provider behavior's url- Returns:
- the data-provider behavior's url
-
getConverter
protected final com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> getConverter()
Gets theIJsonConverter
- Returns:
- the
IJsonConverter
-
isSeriesClickEventEnabled
public boolean isSeriesClickEventEnabled()
Description copied from interface:IChartListener
Indicates whether the 'seriesClick' event is enabled.
If true, theIChartListener.onSeriesClick(AjaxRequestTarget, String, String, String, long)
event will be triggered by clicking an event or a free event slot.- Specified by:
isSeriesClickEventEnabled
in interfaceIChartListener
- Returns:
false
by default
-
onInitialize
protected void onInitialize()
- Overrides:
onInitialize
in classcom.googlecode.wicket.jquery.core.JQueryContainer
-
onConfigure
public void onConfigure(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
- Specified by:
onConfigure
in interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
- Overrides:
onConfigure
in classcom.googlecode.wicket.jquery.core.JQueryContainer
-
onConfigure
protected void onConfigure(KendoDataSource dataSource)
Configure theKendoDataSource
with additional options- Parameters:
dataSource
- theKendoDataSource
-
onBeforeRender
public void onBeforeRender(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
- Specified by:
onBeforeRender
in interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
- Overrides:
onBeforeRender
in classcom.googlecode.wicket.jquery.core.JQueryContainer
-
onShow
public void onShow(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when theChart
shows- Parameters:
handler
- theIPartialPageRequestHandler
-
onHide
public void onHide(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when theChart
hides- Parameters:
handler
- theIPartialPageRequestHandler
-
onSeriesClick
public void onSeriesClick(org.apache.wicket.ajax.AjaxRequestTarget target, String seriesName, String seriesField, String category, long value)
Description copied from interface:IChartListener
Triggered when a series is clicked- Specified by:
onSeriesClick
in interfaceIChartListener
- Parameters:
target
- theAjaxRequestTarget
seriesName
- the series nameseriesField
- the series fieldcategory
- the current category of the pointvalue
- the current value
-
newWidgetBehavior
public com.googlecode.wicket.jquery.core.JQueryBehavior newWidgetBehavior(String selector)
- Specified by:
newWidgetBehavior
in interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
-
newListModelBehavior
protected com.googlecode.wicket.jquery.core.behavior.AjaxCallbackBehavior newListModelBehavior(org.apache.wicket.model.IModel<List<T>> model, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Gets a newAjaxCallbackBehavior
- Parameters:
model
- the @List
Model
converter
- theIJsonConverter
- Returns:
- a new
ListModelBehavior
, by default
-
-