站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

SortableTable (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.brms.client.table
Class SortableTable

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.Grid
                      extended by org.drools.brms.client.table.SortableTable
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.SourcesTableEvents, com.google.gwt.user.client.ui.TableListener

public class SortableTable
extends com.google.gwt.user.client.ui.Grid
implements com.google.gwt.user.client.ui.TableListener

A sortable table widget. Extends the GWT Grid widget. (more performant then FlexTable).


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable
com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter
 
Field Summary
static String styleEvenRow
           
static String styleList
           
static String styleListHeader
          The stylez
static String styleSelectedRow
           
 
Fields inherited from class com.google.gwt.user.client.ui.Grid
numColumns, numRows
 
Constructor Summary
SortableTable(int rows, int cols)
          Create a sortable table widget, of the specified proportions.
 
Method Summary
static SortableTable createTableWidget(TableDataRow[] rows, String[] header, int fillRows)
          This will return a sortable table ready to go.
protected  void drawTable()
           
 String getBlankImage()
           
 String getSelectedKey()
          This will return the key of the selected row.
 int getSelectedRow()
           
 String getSortAscImage()
           
 String getSortDescImage()
           
 void onCellClicked(com.google.gwt.user.client.ui.SourcesTableEvents sender, int row, int col)
          When a cell is clicked, the selected row is styled, and the currently selected row is remembered.
 void setBlankImage(String blankImage)
           
 void setSortAscImage(String sortAscImage)
           
 void setSortDescImgage(String sortDescImgage)
           
 void sort(int columnIndex)
          This performs the sorting
 
Methods inherited from class com.google.gwt.user.client.ui.Grid
clearCell, createCell, getCellCount, getColumnCount, getRowCount, prepareCell, prepareColumn, prepareRow, resize, resizeColumns, resizeRows
 
Methods inherited from class com.google.gwt.user.client.ui.HTMLTable
addTableListener, checkCellBounds, checkRowBounds, clear, getBodyElement, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, insertCell, insertCells, insertRow, internalClearCell, isCellPresent, iterator, onBrowserEvent, remove, removeCell, removeRow, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setColumnFormatter, setHTML, setRowFormatter, setText, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, disown, onAttach, onDetach
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onLoad, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

styleListHeader

public static String styleListHeader
The stylez


styleSelectedRow

public static String styleSelectedRow

styleEvenRow

public static String styleEvenRow

styleList

public static String styleList
Constructor Detail

SortableTable

public SortableTable(int rows,
                     int cols)
Create a sortable table widget, of the specified proportions. The number of rows does NOT include the header.

Method Detail

createTableWidget

public static SortableTable createTableWidget(TableDataRow[] rows,
                                              String[] header,
                                              int fillRows)
This will return a sortable table ready to go.

Parameters:
rows - The data.
header - Headers.
fillRows - The number of rows to pad out, if needed
Returns:
A SortableTable ready to go !

sort

public void sort(int columnIndex)
This performs the sorting


onCellClicked

public void onCellClicked(com.google.gwt.user.client.ui.SourcesTableEvents sender,
                          int row,
                          int col)
When a cell is clicked, the selected row is styled, and the currently selected row is remembered. If it was in-fact a header that was clicked, then it will sort the data and redisplay the grid.

Specified by:
onCellClicked in interface com.google.gwt.user.client.ui.TableListener

getSelectedRow

public int getSelectedRow()
Returns:
The selected row index.

getSelectedKey

public String getSelectedKey()
This will return the key of the selected row.


getSortAscImage

public String getSortAscImage()

setSortAscImage

public void setSortAscImage(String sortAscImage)

getSortDescImage

public String getSortDescImage()

setSortDescImgage

public void setSortDescImgage(String sortDescImgage)

getBlankImage

public String getBlankImage()

setBlankImage

public void setBlankImage(String blankImage)

drawTable

protected void drawTable()


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.