Class Diagram<T extends IDiagramNode<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, IDiagramListener, 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 Diagram<T extends IDiagramNode<T>>
    extends com.googlecode.wicket.jquery.core.JQueryGenericContainer<List<T>>
    implements IDiagramListener
    Provides a Kendo UI diagram
    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  
      • 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
      Diagram​(String id)
      Constructor
      Diagram​(String id, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Constructor
      Diagram​(String id, com.googlecode.wicket.jquery.core.Options options)
      Constructor
      Diagram​(String id, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Main constructor
      Diagram​(String id, List<T> data)
      Constructor
      Diagram​(String id, List<T> data, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Constructor
      Diagram​(String id, List<T> data, com.googlecode.wicket.jquery.core.Options options)
      constructor
      Diagram​(String id, List<T> data, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      constructor
      Diagram​(String id, org.apache.wicket.model.IModel<List<T>> model)
      Constructor
      Diagram​(String id, org.apache.wicket.model.IModel<List<T>> model, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
      Constructor
      Diagram​(String id, org.apache.wicket.model.IModel<List<T>> model, com.googlecode.wicket.jquery.core.Options options)
      Main constructor
      Diagram​(String id, org.apache.wicket.model.IModel<List<T>> model, 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
      boolean isClickEventEnabled()
      Indicates whether the 'click' event is enabled.
      If true, the IDiagramListener.onClick(AjaxRequestTarget, JSONObject) event will be triggered when clicking on an item
      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 AbstractAjaxBehavior
      com.googlecode.wicket.jquery.core.JQueryBehavior newWidgetBehavior​(String selector)  
      void onBeforeRender​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)  
      void onClick​(org.apache.wicket.ajax.AjaxRequestTarget target, com.github.openjson.JSONObject object)
      Triggered when a diagram item is clicked
      void onClick​(org.apache.wicket.ajax.AjaxRequestTarget target, T object)
      Triggered when a series is clicked
      void onConfigure​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)  
      protected void onConfigure​(KendoDataSource.HierarchicalDataSource dataSource)
      Configure the KendoDataSource.HierarchicalDataSource with additional options
      protected void onInitialize()  
      void refresh​(org.apache.wicket.ajax.AjaxRequestTarget target)
      Refreshes the widget by reading from the datasource
      void reload​(org.apache.wicket.ajax.AjaxRequestTarget target)
      Reloads the Diagram
      Equivalent to handler.add(table)
      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

      • Diagram

        public Diagram​(String id)
        Constructor
        Parameters:
        id - the markup id
      • Diagram

        public Diagram​(String id,
                       com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        id - the markup id
        options - the Options
      • Diagram

        public Diagram​(String id,
                       com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
        Constructor
        Parameters:
        id - the markup id
        converter - the IJsonConverter
      • Diagram

        public Diagram​(String id,
                       com.googlecode.wicket.jquery.core.Options options,
                       com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
        Main constructor
        Parameters:
        id - the markup id
        options - the Options
        converter - the IJsonConverter
      • Diagram

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

        public Diagram​(String id,
                       List<T> data,
                       com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
        Constructor
        Parameters:
        id - the markup id
        data - the list of data
        converter - the IJsonConverter
      • Diagram

        public Diagram​(String id,
                       List<T> data,
                       com.googlecode.wicket.jquery.core.Options options)
        constructor
        Parameters:
        id - the markup id
        data - the list of data
        options - the Options
      • Diagram

        public Diagram​(String id,
                       List<T> data,
                       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
        options - the Options
        converter - the IJsonConverter
      • Diagram

        public Diagram​(String id,
                       org.apache.wicket.model.IModel<List<T>> model)
        Constructor
        Parameters:
        id - the markup id
        model - the list model of data
      • Diagram

        public Diagram​(String id,
                       org.apache.wicket.model.IModel<List<T>> model,
                       com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
        Constructor
        Parameters:
        id - the markup id
        model - the list model of data
        converter - the IJsonConverter
      • Diagram

        public Diagram​(String id,
                       org.apache.wicket.model.IModel<List<T>> model,
                       com.googlecode.wicket.jquery.core.Options options)
        Main constructor
        Parameters:
        id - the markup id
        model - the list model of data
        options - the Options
      • Diagram

        public Diagram​(String id,
                       org.apache.wicket.model.IModel<List<T>> model,
                       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
        options - the Options
        converter - the IJsonConverter
    • Method Detail

      • widget

        public String widget()
        Gets the Kendo UI widget
        Returns:
        the jQuery object
      • reload

        public void reload​(org.apache.wicket.ajax.AjaxRequestTarget target)
        Reloads the Diagram
        Equivalent to handler.add(table)
        Parameters:
        target - the AjaxRequestTarget
      • refresh

        public void refresh​(org.apache.wicket.ajax.AjaxRequestTarget target)
        Refreshes the widget by reading from the datasource
        Parameters:
        target - the AjaxRequestTarget
      • 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
      • onClick

        public void onClick​(org.apache.wicket.ajax.AjaxRequestTarget target,
                            com.github.openjson.JSONObject object)
        Description copied from interface: IDiagramListener
        Triggered when a diagram item is clicked
        Specified by:
        onClick in interface IDiagramListener
        Parameters:
        target - the AjaxRequestTarget
        object - the JSONObject item
      • onClick

        public void onClick​(org.apache.wicket.ajax.AjaxRequestTarget target,
                            T object)
        Triggered when a series is clicked
        Parameters:
        target - the AjaxRequestTarget
        object - the converted object
      • 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 AbstractAjaxBehavior
        Parameters:
        model - the @List Model
        converter - the IJsonConverter
        Returns:
        a new ListModelBehavior, by default