public abstract class ResizableAjaxBehavior
extends org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
Sets the attached component resizable. When the resized of the component is
done, onResize(int, int, AjaxRequestTarget) is called with Ajax.
This behavior contains a ResizableBehavior which is used to control
the options of the resizable, including all the options and event of the
behavior. Example:
ResizableAjaxBehavior resizable = new ResizableAjaxBehavior() {
public void onResize(int height, int width, AjaxRequestTarget ajaxRequestTarget) {
...
}
}
ResizableBehavior rb = resizable.getResizableBehavior();
rb.setAnimeDuration(new ResizableAnimeDuration(500));
rb.setGhost(true);
add(resizable);
| Constructor and Description |
|---|
ResizableAjaxBehavior()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
contribute(WiQueryResourceManager wiQueryResourceManager) |
JsStatement |
destroy()
Method to destroy
This will return the element back to its pre-init state.
|
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy within the ajax request
|
JsStatement |
disable()
Method to disable
|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable within the ajax request
|
JsStatement |
enable()
Method to enable
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable within the ajax request
|
ResizableAlsoResize |
getAlsoResizeComplex() |
ResizableAnimeDuration |
getAnimateDuration() |
String |
getAnimateEasing() |
ResizableAspectRatio |
getAspectRatio() |
protected CharSequence |
getCallbackScript(boolean onlyTargetActivePage)
We override super method to add height and width parameters to the URL.
|
String |
getCancel() |
ResizableContainment |
getContainment() |
int |
getDelay() |
int |
getDistance() |
ICollectionItemOptions |
getGrid() |
ResizableHandles |
getHandles() |
String |
getHelper() |
int |
getMaxHeight()
Returns the component's max height.
|
int |
getMaxWidth()
Returns the component's max width.
|
int |
getMinHeight()
Returns the component's min height.
|
int |
getMinWidth()
Returns the component's max width.
|
ResizableBehavior |
getResizableBehavior() |
boolean |
isAnimate() |
boolean |
isAutoHide() |
boolean |
isDisabled() |
boolean |
isGhost() |
protected void |
onBind() |
void |
onResize(org.apache.wicket.ajax.AjaxRequestTarget target)
For framework internal use only.
|
abstract void |
onResize(int height,
int width,
org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
onResize is triggered at the end of a resize operation.
|
protected void |
respond(org.apache.wicket.ajax.AjaxRequestTarget target) |
ResizableAjaxBehavior |
setAlsoResize(ResizableAlsoResize alsoResize)
Resize these elements synchronous when resizing.
|
ResizableAjaxBehavior |
setAnimate(boolean animate)
Animates to the final size after resizing.
|
ResizableAjaxBehavior |
setAnimateDuration(ResizableAnimeDuration animeDuration)
Sets the duration time for animating, in milliseconds.
|
ResizableAjaxBehavior |
setAnimateEasing(String easing)
Sets the easing effect for animating.
|
ResizableAjaxBehavior |
setAspectRatio(ResizableAspectRatio aspectRatio)
If set to true, resizing is constrained by the original aspect ratio.
|
ResizableAjaxBehavior |
setAutoHide(boolean autoHide)
If set to true, automatically hides the handles except when the mouse
hovers over the element.
|
ResizableAjaxBehavior |
setCancel(String cancel)
Prevents resizing if you start on elements matching the selector.
|
ResizableAjaxBehavior |
setContainment(ResizableContainment containment)
Sets the constrains resizing to within the bounds of the specified element.
|
ResizableAjaxBehavior |
setDelay(int delay)
Sets the tolerance, in milliseconds, for when resizing should start.
|
ResizableAjaxBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the resizable.
|
ResizableAjaxBehavior |
setDistance(int distance)
Sets the tolerance, in pixels, for when resizing should start.
|
ResizableAjaxBehavior |
setGhost(boolean ghost)
Set to true, a semi-transparent helper element is shown for resizing.
|
ResizableAjaxBehavior |
setGrid(int x,
int y)
Snaps the resizing element to a grid, every x and y pixels.
|
ResizableAjaxBehavior |
setHandles(ResizableHandles handles)
If specified as a string, should be a comma-split list of any of the following:
'n, e, s, w, ne, se, sw, nw, all'.
|
ResizableAjaxBehavior |
setHelper(String helper)
Sets the css class that will be added to a proxy element to outline the
resize during the drag of the resize handle.
|
ResizableAjaxBehavior |
setMaxHeight(int maxHeight)
Sets the component's max height.
|
ResizableAjaxBehavior |
setMaxWidth(int maxWidth)
Sets the window's max width.
|
ResizableAjaxBehavior |
setMinHeight(int minHeight)
Sets the component's min height.
|
ResizableAjaxBehavior |
setMinWidth(int minWidth)
Sets the component's min width.
|
protected JsStatement |
statement() |
JsStatement |
widget()
Method to returns the .ui-resizable element
|
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-resizable element within the ajax request
|
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, renderHead, throttleScriptbind, getCallbackUrl, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContributionpublic void contribute(WiQueryResourceManager wiQueryResourceManager)
public ResizableBehavior getResizableBehavior()
protected void onBind()
onBind in class org.apache.wicket.ajax.AbstractDefaultAjaxBehaviorAbstractDefaultAjaxBehavior.onBind()public final void onResize(org.apache.wicket.ajax.AjaxRequestTarget target)
public abstract void onResize(int height,
int width,
org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
height - Height of the resized Componentwidth - Width of the resized ComponentajaxRequestTarget - the Ajax targetprotected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
respond in class org.apache.wicket.ajax.AbstractDefaultAjaxBehaviorAbstractDefaultAjaxBehavior.respond(org.apache.wicket.ajax.AjaxRequestTarget)protected JsStatement statement()
IWiQueryPlugin.statement()protected CharSequence getCallbackScript(boolean onlyTargetActivePage)
getCallbackScript in class org.apache.wicket.ajax.AbstractDefaultAjaxBehaviorAbstractDefaultAjaxBehavior.getCallbackScript(boolean)public ResizableAjaxBehavior setAlsoResize(ResizableAlsoResize alsoResize)
alsoResize - public ResizableAlsoResize getAlsoResizeComplex()
public ResizableAjaxBehavior setAnimate(boolean animate)
animate - public boolean isAnimate()
public ResizableAjaxBehavior setAnimateDuration(ResizableAnimeDuration animeDuration)
public ResizableAnimeDuration getAnimateDuration()
public ResizableAjaxBehavior setAnimateEasing(String easing)
easing - public String getAnimateEasing()
public ResizableAjaxBehavior setAspectRatio(ResizableAspectRatio aspectRatio)
aspectRatio - public ResizableAspectRatio getAspectRatio()
public ResizableAjaxBehavior setAutoHide(boolean autoHide)
autoHide - public boolean isAutoHide()
public ResizableAjaxBehavior setCancel(String cancel)
cancel - public String getCancel()
public ResizableAjaxBehavior setContainment(ResizableContainment containment)
containment - public ResizableContainment getContainment()
public ResizableAjaxBehavior setDelay(int delay)
delay - public int getDelay()
public ResizableAjaxBehavior setDistance(int distance)
distance - public int getDistance()
public ResizableAjaxBehavior setDisabled(boolean disabled)
disabled - public boolean isDisabled()
public ResizableAjaxBehavior setGhost(boolean ghost)
ghost - public boolean isGhost()
public ResizableAjaxBehavior setGrid(int x, int y)
x - y - public ICollectionItemOptions getGrid()
public ResizableAjaxBehavior setHandles(ResizableHandles handles)
handles - public ResizableHandles getHandles()
public ResizableAjaxBehavior setHelper(String helper)
helper - public String getHelper()
public ResizableAjaxBehavior setMaxHeight(int maxHeight)
public int getMaxHeight()
public ResizableAjaxBehavior setMaxWidth(int maxWidth)
public int getMaxWidth()
public ResizableAjaxBehavior setMinHeight(int minHeight)
public int getMinHeight()
public ResizableAjaxBehavior setMinWidth(int minWidth)
public int getMinWidth()
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 widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - Copyright © 2009-2012. All Rights Reserved.