|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.fx.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.
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
BaseEvent.setCancelled(boolean).
| Nested Class Summary | |
|---|---|
protected static class |
Resizable.Dir
|
| Field Summary | |
|---|---|
protected Resizable.Dir |
dir
|
protected boolean |
enabled
|
protected java.util.List<com.extjs.gxt.ui.client.fx.Resizable.ResizeHandle> |
handleList
|
protected java.lang.String |
handles
|
protected BaseEventPreview |
preview
|
protected El |
proxyEl
|
protected BoxComponent |
resize
|
protected Rectangle |
startBox
|
protected Point |
startPoint
|
| Constructor Summary | |
|---|---|
Resizable(BoxComponent resize)
Creates a new resizable instance with 8-way resizing. |
|
Resizable(BoxComponent resize,
java.lang.String handles)
Creates a new resizable instance. |
|
| Method Summary | |
|---|---|
void |
addResizeListener(ResizeListener listener)
Adds a resize listener. |
protected int |
constrain(int v,
int diff,
int m,
int mx)
|
protected com.extjs.gxt.ui.client.fx.Resizable.ResizeHandle |
create(Resizable.Dir dir,
java.lang.String cls)
|
protected com.google.gwt.user.client.Element |
createProxy()
|
int |
getMaxHeight()
Returns the max height |
int |
getMaxWidth()
Returns the max width. |
int |
getMinHeight()
Returns the min height. |
int |
getMinWidth()
Returns the min width. |
java.lang.String |
getProxyStyle()
Returns the proxy style. |
protected void |
handleMouseDown(com.google.gwt.user.client.Event event,
com.extjs.gxt.ui.client.fx.Resizable.ResizeHandle handle)
|
protected void |
handleMouseMove(int xin,
int yin)
|
protected void |
handleMouseUp(com.google.gwt.user.client.Event event)
|
protected void |
init()
|
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. |
protected void |
onAttach()
|
protected void |
onComponentResize()
|
protected void |
onDetach()
|
void |
release()
Removes the drag handles. |
void |
removeResizeListener(ResizeListener listener)
Removes a resize listener. |
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 min height (default to 50). |
void |
setMinWidth(int minWidth)
Sets the min width (defaults to 50). |
void |
setPreserveRatio(boolean preserveRatio)
True to preserve the original ratio between height and width during resize (defaults to false). |
void |
setProxyStyle(java.lang.String proxyStyle)
Sets the style name used for proxy drags (defaults to 'x-resizable-proxy'). |
void |
syncHandleHeight()
|
| Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
|---|
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Resizable.Dir dir
protected boolean enabled
protected java.util.List<com.extjs.gxt.ui.client.fx.Resizable.ResizeHandle> handleList
protected java.lang.String handles
protected BaseEventPreview preview
protected El proxyEl
protected BoxComponent resize
protected Rectangle startBox
protected Point startPoint
| Constructor Detail |
|---|
public Resizable(BoxComponent resize)
resize - the resize widget
public Resizable(BoxComponent resize,
java.lang.String handles)
resize - the resize widgethandles - the resize handle locations separated by spaces| Method Detail |
|---|
public void addResizeListener(ResizeListener listener)
listener - the listenerpublic int getMaxHeight()
public int getMaxWidth()
public int getMinHeight()
public int getMinWidth()
public java.lang.String getProxyStyle()
public boolean isDynamic()
public boolean isPreserveRatio()
public boolean isResizing()
true if if resizing.
public void release()
public void removeResizeListener(ResizeListener listener)
listener - the listenerpublic 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 min heightpublic void setMinWidth(int minWidth)
minWidth - the min widthpublic void setPreserveRatio(boolean preserveRatio)
preserveRatio - true to preserve the original aspect ratiopublic void setProxyStyle(java.lang.String proxyStyle)
proxyStyle - the proxy stylepublic void syncHandleHeight()
protected int constrain(int v,
int diff,
int m,
int mx)
protected com.extjs.gxt.ui.client.fx.Resizable.ResizeHandle create(Resizable.Dir dir,
java.lang.String cls)
protected com.google.gwt.user.client.Element createProxy()
protected void handleMouseDown(com.google.gwt.user.client.Event event,
com.extjs.gxt.ui.client.fx.Resizable.ResizeHandle handle)
protected void handleMouseMove(int xin,
int yin)
protected void handleMouseUp(com.google.gwt.user.client.Event event)
protected void init()
protected void onAttach()
protected void onComponentResize()
protected void onDetach()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||