public class ResizableBehavior extends AbstractJqueryUiEmbeddedBehavior
Component
to make it
a resizable Component
.
An instance of this class can be added to one and only one
Component
. Another Component
that should have exactly the
same behavior needs it's own instance.Modifier and Type | Class and Description |
---|---|
static class |
ResizableBehavior.ResizableDirections |
JQueryAjaxBehavior.JsAjaxCallbackFunction, JQueryAjaxBehavior.JsBuilder, JQueryAjaxBehavior.JsFunction
Modifier and Type | Field and Description |
---|---|
protected JsMap |
options |
static JQueryResourceReference |
uiResizableJs |
jQueryUiAccordionCss, jQueryUiBaseCss, jQueryUiCoreJs, jQueryUiCss, jQueryUiCustomCss, jQueryUiMouseJs, jQueryUiPositionJs, jQueryUiThemeCss, jQueryUiWidgetJs
rendered
rawOptions
Constructor and Description |
---|
ResizableBehavior() |
Modifier and Type | Method and Description |
---|---|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget target)
Disable the resizing
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget target)
Enable the resizing
|
protected JQueryAjaxBehavior.JsBuilder |
getJsBuilder() |
protected void |
onResize(org.apache.wicket.ajax.AjaxRequestTarget target,
int top,
int left,
int width,
int height,
SpecialKeys specialKeys)
If you have set
setWantOnResizeNotification(boolean) to true
this method is called when the mouse moves during the resize operation. |
protected void |
onResized(org.apache.wicket.ajax.AjaxRequestTarget target,
int top,
int left,
int width,
int height,
int originalTop,
int originalLeft,
int originalWidth,
int originalHeight,
SpecialKeys specialKeys)
After the resize operation has ended this method is called.
|
protected void |
onResizeStart(org.apache.wicket.ajax.AjaxRequestTarget target,
int top,
int left,
int width,
int height,
SpecialKeys specialKeys)
If you have set
setWantOnresizeStartNotification(boolean) to true
this method is called when the resize operation starts. |
protected void |
respond(org.apache.wicket.ajax.AjaxRequestTarget target)
Handles the event processing during resizing.
|
ResizableBehavior |
setAnimate(org.apache.wicket.ajax.AjaxRequestTarget target,
boolean value) |
ResizableBehavior |
setAnimate(boolean value)
Sets the 'animate' property for this resizable.
|
ResizableBehavior |
setAnimateDuration(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setAnimateDuration(int value)
Sets the 'animateDuration' property for this resizable.
|
ResizableBehavior |
setAnimateEasing(org.apache.wicket.ajax.AjaxRequestTarget target,
String value) |
ResizableBehavior |
setAnimateEasing(String value)
Sets the 'animateEasing' property for this resizable.
|
ResizableBehavior |
setAspectRatio(org.apache.wicket.ajax.AjaxRequestTarget target,
boolean value) |
ResizableBehavior |
setAspectRatio(org.apache.wicket.ajax.AjaxRequestTarget target,
double value) |
ResizableBehavior |
setAspectRatio(boolean value) |
ResizableBehavior |
setAspectRatio(double value)
Sets the 'aspectRatio' property for this resizable.
|
ResizableBehavior |
setAutoHide(org.apache.wicket.ajax.AjaxRequestTarget target,
boolean value) |
ResizableBehavior |
setAutoHide(boolean value)
Sets the 'autoHide' property for this resizable.
|
ResizableBehavior |
setDelay(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setDelay(int value)
Sets the 'delay' property for this resizable.
|
ResizableBehavior |
setDistance(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setDistance(int value)
Sets the 'distance' property for this resizable.
|
ResizableBehavior |
setGhost(org.apache.wicket.ajax.AjaxRequestTarget target,
boolean value) |
ResizableBehavior |
setGhost(boolean value)
Sets the 'ghost' property for this resizable.
|
ResizableBehavior |
setGrid(org.apache.wicket.ajax.AjaxRequestTarget target,
int x,
int y) |
ResizableBehavior |
setGrid(int x,
int y)
Sets the 'grid' property for this draggable.
|
ResizableBehavior |
setHandles(org.apache.wicket.ajax.AjaxRequestTarget target,
ResizableBehavior.ResizableDirections... directions) |
ResizableBehavior |
setHandles(ResizableBehavior.ResizableDirections... directions) |
ResizableBehavior |
setHelper(org.apache.wicket.ajax.AjaxRequestTarget target,
String value) |
ResizableBehavior |
setHelper(String value)
Sets the 'helper' property for this resizable.
|
ResizableBehavior |
setMaxHeight(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setMaxHeight(int value)
Sets the 'maxHeight' property for this resizable.
|
ResizableBehavior |
setMaxWidth(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setMaxWidth(int value)
Sets the 'maxWidth' property for this resizable.
|
ResizableBehavior |
setminHeight(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setminHeight(int value)
Sets the 'minHeight' property for this resizable.
|
ResizableBehavior |
setminWidth(org.apache.wicket.ajax.AjaxRequestTarget target,
int value) |
ResizableBehavior |
setminWidth(int value)
Sets the 'minWidth' property for this resizable.
|
ResizableBehavior |
setWantOnResizeNotification(boolean value)
If set to
true , the callback-Method onResize(AjaxRequestTarget, int, int, int, int, SpecialKeys)
is called every time the mouse moves during the resize operation. |
ResizableBehavior |
setWantOnresizeStartNotification(boolean value)
If set to
true , the callback-Method onResizeStart(AjaxRequestTarget, int, int, int, int, SpecialKeys)
is called when the resize operation starts. |
isAlreadyRendered, renderHead, setRestoreAfterRedraw, updateBehavior
addCssResources, addUserProvidedResourceReferences, addUserProvidedResourceReferences, getUserProvidedResourceReferences, printParameters, printParameters, setRawOptions
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, updateAjaxAttributes
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
public static final JQueryResourceReference uiResizableJs
protected JsMap options
protected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
respond
in class JQueryAjaxBehavior
public ResizableBehavior setAnimate(boolean value)
value
- true
or false
.public ResizableBehavior setAnimate(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
public ResizableBehavior setAnimateDuration(int value)
value
- true
or false
.public ResizableBehavior setAnimateDuration(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setAnimateEasing(String value)
value
- the behaviorpublic ResizableBehavior setAnimateEasing(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
public ResizableBehavior setAspectRatio(double value)
value
- the aspect ratiopublic ResizableBehavior setAspectRatio(boolean value)
public ResizableBehavior setAspectRatio(org.apache.wicket.ajax.AjaxRequestTarget target, double value)
public ResizableBehavior setAspectRatio(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
public ResizableBehavior setAutoHide(boolean value)
value
- true
or false
.public ResizableBehavior setAutoHide(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
public ResizableBehavior setDelay(int value)
value
- the delay in mspublic ResizableBehavior setDelay(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setDistance(int value)
value
- the distance in pxpublic ResizableBehavior setDistance(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setGhost(boolean value)
value
- true
or false
.public ResizableBehavior setGhost(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
public ResizableBehavior setGrid(int x, int y)
x
- the stepping along the x axisy
- the stepping along the y axispublic ResizableBehavior setGrid(org.apache.wicket.ajax.AjaxRequestTarget target, int x, int y)
public ResizableBehavior setHandles(ResizableBehavior.ResizableDirections... directions)
public ResizableBehavior setHandles(org.apache.wicket.ajax.AjaxRequestTarget target, ResizableBehavior.ResizableDirections... directions)
public ResizableBehavior setHelper(String value)
value
- the helper's CSS classpublic ResizableBehavior setHelper(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
public ResizableBehavior setMaxHeight(int value)
value
- the value of the propertypublic ResizableBehavior setMaxHeight(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setMaxWidth(int value)
value
- the value of the propertypublic ResizableBehavior setMaxWidth(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setminHeight(int value)
value
- the value of the propertypublic ResizableBehavior setminHeight(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setminWidth(int value)
value
- the value of the propertypublic ResizableBehavior setminWidth(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
public ResizableBehavior setWantOnresizeStartNotification(boolean value)
true
, the callback-Method onResizeStart(AjaxRequestTarget, int, int, int, int, SpecialKeys)
is called when the resize operation starts.value
- true
or false
.public ResizableBehavior setWantOnResizeNotification(boolean value)
true
, the callback-Method onResize(AjaxRequestTarget, int, int, int, int, SpecialKeys)
is called every time the mouse moves during the resize operation.
Be careful using this callback because it can generate a lot of Ajax calls.value
- true
or false
.protected JQueryAjaxBehavior.JsBuilder getJsBuilder()
getJsBuilder
in class JQueryDurableAjaxBehavior
protected void onResizeStart(org.apache.wicket.ajax.AjaxRequestTarget target, int top, int left, int width, int height, SpecialKeys specialKeys)
setWantOnresizeStartNotification(boolean)
to true
this method is called when the resize operation starts. You can override this
method to perform some action when resizing starts.target
- the AjaxRequestTarget of the resize operation.specialKeys
- the special keys that were pressed when the event occursprotected void onResize(org.apache.wicket.ajax.AjaxRequestTarget target, int top, int left, int width, int height, SpecialKeys specialKeys)
setWantOnResizeNotification(boolean)
to true
this method is called when the mouse moves during the resize operation. You
can override this
method to perform some action during the resize operation.target
- the AjaxRequestTarget of the resize operation.specialKeys
- the special keys that were pressed when the event occursprotected void onResized(org.apache.wicket.ajax.AjaxRequestTarget target, int top, int left, int width, int height, int originalTop, int originalLeft, int originalWidth, int originalHeight, SpecialKeys specialKeys)
target
- the AjaxRequestTarget of the resize operation.specialKeys
- the special keys that were pressed when the event occurspublic void disable(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- An AjaxRequestTargetpublic void enable(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- An AjaxRequestTargetCopyright © 2015. All rights reserved.