Class AbstractWindow<T>
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.apache.wicket.markup.html.panel.Panel
-
- org.apache.wicket.markup.html.panel.GenericPanel<T>
-
- com.googlecode.wicket.kendo.ui.widget.window.AbstractWindow<T>
-
- Type Parameters:
T
- the type of the model object
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.IJQueryWidget
,IWindowListener
,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<T,org.apache.wicket.markup.html.panel.GenericPanel<T>>
,org.apache.wicket.IMetadataContext<Serializable,org.apache.wicket.Component>
,org.apache.wicket.IQueueRegion
,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
- Direct Known Subclasses:
Window
public abstract class AbstractWindow<T> extends org.apache.wicket.markup.html.panel.GenericPanel<T> implements com.googlecode.wicket.jquery.core.IJQueryWidget, IWindowListener
Base class for implementing Kendo UI windows- Since:
- 6.17.0
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ACTION_CLOSE
protected static String
ACTION_CUSTOM
protected static String
ACTION_MAXIMIZE
protected static String
ACTION_MINIMIZE
protected static String
ACTION_PIN
protected static String
ACTION_REFRESH
-
Constructor Summary
Constructors Constructor Description AbstractWindow(String id, String title)
ConstructorAbstractWindow(String id, String title, boolean modal)
ConstructorAbstractWindow(String id, String title, org.apache.wicket.model.IModel<T> model)
ConstructorAbstractWindow(String id, String title, org.apache.wicket.model.IModel<T> model, boolean modal)
ConstructorAbstractWindow(String id, org.apache.wicket.model.IModel<String> title)
ConstructorAbstractWindow(String id, org.apache.wicket.model.IModel<String> title, boolean modal)
ConstructorAbstractWindow(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<T> model)
ConstructorAbstractWindow(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<T> model, boolean modal)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Closes the window in ajax.String
getTitle()
Gets the window's titleorg.apache.wicket.model.IModel<String>
getTitleModel()
Gets the window's titleint
getWidth()
Gets the window's withboolean
isActionEventEnabled()
Indicates whether the action events are enabled.
If true, theIWindowListener.onAction(AjaxRequestTarget, String)
event will be triggeredboolean
isCentered()
Indicates whether the window is centeredboolean
isCloseEventEnabled()
Indicates whether the close event is enabled.boolean
isModal()
Gets the modal flagboolean
isResizable()
Indicates whether the window is resizableWindowBehavior
newWidgetBehavior(String selector)
void
onAction(org.apache.wicket.ajax.AjaxRequestTarget target, String action)
Triggered when an action button is clicked.void
onBeforeRender(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
void
onClose(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when then the Window closes, either trough the 'X' icon or the 'escape' key (IWindowListener.isCloseEventEnabled()
should returntrue
), or ifclose(IPartialPageRequestHandler)
has been calledvoid
onConfigure(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
protected void
onInitialize()
protected void
onOpen(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when the window opensvoid
open(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Opens the window in ajax.void
setTitle(String title)
Sets the window's titlevoid
setTitle(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, String title)
Sets the window's title dynamicallyvoid
setTitleModel(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, org.apache.wicket.model.IModel<String> model)
Sets the window's title dynamicallyvoid
setTitleModel(org.apache.wicket.model.IModel<String> model)
Sets the window's titleString
widget()
Gets the Kendo UI widget-
Methods inherited from class org.apache.wicket.markup.html.panel.Panel
getRegionMarkup, newMarkupSourcingStrategy
-
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, 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, 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
-
-
-
-
Field Detail
-
ACTION_PIN
protected static final String ACTION_PIN
- See Also:
- Constant Field Values
-
ACTION_CLOSE
protected static final String ACTION_CLOSE
- See Also:
- Constant Field Values
-
ACTION_REFRESH
protected static final String ACTION_REFRESH
- See Also:
- Constant Field Values
-
ACTION_CUSTOM
protected static final String ACTION_CUSTOM
- See Also:
- Constant Field Values
-
ACTION_MINIMIZE
protected static final String ACTION_MINIMIZE
- See Also:
- Constant Field Values
-
ACTION_MAXIMIZE
protected static final String ACTION_MAXIMIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractWindow
public AbstractWindow(String id, String title)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the window
-
AbstractWindow
public AbstractWindow(String id, org.apache.wicket.model.IModel<String> title)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the window
-
AbstractWindow
public AbstractWindow(String id, String title, org.apache.wicket.model.IModel<T> model)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the windowmodel
- the model to be used in the window.
-
AbstractWindow
public AbstractWindow(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<T> model)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the windowmodel
- the model to be used in the window.
-
AbstractWindow
public AbstractWindow(String id, String title, boolean modal)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the windowmodal
- indicates whether the window is modal
-
AbstractWindow
public AbstractWindow(String id, org.apache.wicket.model.IModel<String> title, boolean modal)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the windowmodal
- indicates whether the window is modal
-
AbstractWindow
public AbstractWindow(String id, String title, org.apache.wicket.model.IModel<T> model, boolean modal)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the windowmodal
- indicates whether the window is modalmodel
- the model to be used in the window
-
AbstractWindow
public AbstractWindow(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<T> model, boolean modal)
Constructor- Parameters:
id
- the markup id, an html div suffice to host a window.title
- the title of the windowmodal
- indicates whether the window is modalmodel
- the model to be used in the window
-
-
Method Detail
-
widget
public String widget()
Gets the Kendo UI widget- Returns:
- the jQuery object
-
open
public final void open(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Opens the window in ajax.- Parameters:
handler
- theIPartialPageRequestHandler
-
close
public final void close(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Closes the window in ajax.- Parameters:
handler
- theIPartialPageRequestHandler
-
getWidth
public int getWidth()
Gets the window's with- Returns:
WIDTH
by default
-
getTitle
public String getTitle()
Gets the window's title- Returns:
- the window's title
-
setTitle
public void setTitle(String title)
Sets the window's title- Parameters:
title
- the window's title
-
setTitle
public void setTitle(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, String title)
Sets the window's title dynamically- Parameters:
handler
- theIPartialPageRequestHandler
title
- the window's title
-
getTitleModel
public org.apache.wicket.model.IModel<String> getTitleModel()
Gets the window's title- Returns:
- the window's title
-
setTitleModel
public void setTitleModel(org.apache.wicket.model.IModel<String> model)
Sets the window's title- Parameters:
model
- the window's title
-
setTitleModel
public void setTitleModel(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, org.apache.wicket.model.IModel<String> model)
Sets the window's title dynamically- Parameters:
handler
- theIPartialPageRequestHandler
model
- the window's title
-
isModal
public final boolean isModal()
Gets the modal flag- Returns:
- the modal flag supplied to the constructor by default
-
isCentered
public boolean isCentered()
Indicates whether the window is centered- Returns:
true
by default
-
isResizable
public boolean isResizable()
Indicates whether the window is resizable- Returns:
false
by default- See Also:
WindowBehavior.isCentered()
-
isActionEventEnabled
public boolean isActionEventEnabled()
Description copied from interface:IWindowListener
Indicates whether the action events are enabled.
If true, theIWindowListener.onAction(AjaxRequestTarget, String)
event will be triggered- Specified by:
isActionEventEnabled
in interfaceIWindowListener
- Returns:
- false by default
-
isCloseEventEnabled
public boolean isCloseEventEnabled()
Description copied from interface:IWindowListener
Indicates whether the close event is enabled. Both 'X' icon and 'escape' key fire this event.
If true, theIWindowListener.onClose(IPartialPageRequestHandler)
event will be triggered- Specified by:
isCloseEventEnabled
in interfaceIWindowListener
- Returns:
- false by default
-
onInitialize
protected void onInitialize()
- Overrides:
onInitialize
in classorg.apache.wicket.MarkupContainer
-
onConfigure
public void onConfigure(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
- Specified by:
onConfigure
in interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
-
onBeforeRender
public void onBeforeRender(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
- Specified by:
onBeforeRender
in interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
-
onOpen
protected void onOpen(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Triggered when the window opens- Parameters:
handler
- theIPartialPageRequestHandler
-
onAction
public void onAction(org.apache.wicket.ajax.AjaxRequestTarget target, String action)
Description copied from interface:IWindowListener
Triggered when an action button is clicked.- Specified by:
onAction
in interfaceIWindowListener
- Parameters:
target
- theAjaxRequestTarget
action
- the action that fired the event
-
onClose
public void onClose(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Description copied from interface:IWindowListener
Triggered when then the Window closes, either trough the 'X' icon or the 'escape' key (IWindowListener.isCloseEventEnabled()
should returntrue
), or ifclose(IPartialPageRequestHandler)
has been called- Specified by:
onClose
in interfaceIWindowListener
- Parameters:
handler
- theIPartialPageRequestHandler
-
newWidgetBehavior
public WindowBehavior newWidgetBehavior(String selector)
- Specified by:
newWidgetBehavior
in interfacecom.googlecode.wicket.jquery.core.IJQueryWidget
- See Also:
IJQueryWidget.newWidgetBehavior(String)
-
-