Class Chart<T>

  • Type Parameters:
    T - the model object type. It is recommended that the object type implements JSONString
    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
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.googlecode.wicket.jquery.core.IJQueryWidget

        com.googlecode.wicket.jquery.core.IJQueryWidget.JQueryWidget
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.googlecode.wicket.jquery.core.Options options  
      protected List<Series> series  
      • Fields inherited from class com.googlecode.wicket.jquery.core.JQueryContainer

        widgetBehavior
      • Fields inherited from class org.apache.wicket.Component

        ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
    • Constructor Summary

      Constructors 
      Constructor Description
      Chart​(String id, List<Series> series)
      Constructor
      Chart​(String id, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Constructor
      Chart​(String id, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
      Constructor
      Chart​(String id, List<Series> series, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Main constructor
      Chart​(String id, List<T> data, List<Series> series)
      Constructor
      Chart​(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Constructor
      Chart​(String id, List<T> data, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
      Constructor
      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
      Chart​(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series)
      Constructor
      Chart​(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Constructor
      Chart​(String id, org.apache.wicket.model.IModel<List<T>> model, List<Series> series, com.googlecode.wicket.jquery.core.Options options)
      Constructor
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected CharSequence getCallbackUrl()
      Gets the data-provider behavior's url
      protected com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> getConverter()
      Gets the IJsonConverter
      List<Series> getSeries()
      Gets the read-only List of Series
      void hide​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Hides the Chart
      boolean isSeriesClickEventEnabled()
      Indicates whether the 'seriesClick' event is enabled.
      If true, the IChartListener.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 new AjaxCallbackBehavior
      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 the KendoDataSource with additional options
      void onHide​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Triggered when the Chart hides
      protected void onInitialize()  
      void onSeriesClick​(org.apache.wicket.ajax.AjaxRequestTarget target, String seriesName, String seriesField, String category, long value)
      Triggered when a series is clicked
      void onShow​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Triggered when the Chart shows
      void refresh​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Refreshes the widget by reading from the datasource
      void reload​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Reloads the Chart
      Equivalent to handler.add(table)
      void show​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Shows the Chart
      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 interface org.apache.wicket.IGenericComponent

        getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObject
    • Field Detail

      • options

        protected final com.googlecode.wicket.jquery.core.Options options
    • Constructor Detail

      • Chart

        public Chart​(String id,
                     List<Series> series)
        Constructor
        Parameters:
        id - the markup id
        series - the List of Series
      • Chart

        public Chart​(String id,
                     List<Series> series,
                     com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        id - the markup id
        series - the List of Series
        options - the Options
      • Chart

        public Chart​(String id,
                     List<Series> series,
                     com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
        Constructor
        Parameters:
        id - the markup id
        series - the List of Series
        converter - the IJsonConverter
      • 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 id
        series - the List of Series
        options - the Options
        converter - the IJsonConverter
      • Chart

        public Chart​(String id,
                     List<T> data,
                     List<Series> series)
        Constructor
        Parameters:
        id - the markup id
        data - the list of data
        series - the List of Series
      • Chart

        public Chart​(String id,
                     List<T> data,
                     List<Series> series,
                     com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        id - the markup id
        data - the list of data
        series - the List of Series
        options - the Options
      • 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 id
        data - the list of data
        series - the List of Series
        converter - the IJsonConverter
      • 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 id
        data - the list of data
        series - the List of Series
        options - the Options
        converter - the IJsonConverter
      • Chart

        public Chart​(String id,
                     org.apache.wicket.model.IModel<List<T>> model,
                     List<Series> series)
        Constructor
        Parameters:
        id - the markup id
        model - the list model of data
        series - the List of Series
      • 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 id
        model - the list model of data
        series - the List of Series
        options - the Options
      • 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 id
        model - the list model of data
        series - the List of Series
        converter - the IJsonConverter
      • 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 id
        model - the list model of data
        series - the List of Series
        options - the Options
        converter - the IJsonConverter
    • 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 the Chart
        Parameters:
        handler - the IPartialPageRequestHandler
      • hide

        public final void hide​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Hides the Chart
        Parameters:
        handler - the IPartialPageRequestHandler
      • reload

        public void reload​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Reloads the Chart
        Equivalent to handler.add(table)
        Parameters:
        handler - the IPartialPageRequestHandler
      • refresh

        public void refresh​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Refreshes the widget by reading from the datasource
        Parameters:
        handler - the IPartialPageRequestHandler
      • getSeries

        public final List<Series> getSeries()
        Gets the read-only List of Series
        Returns:
        the List of Series
      • 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 the IJsonConverter
        Returns:
        the IJsonConverter
      • onInitialize

        protected void onInitialize()
        Overrides:
        onInitialize in class com.googlecode.wicket.jquery.core.JQueryContainer
      • onConfigure

        public void onConfigure​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
        Specified by:
        onConfigure in interface com.googlecode.wicket.jquery.core.IJQueryWidget
        Overrides:
        onConfigure in class com.googlecode.wicket.jquery.core.JQueryContainer
      • onBeforeRender

        public void onBeforeRender​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
        Specified by:
        onBeforeRender in interface com.googlecode.wicket.jquery.core.IJQueryWidget
        Overrides:
        onBeforeRender in class com.googlecode.wicket.jquery.core.JQueryContainer
      • onShow

        public void onShow​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Triggered when the Chart shows
        Parameters:
        handler - the IPartialPageRequestHandler
      • onHide

        public void onHide​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Triggered when the Chart hides
        Parameters:
        handler - the IPartialPageRequestHandler
      • 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 interface IChartListener
        Parameters:
        target - the AjaxRequestTarget
        seriesName - the series name
        seriesField - the series field
        category - the current category of the point
        value - the current value
      • newWidgetBehavior

        public com.googlecode.wicket.jquery.core.JQueryBehavior newWidgetBehavior​(String selector)
        Specified by:
        newWidgetBehavior in interface com.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 new AjaxCallbackBehavior
        Parameters:
        model - the @List Model
        converter - the IJsonConverter
        Returns:
        a new ListModelBehavior, by default