|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.odlabs.wiquery.core.behavior.WiQueryAbstractAjaxBehavior
org.odlabs.wiquery.ui.resizable.ResizableAjaxBehavior
public abstract class ResizableAjaxBehavior
$Id: ResizableAjaxBehavior
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);
Field Summary |
---|
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
INDICATOR |
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
ResizableAjaxBehavior()
Default constructor |
Method Summary | |
---|---|
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()
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)
onDrop is called back when the drop event has been fired. |
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. |
JsStatement |
statement()
Returns the main JsStatement used to create the plugin. |
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 |
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, renderHead, throttleScript |
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
---|
afterRender, bind, getCallbackUrl, getComponent, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag |
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
beforeRender, canCallListenerInterface, canCallListenerInterface, detach, isEnabled, isTemporary, onConfigure, onEvent, onException, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResizableAjaxBehavior()
Method Detail |
---|
public ResizableBehavior getResizableBehavior()
protected void onBind()
onBind
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
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 Component
width
- Width of the resized Component
ajaxRequestTarget
- the Ajax targetprotected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
respond
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
target
- the Ajax targetpublic JsStatement statement()
IWiQueryPlugin
JsStatement
used to create the plugin.
statement
in interface IWiQueryPlugin
statement
in class WiQueryAbstractAjaxBehavior
JsStatement
corresponding to this component.protected CharSequence getCallbackScript()
getCallbackScript
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
AbstractAjaxBehavior.getCallbackUrl()
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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |