|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.odlabs.wiquery.ui.dialog.Dialog
public class Dialog
$Id$
Displays a window wrapping this WebMarkupContainer
markup.
This UI component is built from this WebMarkupContainer
's HTML markup. The
correct markup should be a div
HTML element wrapping the contents to
display in this window.
Example:
<div wicket:id="id" title="The window title">
The wrapped content
</div>
Nested Class Summary | |
---|---|
static class |
Dialog.DialogAjaxBehavior
This class is only need to make public the method generateCallbackScript. |
static class |
Dialog.WindowPosition
Eumeration of possible window position |
Field Summary | |
---|---|
static String |
BUTTON_ID
|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
Dialog(String id)
Builds a new instance of Dialog for the given wicket id. |
Method Summary | |
---|---|
JsStatement |
close()
Method to close the dialog |
void |
close(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to close the dialog within the ajax request |
JsStatement |
destroy()
Method to destroy the dialog This will return the element back to its pre-init state. |
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the dialog within the ajax request |
protected void |
detachModel()
|
JsStatement |
disable()
Method to disable the dialog |
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the dialog within the ajax request |
JsStatement |
enable()
Method to enable the dialog |
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the dialog within the ajax request |
Dialog.DialogAjaxBehavior |
getAjaxBehavior()
|
ListItemOptions<DialogButton> |
getButtons()
|
String |
getCloseText()
|
String |
getCssClass()
Returns the css class applied to customize this window. |
String |
getDialogClass()
|
int |
getHeight()
Returns the window's height. |
String |
getHideEffect()
|
int |
getMaxHeight()
Returns the window's max height. |
int |
getMaxWidth()
Returns the window's max width. |
int |
getMinHeight()
Returns the window's min height. |
int |
getMinWidth()
Returns the window's max width. |
protected Options |
getOptions()
Method retrieving the options of the component |
Dialog.WindowPosition |
getPosition()
Returns the Dialog.WindowPosition . |
String |
getShowEffect()
|
String |
getTitle()
Returns the window's title. |
int |
getWidth()
Returns the dialog's width. |
int |
getZIndex()
|
boolean |
isAutoOpen()
|
boolean |
isBgiframe()
Deprecated. will be removed in 1.3 |
boolean |
isCloseOnEscape()
|
boolean |
isDisabled()
|
boolean |
isDraggable()
|
boolean |
isDraggrable()
Deprecated. will be removed is 1.2 |
static boolean |
isEmpty(String str)
|
boolean |
isModal()
|
JsStatement |
isOpen()
Method returning true if the dialog is currently open |
boolean |
isResizable()
Returns true if this window is resizable. |
boolean |
isStack()
|
JsStatement |
moveToTop()
Method to move to top the dialog |
void |
moveToTop(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to move to top the dialog within the ajax request |
JsStatement |
open()
Method to open the dialog |
void |
open(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to open the dialog within the ajax request |
void |
renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
|
Dialog |
setAutoOpen(boolean autoOpen)
Sets if this window opens autmatically after the page is loaded. |
Dialog |
setBeforeCloseEvent(JsScopeUiEvent beforeclose)
Deprecated. will be removed when we will used jquery ui 1.9 (see ticket http://dev.jqueryui.com/ticket/4669) |
Dialog |
setBgiframe(boolean bgiframe)
Deprecated. will be removed in 1.3 |
Dialog |
setButtons(DialogButton... buttons)
Set's a list of dialog button |
Dialog |
setButtons(ListItemOptions<DialogButton> buttons)
Set's a list of dialog button |
Dialog |
setCloseEvent(JsScopeUiEvent close)
Set's the callback before the dialog is closed. |
Dialog |
setCloseOnEscape(boolean closeOnEscape)
Set's the close on escape keyboard shortcut |
Dialog |
setCloseText(String closeText)
Sets a the text for the close button |
Dialog |
setCssClass(String cssClass)
Sets a css class to customize the window's display. |
Dialog |
setDialogClass(String dialogClass)
The specified class name(s) will be added to the dialog, for additional theming. |
Dialog |
setDisabled(boolean disabled)
Disables (true) or enables (false) the dialog. |
Dialog |
setDragEvent(JsScopeUiEvent drag)
Set's the callback when the dialog is dragged. |
Dialog |
setDraggable(boolean draggable)
Enable or disable the draggable event |
Dialog |
setDragStartEvent(JsScopeUiEvent dragStart)
Set's the callback when the dialog is being dragged. |
Dialog |
setDragStopEvent(JsScopeUiEvent dragStop)
Set's the callback when the dialog has been dragged. |
Dialog |
setFocusEvent(JsScopeUiEvent focus)
Set's the callback when the dialog gains focus. |
Dialog |
setHeight(int height)
Sets the window's height. |
Dialog |
setHideEffect(String hideEffect)
Sets the effect used when the window closes. |
Dialog |
setMaxHeight(int maxHeight)
Sets the window's max height. |
Dialog |
setMaxWidth(int maxWidth)
Sets the window's max width. |
Dialog |
setMinHeight(int minHeight)
Sets the window's min height. |
Dialog |
setMinWidth(int minWidth)
Sets the window's min width. |
Dialog |
setModal(boolean modal)
Sets if this window is modal or not. |
Dialog |
setOpenEvent(JsScopeUiEvent open)
Set's the callback before the dialog is opening. |
Dialog |
setOverlayRatio(float ratio)
Deprecated. will be removed in 1.3 |
Dialog |
setPosition(Dialog.WindowPosition windowPosition)
Sets the window's position. |
Dialog |
setResizable(boolean resizable)
Sets if this window is resizable or not. |
Dialog |
setResizeEvent(JsScopeUiEvent resize)
Set's the callback when the dialog is resized. |
Dialog |
setResizeStartEvent(JsScopeUiEvent resizeStart)
Set's the callback when the dialog is being resized. |
Dialog |
setResizeStopEvent(JsScopeUiEvent resizeStop)
Set's the callback when the dialog has been resized. |
Dialog |
setShowEffect(String hideEffect)
Sets the effect used when the window shows itself. |
Dialog |
setStack(boolean stack)
Specifies whether the dialog will stack on top of other dialogs. |
Dialog |
setTitle(org.apache.wicket.model.IModel<String> title)
Sets the window's title. |
Dialog |
setTitle(String title)
Sets the window's title. |
Dialog |
setWidth(int width)
Sets the window's width. |
Dialog |
setZIndex(int zIndex)
Set's the starting z-index |
JsStatement |
statement()
Returns the main JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-dialog element |
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-dialog element within the ajax request |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
Methods inherited from class org.apache.wicket.Component |
---|
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, 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, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String BUTTON_ID
Constructor Detail |
---|
public Dialog(String id)
Dialog
for the given wicket id.
id
- the given wicket id.Method Detail |
---|
public static boolean isEmpty(String str)
protected void detachModel()
detachModel
in class org.apache.wicket.Component
public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
renderHead
in class org.apache.wicket.Component
public JsStatement statement()
IWiQueryPlugin
JsStatement
used to create the plugin.
statement
in interface IWiQueryPlugin
JsStatement
corresponding to this component.protected Options getOptions()
public JsStatement open()
public JsStatement close()
public void open(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public void close(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public Dialog setAutoOpen(boolean autoOpen)
autoOpen
- true if the window auto opens, false otherwise
public Dialog setModal(boolean modal)
modal
- true if the window is modal, false otherwise
@Deprecated public Dialog setOverlayRatio(float ratio)
setModal(boolean)
method is call with true.
ratio
- a float value between 0 and 1 (1 is 100% black overlay)
public boolean isAutoOpen()
public boolean isModal()
public Dialog setWidth(int width)
public int getWidth()
public Dialog setHeight(int height)
public int getHeight()
public Dialog setPosition(Dialog.WindowPosition windowPosition)
public Dialog.WindowPosition getPosition()
Dialog.WindowPosition
.
public Dialog setCloseText(String closeText)
public String getCloseText()
public Dialog setCssClass(String cssClass)
public String getCssClass()
public Dialog setHideEffect(String hideEffect)
hideEffect
- String
with the given effect's name.
public String getHideEffect()
public Dialog setShowEffect(String hideEffect)
hideEffect
- String
with the given effect's name.
public String getShowEffect()
public Dialog setMaxHeight(int maxHeight)
public int getMaxHeight()
public Dialog setMaxWidth(int maxWidth)
public int getMaxWidth()
public Dialog setMinHeight(int minHeight)
public int getMinHeight()
public Dialog setMinWidth(int minWidth)
public int getMinWidth()
public Dialog setResizable(boolean resizable)
public boolean isResizable()
true
if this window is resizable.
public Dialog setTitle(String title)
Note: the title can be automatically sets when the HTML
title
attribute is set.
public Dialog setTitle(org.apache.wicket.model.IModel<String> title)
Note: the title can be automatically sets when the HTML
title
attribute is set.
public String getTitle()
String
containing the window's title.public Dialog setCloseOnEscape(boolean closeOnEscape)
closeOnEscape
-
public boolean isCloseOnEscape()
@Deprecated public Dialog setBgiframe(boolean bgiframe)
bgiframe
-
@Deprecated public boolean isBgiframe()
public Dialog setDialogClass(String dialogClass)
public String getDialogClass()
public Dialog setDisabled(boolean disabled)
disabled
-
public boolean isDisabled()
public Dialog setDraggable(boolean draggable)
draggable
-
public boolean isDraggable()
@Deprecated public boolean isDraggrable()
public Dialog setStack(boolean stack)
stack
-
public boolean isStack()
public Dialog setZIndex(int zIndex)
zIndex
-
public int getZIndex()
public Dialog setButtons(ListItemOptions<DialogButton> buttons)
buttons
-
public Dialog setButtons(DialogButton... buttons)
buttons
-
public ListItemOptions<DialogButton> getButtons()
@Deprecated public Dialog setBeforeCloseEvent(JsScopeUiEvent beforeclose)
beforeclose
-
public Dialog setCloseEvent(JsScopeUiEvent close)
close
-
public Dialog setDragEvent(JsScopeUiEvent drag)
drag
-
public Dialog setDragStartEvent(JsScopeUiEvent dragStart)
dragStart
-
public Dialog setDragStopEvent(JsScopeUiEvent dragStop)
dragStop
-
public Dialog setFocusEvent(JsScopeUiEvent focus)
focus
-
public Dialog setOpenEvent(JsScopeUiEvent open)
open
-
public Dialog setResizeEvent(JsScopeUiEvent resize)
resize
-
public Dialog setResizeStartEvent(JsScopeUiEvent resizeStart)
resizeStart
-
public Dialog setResizeStopEvent(JsScopeUiEvent resizeStop)
resizeStop
-
public JsStatement destroy()
public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement disable()
public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement enable()
public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement isOpen()
public JsStatement moveToTop()
public void moveToTop(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public Dialog.DialogAjaxBehavior getAjaxBehavior()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |