org.kuali.student.common.ui.client.widgets.table
Class TreeTable

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.Panel
              extended by com.google.gwt.user.client.ui.HTMLTable
                  extended by com.google.gwt.user.client.ui.FlexTable
                      extended by org.kuali.student.common.ui.client.widgets.table.TreeTable
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.SourcesTableEvents, Iterable<com.google.gwt.user.client.ui.Widget>

public class TreeTable
extends com.google.gwt.user.client.ui.FlexTable

Layout the token tree in GWT FlexTable.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.FlexTable
com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable
com.google.gwt.user.client.ui.HTMLTable.Cell, com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TreeTable()
           
 
Method Summary
 void buildTable(Node root)
           
private  void buildTable(Node<Token> node, int columnIndex)
          Build table for node passed in at columnIndex
 NodeWidget getNodeWidget(Node node)
           
 int getParentRowIndex(Node node)
          Get the starting row for node passed in
 NodeWidget getRootNodeWidget()
           
private  int getRowIndexAmongSibings(Node node)
          Get the row index for siblings
private  void initTable(Node root)
           
 void mergeCellAcrossColumn(int row, int column)
          Merge columns
 void mergeCellAcrossRow(int row, int column, int count)
          Merge rows.
 
Methods inherited from class com.google.gwt.user.client.ui.FlexTable
addCell, getCellCount, getFlexCellFormatter, getRowCount, insertCell, insertRow, prepareCell, prepareRow, removeAllRows, removeCell, removeCells, removeRow
 
Methods inherited from class com.google.gwt.user.client.ui.HTMLTable
addClickHandler, addTableListener, checkCellBounds, checkRowBounds, clear, clear, clearCell, createCell, getBodyElement, getCellForEvent, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, insertCells, internalClearCell, isCellPresent, iterator, onEnsureDebugId, prepareColumn, remove, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setColumnFormatter, setHTML, setRowFormatter, setText, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

TreeTable

public TreeTable()
Method Detail

getRootNodeWidget

public NodeWidget getRootNodeWidget()

initTable

private void initTable(Node root)

buildTable

public void buildTable(Node root)

getRowIndexAmongSibings

private int getRowIndexAmongSibings(Node node)
Get the row index for siblings


getNodeWidget

public NodeWidget getNodeWidget(Node node)

getParentRowIndex

public int getParentRowIndex(Node node)
Get the starting row for node passed in

Parameters:
node - target node

buildTable

private void buildTable(Node<Token> node,
                        int columnIndex)
Build table for node passed in at columnIndex

Parameters:
node - target node

mergeCellAcrossRow

public void mergeCellAcrossRow(int row,
                               int column,
                               int count)
Merge rows.

Parameters:
row - row index
column - column index
count - row count

mergeCellAcrossColumn

public void mergeCellAcrossColumn(int row,
                                  int column)
Merge columns

Parameters:
row - row index
column - column index


Copyright © 2010 The Kuali Foundation. All rights reserved.