|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.widget.core.client.Resizable
public class Resizable
Applies drag handles to a widget to make it resizable. The drag handles are inserted into the widget and positioned absolute.
OnlyComponent instances can be used with Resizable
as Widget's do not fire resize events. Widgets can be wrapped in
a WidgetComponent instance to use with Resizable.
Here is the list of valid resize handles:
Value Description ------ ------------------- 'n' north 's' south 'e' east 'w' west 'nw' northwest 'sw' southwest 'se' southeast 'ne' northeast 'all' all
| Nested Class Summary | |
|---|---|
static class |
Resizable.Dir
The location of the resize handle in standard compass points. |
static interface |
Resizable.ResizableAppearance
|
| Constructor Summary | |
|---|---|
Resizable(Component resize)
Creates a new resizable instance with 8-way resizing. |
|
Resizable(Component resize,
Resizable.Dir... handles)
Creates a new resizable instance with the default appearance. |
|
Resizable(Resizable.ResizableAppearance appearance,
Component resize,
Resizable.Dir... handles)
Creates a new resizable instance with the specified appearance. |
|
| Method Summary | |
|---|---|
HandlerRegistration |
addResizeEndHandler(ResizeEndEvent.ResizeEndHandler handler)
Adds a ResizeEndEvent.ResizeEndHandler handler for ResizeEndEvent
events. |
HandlerRegistration |
addResizeStartHandler(ResizeStartEvent.ResizeStartHandler handler)
Adds a ResizeStartEvent.ResizeStartHandler handler for ResizeStartEvent
events. |
int |
getMaxHeight()
Returns the max height |
int |
getMaxWidth()
Returns the max width. |
int |
getMinHeight()
Returns the minimum height. |
int |
getMinWidth()
Returns the minimum width. |
boolean |
isDynamic()
Returns true if widget is being resized directly. |
boolean |
isPreserveRatio()
Returns true if the aspect ratio is being preserved. |
boolean |
isResizing()
Returns true if if resizing. |
void |
release()
Removes the drag handles. |
void |
setDynamic(boolean dynamic)
True to resize the widget directly instead of using a proxy (defaults to false). |
void |
setEnabled(boolean enable)
Enables or disables the drag handles. |
void |
setMaxHeight(int maxHeight)
Sets the max height (defaults to 2000). |
void |
setMaxWidth(int maxWidth)
Sets the max width (defaults to 2000). |
void |
setMinHeight(int minHeight)
Sets the minimum height (default to 50). |
void |
setMinWidth(int minWidth)
Sets the minimum width (defaults to 50). |
void |
setPreserveRatio(boolean preserveRatio)
True to preserve the original ratio between height and width during resize (defaults to false). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Resizable(Component resize)
resize - the resize widget
public Resizable(Component resize,
Resizable.Dir... handles)
resize - the resize widgethandles - the resize handle locations
public Resizable(Resizable.ResizableAppearance appearance,
Component resize,
Resizable.Dir... handles)
appearance - the appearance of the resizableresize - the resize widgethandles - the resize handle locations| Method Detail |
|---|
public HandlerRegistration addResizeEndHandler(ResizeEndEvent.ResizeEndHandler handler)
ResizeEndEvent.HasResizeEndHandlersResizeEndEvent.ResizeEndHandler handler for ResizeEndEvent
events.
addResizeEndHandler in interface ResizeEndEvent.HasResizeEndHandlershandler - the handler
public HandlerRegistration addResizeStartHandler(ResizeStartEvent.ResizeStartHandler handler)
ResizeStartEvent.HasResizeStartHandlersResizeStartEvent.ResizeStartHandler handler for ResizeStartEvent
events.
addResizeStartHandler in interface ResizeStartEvent.HasResizeStartHandlershandler - the handler
public int getMaxHeight()
public int getMaxWidth()
public int getMinHeight()
public int getMinWidth()
public boolean isDynamic()
public boolean isPreserveRatio()
public boolean isResizing()
true if if resizing.
public void release()
public void setDynamic(boolean dynamic)
dynamic - true to resize directlypublic void setEnabled(boolean enable)
enable - true to enablepublic void setMaxHeight(int maxHeight)
maxHeight - the max heightpublic void setMaxWidth(int maxWidth)
maxWidth - the max widthpublic void setMinHeight(int minHeight)
minHeight - the minimum heightpublic void setMinWidth(int minWidth)
minWidth - the minimum widthpublic void setPreserveRatio(boolean preserveRatio)
preserveRatio - true to preserve the original aspect ratio
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||