public class ResizableBehavior extends WiQueryAbstractBehavior
Sets the attached component resizable.
| Modifier and Type | Field and Description |
|---|---|
static String |
UI_HELPER
Properties on the ui parameter (use it into callback functions) : a jQuery
object containing the helper element
|
static String |
UI_ORIGIGNALPOSITION
Properties on the ui parameter (use it into callback functions) : {top, left}
before resizing started
|
static String |
UI_ORIGINALSIZE
Properties on the ui parameter (use it into callback functions) : {width, height}
before resizing started
|
static String |
UI_POSITION
Properties on the ui parameter (use it into callback functions) : {top, left}
current position
|
static String |
UI_SIZE
Properties on the ui parameter (use it into callback functions) : {width, height}
current size
|
| Constructor and Description |
|---|
ResizableBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(org.apache.wicket.Component component) |
void |
contribute(WiQueryResourceManager wiQueryResourceManager)
Declares resources (JavaScript and CSS files) to import.
|
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
|
void |
detach(org.apache.wicket.Component component) |
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
|
String |
getAlsoResize()
Deprecated.
will be changed in 1.2 to return a
ResizableAlsoResize |
ResizableAlsoResize |
getAlsoResizeComplex() |
ResizableAnimeDuration |
getAnimateDuration() |
String |
getAnimateEasing() |
ResizableAspectRatio |
getAspectRatio() |
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.
|
protected Options |
getOptions()
Method retrieving the options of the component
|
boolean |
isAnimate() |
boolean |
isAutoHide() |
boolean |
isDisabled() |
boolean |
isGhost() |
ResizableBehavior |
setAlsoResize(ResizableAlsoResize alsoResize)
Resize these elements synchronous when resizing.
|
ResizableBehavior |
setAlsoResize(String cssSelector)
Deprecated.
will be removed in 1.2
|
ResizableBehavior |
setAnimate(boolean animate)
Animates to the final size after resizing.
|
ResizableBehavior |
setAnimateDuration(ResizableAnimeDuration animeDuration)
Sets the duration time for animating, in milliseconds.
|
ResizableBehavior |
setAnimateEasing(String easing)
Sets the easing effect for animating.
|
ResizableBehavior |
setAspectRatio(ResizableAspectRatio aspectRatio)
If set to true, resizing is constrained by the original aspect ratio.
|
ResizableBehavior |
setAutoHide(boolean autoHide)
If set to true, automatically hides the handles except when the mouse
hovers over the element.
|
ResizableBehavior |
setCancel(String cancel)
Prevents resizing if you start on elements matching the selector.
|
ResizableBehavior |
setContainment(ResizableContainment containment)
Sets the constrains resizing to within the bounds of the specified element.
|
ResizableBehavior |
setDelay(int delay)
Sets the tolerance, in milliseconds, for when resizing should start.
|
ResizableBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the resizable.
|
ResizableBehavior |
setDistance(int distance)
Sets the tolerance, in pixels, for when resizing should start.
|
ResizableBehavior |
setGhost(boolean ghost)
Set to true, a semi-transparent helper element is shown for resizing.
|
ResizableBehavior |
setGrid(int x,
int y)
Snaps the resizing element to a grid, every x and y pixels.
|
ResizableBehavior |
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'.
|
ResizableBehavior |
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.
|
ResizableBehavior |
setMaxHeight(int maxHeight)
Sets the component's max height.
|
ResizableBehavior |
setMaxWidth(int maxWidth)
Sets the window's max width.
|
ResizableBehavior |
setMinHeight(int minHeight)
Sets the component's min height.
|
ResizableBehavior |
setMinWidth(int minWidth)
Sets the component's min width.
|
ResizableBehavior |
setResizeEvent(JsScopeUiEvent resize)
Set's the callback when the event is triggered during the resize, on the
drag of the resize handler.
|
ResizableBehavior |
setStartEvent(JsScopeUiEvent start)
Set's the callback when the event is triggered at the start of a resize
operation.
|
ResizableBehavior |
setStopEvent(JsScopeUiEvent stop)
Set's the callback when the event is triggered at the end of a resize
operation.
|
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
|
getComponentpublic static final String UI_HELPER
public static final String UI_ORIGIGNALPOSITION
public static final String UI_ORIGINALSIZE
public static final String UI_POSITION
public static final String UI_SIZE
public void bind(org.apache.wicket.Component component)
bind in interface org.apache.wicket.behavior.IBehaviorbind in class WiQueryAbstractBehaviorpublic void detach(org.apache.wicket.Component component)
detach in interface org.apache.wicket.behavior.IBehaviordetach in class org.apache.wicket.behavior.AbstractBehaviorpublic void contribute(WiQueryResourceManager wiQueryResourceManager)
contribute in interface IWiQueryPlugincontribute in class WiQueryAbstractBehaviorwiQueryResourceManager - The WiQueryResourceManager instance managing this
component resources.WiQueryAbstractBehavior.contribute(org.odlabs.wiquery.core.commons.WiQueryResourceManager)public JsStatement statement()
JsStatement used to create the plugin.statement in interface IWiQueryPluginstatement in class WiQueryAbstractBehaviorJsStatement corresponding to this component.WiQueryAbstractBehavior.statement()protected Options getOptions()
@Deprecated public ResizableBehavior setAlsoResize(String cssSelector)
cssSelector - @Deprecated public String getAlsoResize()
ResizableAlsoResizepublic ResizableBehavior setAlsoResize(ResizableAlsoResize alsoResize)
alsoResize - public ResizableAlsoResize getAlsoResizeComplex()
public ResizableBehavior setAnimate(boolean animate)
animate - public boolean isAnimate()
public ResizableBehavior setAnimateDuration(ResizableAnimeDuration animeDuration)
public ResizableAnimeDuration getAnimateDuration()
public ResizableBehavior setAnimateEasing(String easing)
easing - public String getAnimateEasing()
public ResizableBehavior setAspectRatio(ResizableAspectRatio aspectRatio)
aspectRatio - public ResizableAspectRatio getAspectRatio()
public ResizableBehavior setAutoHide(boolean autoHide)
autoHide - public boolean isAutoHide()
public ResizableBehavior setCancel(String cancel)
cancel - public String getCancel()
public ResizableBehavior setContainment(ResizableContainment containment)
containment - public ResizableContainment getContainment()
public ResizableBehavior setDelay(int delay)
delay - public int getDelay()
public ResizableBehavior setDistance(int distance)
distance - public int getDistance()
public ResizableBehavior setDisabled(boolean disabled)
disabled - public boolean isDisabled()
public ResizableBehavior setGhost(boolean ghost)
ghost - public boolean isGhost()
public ResizableBehavior setGrid(int x, int y)
x - y - public ICollectionItemOptions getGrid()
public ResizableBehavior setHandles(ResizableHandles handles)
handles - public ResizableHandles getHandles()
public ResizableBehavior setHelper(String helper)
helper - public String getHelper()
public ResizableBehavior setMaxHeight(int maxHeight)
public int getMaxHeight()
public ResizableBehavior setMaxWidth(int maxWidth)
public int getMaxWidth()
public ResizableBehavior setMinHeight(int minHeight)
public int getMinHeight()
public ResizableBehavior setMinWidth(int minWidth)
public int getMinWidth()
public ResizableBehavior setResizeEvent(JsScopeUiEvent resize)
resize - public ResizableBehavior setStartEvent(JsScopeUiEvent start)
start - public ResizableBehavior setStopEvent(JsScopeUiEvent stop)
stop - 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.