public class

CellBrowser

extends AbstractCellTree
implements HasAnimation ProvidesResize RequiresResize
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Composite
         ↳ com.google.gwt.user.cellview.client.AbstractCellTree
           ↳ com.google.gwt.user.cellview.client.CellBrowser

Class Overview

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

This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration.

Example

Trivial example
{@example com.google.gwt.examples.cellview.CellBrowserExample}
Complex example
{@example com.google.gwt.examples.cellview.CellBrowserExample2}

Summary

Nested Classes
interface CellBrowser.Resources A ClientBundle that provides images for this widget. 
interface CellBrowser.Style Styles used by this widget. 
[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
<T> CellBrowser(TreeViewModel viewModel, T rootValue)
Construct a new CellBrowser.
<T> CellBrowser(TreeViewModel viewModel, T rootValue, CellBrowser.Resources resources)
Construct a new CellBrowser with the specified CellBrowser.Resources.
Public Methods
int getDefaultColumnWidth()
Get the default width of new columns.
int getMinimumColumnWidth()
Get the minimum width of columns.
TreeNode getRootTreeNode()
Get the root TreeNode.
boolean isAnimationEnabled()
Returns true if animations are enabled, false if not.
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 setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)
void setMinimumColumnWidth(int minWidth)
Set the minimum width of columns.
Protected Methods
<C> Widget createPager(HasData<C> display)
Create a pager to control the list view.
[Expand]
Inherited Methods
From class com.google.gwt.user.cellview.client.AbstractCellTree
From class com.google.gwt.user.client.ui.Composite
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.logical.shared.HasCloseHandlers
From interface com.google.gwt.event.logical.shared.HasOpenHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.ui.HasAnimation
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.user.client.ui.RequiresResize

Public Constructors

public CellBrowser (TreeViewModel viewModel, T rootValue)

Construct a new CellBrowser.

Parameters
viewModel the TreeViewModel that backs the tree
rootValue the hidden root value of the tree

public CellBrowser (TreeViewModel viewModel, T rootValue, CellBrowser.Resources resources)

Construct a new CellBrowser with the specified CellBrowser.Resources.

Parameters
viewModel the TreeViewModel that backs the tree
rootValue the hidden root value of the tree
resources the CellBrowser.Resources used for images

Public Methods

public int getDefaultColumnWidth ()

Get the default width of new columns.

Returns
  • the default width in pixels

public int getMinimumColumnWidth ()

Get the minimum width of columns.

Returns
  • the minimum width in pixels

public TreeNode getRootTreeNode ()

Get the root TreeNode.

Returns

public boolean isAnimationEnabled ()

Returns true if animations are enabled, false if not.

public void onBrowserEvent (Event event)

Fired whenever a browser event is received.

Parameters
event the event received

public void onResize ()

This method must be called whenever the implementor's size has been modified.

public void setAnimationEnabled (boolean enable)

Enable or disable animations.

Parameters
enable true to enable, false to disable

public void setDefaultColumnWidth (int width)

Set the default width of new columns.

Parameters
width the default width in pixels

public void setKeyboardSelectionPolicy (HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)

Parameters
policy the selection policy

public void setMinimumColumnWidth (int minWidth)

Set the minimum width of columns.

Parameters
minWidth the minimum width in pixels

Protected Methods

protected Widget createPager (HasData<C> display)

Create a pager to control the list view.

Parameters
display the list view to add paging too
Returns
  • the pager