Class Diagram<T extends IDiagramNode<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.diagram.Diagram<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
,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
-
-
Field Summary
Fields Modifier and Type Field Description protected com.googlecode.wicket.jquery.core.Options
options
-
Constructor Summary
Constructors Constructor Description Diagram(String id)
ConstructorDiagram(String id, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorDiagram(String id, com.googlecode.wicket.jquery.core.Options options)
ConstructorDiagram(String id, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Main constructorDiagram(String id, List<T> data)
ConstructorDiagram(String id, List<T> data, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorDiagram(String id, List<T> data, com.googlecode.wicket.jquery.core.Options options)
constructorDiagram(String id, List<T> data, com.googlecode.wicket.jquery.core.Options options, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
constructorDiagram(String id, org.apache.wicket.model.IModel<List<T>> model)
ConstructorDiagram(String id, org.apache.wicket.model.IModel<List<T>> model, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
ConstructorDiagram(String id, org.apache.wicket.model.IModel<List<T>> model, com.googlecode.wicket.jquery.core.Options options)
Main constructorDiagram(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 urlprotected com.googlecode.wicket.jquery.core.converter.IJsonConverter<T>
getConverter()
Gets theIJsonConverter
boolean
isClickEventEnabled()
Indicates whether the 'click' event is enabled.
If true, theIDiagramListener.onClick(AjaxRequestTarget, JSONObject)
event will be triggered when clicking on an itemprotected 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 newAbstractAjaxBehavior
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 clickedvoid
onClick(org.apache.wicket.ajax.AjaxRequestTarget target, T object)
Triggered when a series is clickedvoid
onConfigure(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
protected void
onConfigure(KendoDataSource.HierarchicalDataSource dataSource)
Configure theKendoDataSource.HierarchicalDataSource
with additional optionsprotected void
onInitialize()
void
refresh(org.apache.wicket.ajax.AjaxRequestTarget target)
Refreshes the widget by reading from the datasourcevoid
reload(org.apache.wicket.ajax.AjaxRequestTarget target)
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
-
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 idoptions
- theOptions
-
Diagram
public Diagram(String id, com.googlecode.wicket.jquery.core.converter.IJsonConverter<T> converter)
Constructor- Parameters:
id
- the markup idconverter
- theIJsonConverter
-
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 idoptions
- theOptions
converter
- theIJsonConverter
-
Diagram
public Diagram(String id, List<T> data)
Constructor- Parameters:
id
- the markup iddata
- 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 iddata
- the list of dataconverter
- theIJsonConverter
-
Diagram
public Diagram(String id, List<T> data, com.googlecode.wicket.jquery.core.Options options)
constructor- Parameters:
id
- the markup iddata
- the list of dataoptions
- theOptions
-
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 iddata
- the list of dataoptions
- theOptions
converter
- theIJsonConverter
-
Diagram
public Diagram(String id, org.apache.wicket.model.IModel<List<T>> model)
Constructor- Parameters:
id
- the markup idmodel
- 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 idmodel
- the list model of dataconverter
- theIJsonConverter
-
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 idmodel
- the list model of dataoptions
- theOptions
-
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 idmodel
- the list model of dataoptions
- theOptions
converter
- theIJsonConverter
-
-
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)
- Parameters:
target
- theAjaxRequestTarget
-
refresh
public void refresh(org.apache.wicket.ajax.AjaxRequestTarget target)
Refreshes the widget by reading from the datasource- Parameters:
target
- theAjaxRequestTarget
-
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
-
isClickEventEnabled
public boolean isClickEventEnabled()
Description copied from interface:IDiagramListener
Indicates whether the 'click' event is enabled.
If true, theIDiagramListener.onClick(AjaxRequestTarget, JSONObject)
event will be triggered when clicking on an item- Specified by:
isClickEventEnabled
in interfaceIDiagramListener
- 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.HierarchicalDataSource dataSource)
Configure theKendoDataSource.HierarchicalDataSource
with additional options- Parameters:
dataSource
- theKendoDataSource.HierarchicalDataSource
-
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
-
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 interfaceIDiagramListener
- Parameters:
target
- theAjaxRequestTarget
object
- theJSONObject
item
-
onClick
public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target, T object)
Triggered when a series is clicked- Parameters:
target
- theAjaxRequestTarget
object
- the converted object
-
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 newAbstractAjaxBehavior
- Parameters:
model
- the @List
Model
converter
- theIJsonConverter
- Returns:
- a new
ListModelBehavior
, by default
-
-