com.google.gwt.user.cellview.client
Class CellBrowser

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.google.gwt.user.cellview.client.CellBrowser
All Implemented Interfaces:
HasHandlers, EventListener, HasAnimation, ProvidesResize, RequiresResize

public class CellBrowser
extends Composite
implements ProvidesResize, RequiresResize, HasAnimation

A "browsable" view of a tree in which only a single node per level may be open at one time.


Nested Class Summary
static interface CellBrowser.Resources
          A ClientBundle that provides images for this widget.
static interface CellBrowser.Style
          Styles used by this widget.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CellBrowser(TreeViewModel viewModel, T rootValue)
          Construct a new CellBrowser.
CellBrowser(TreeViewModel viewModel, T rootValue, CellBrowser.Resources resources)
          Construct a new CellBrowser with the specified CellBrowser.Resources.
 
Method Summary
 int getDefaultColumnWidth()
          Get the default width of new columns.
 int getMinimumColumnWidth()
          Get the minimum width of columns.
 boolean isAnimationEnabled()
           
 void onBrowserEvent(Event event)
          Fired whenever a browser event is received.
 void onResize()
          This method must be called whenever the implementor's size has been modified.
 void setAnimationEnabled(boolean enable)
          Enable or disable animations.
 void setDefaultColumnWidth(int width)
          Set the default width of new columns.
 void setMinimumColumnWidth(int minWidth)
          Set the minimum width of columns.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
isAttached
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
fireEvent, getLayoutData, getParent, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CellBrowser

public CellBrowser(TreeViewModel viewModel,
                   T rootValue)
Construct a new CellBrowser.

Type Parameters:
T - the type of data in the root node
Parameters:
viewModel - the TreeViewModel that backs the tree
rootValue - the hidden root value of the tree

CellBrowser

public CellBrowser(TreeViewModel viewModel,
                   T rootValue,
                   CellBrowser.Resources resources)
Construct a new CellBrowser with the specified CellBrowser.Resources.

Type Parameters:
T - the type of data in the root node
Parameters:
viewModel - the TreeViewModel that backs the tree
rootValue - the hidden root value of the tree
resources - the CellBrowser.Resources used for images
Method Detail

getDefaultColumnWidth

public int getDefaultColumnWidth()
Get the default width of new columns.

Returns:
the default width in pixels

getMinimumColumnWidth

public int getMinimumColumnWidth()
Get the minimum width of columns.

Returns:
the minimum width in pixels

isAnimationEnabled

public boolean isAnimationEnabled()
Specified by:
isAnimationEnabled in interface HasAnimation
Returns:
true if animations are enabled, false if not

onBrowserEvent

public void onBrowserEvent(Event event)
Description copied from interface: EventListener
Fired whenever a browser event is received.

Specified by:
onBrowserEvent in interface EventListener
Overrides:
onBrowserEvent in class Composite
Parameters:
event - the event received

onResize

public void onResize()
Description copied from interface: RequiresResize
This method must be called whenever the implementor's size has been modified.

Specified by:
onResize in interface RequiresResize

setAnimationEnabled

public void setAnimationEnabled(boolean enable)
Description copied from interface: HasAnimation
Enable or disable animations.

Specified by:
setAnimationEnabled in interface HasAnimation
Parameters:
enable - true to enable, false to disable

setDefaultColumnWidth

public void setDefaultColumnWidth(int width)
Set the default width of new columns.

Parameters:
width - the default width in pixels

setMinimumColumnWidth

public void setMinimumColumnWidth(int minWidth)
Set the minimum width of columns.

Parameters:
minWidth - the minimum width in pixels