com.gwtext.client.widgets
Class Resizable

java.lang.Object
  extended by com.gwtext.client.core.JsObject
      extended by com.gwtext.client.widgets.Resizable

public class Resizable
extends JsObject

Applies drag handles to an element to make it resizable. The drag handles are inserted into the element and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap the textarea in a div and set "resizeChild" to true (or to the id of the element), or set wrap:true in your config and the element will be wrapped for you automatically.


Nested Class Summary
static class Resizable.Handle
           
 
Field Summary
static Resizable.Handle ALL
           
static Resizable.Handle EAST
           
static Resizable.Handle NORTH
           
static Resizable.Handle NORTH_EAST
           
static Resizable.Handle NORTH_WEST
           
static Resizable.Handle SOUTH
           
static Resizable.Handle SOUTH_EAST
           
static Resizable.Handle SOUTH_WEST
           
static Resizable.Handle WEST
           
 
Fields inherited from class com.gwtext.client.core.JsObject
jsObj
 
Constructor Summary
Resizable(Component component, ResizableConfig config)
          Create a new resizable component.
Resizable(com.google.gwt.user.client.Element elem, ResizableConfig config)
          Create a new resizable component.
Resizable(java.lang.String id, ResizableConfig config)
          Create a new resizable component.
 
Method Summary
 void addListener(ResizableListener listener)
          Add a Resizable listener.
 void destroy()
          Destroys this resizable.
 void destroy(boolean removeEL)
          Destroys this resizable.
 ExtElement getEl()
          Returns the element this component is bound to.
 void resizeTo(int width, int height)
          Perform a manual resize.
 void setVisibility(Resizable.Handle handle, boolean visible)
          Sets the visibilty of a given handle.
 
Methods inherited from class com.gwtext.client.core.JsObject
getJsObj, getProperties, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORTH

public static Resizable.Handle NORTH

SOUTH

public static Resizable.Handle SOUTH

EAST

public static Resizable.Handle EAST

WEST

public static Resizable.Handle WEST

NORTH_WEST

public static Resizable.Handle NORTH_WEST

SOUTH_WEST

public static Resizable.Handle SOUTH_WEST

SOUTH_EAST

public static Resizable.Handle SOUTH_EAST

NORTH_EAST

public static Resizable.Handle NORTH_EAST

ALL

public static Resizable.Handle ALL
Constructor Detail

Resizable

public Resizable(java.lang.String id,
                 ResizableConfig config)
Create a new resizable component. The component needs to be attached to the browser DOM.

Parameters:
id - the element ID
config - the resizable config

Resizable

public Resizable(com.google.gwt.user.client.Element elem,
                 ResizableConfig config)
Create a new resizable component. The component needs to be attached to the browser DOM.

Parameters:
elem - the element
config - the resizable config

Resizable

public Resizable(Component component,
                 ResizableConfig config)
Create a new resizable component.

Parameters:
component - the component
config - the resizable config
Method Detail

destroy

public void destroy()
Destroys this resizable. If the element was wrapped and removeEl is not true then the element remains.


destroy

public void destroy(boolean removeEL)
Destroys this resizable. If the element was wrapped and removeEl is not true then the element remains.

Parameters:
removeEL - true to remove the element from the DOM

getEl

public ExtElement getEl()
Returns the element this component is bound to.

Returns:
the element this component is bound to.

resizeTo

public void resizeTo(int width,
                     int height)
Perform a manual resize.

Parameters:
width - the width
height - the height

setVisibility

public void setVisibility(Resizable.Handle handle,
                          boolean visible)
Sets the visibilty of a given handle. The Resizable must be configured with this handle for this method to apply.

Parameters:
handle - the handle
visible - visibility of handle

addListener

public void addListener(ResizableListener listener)
Add a Resizable listener.

Parameters:
listener - the listener