Java Doc for HTMLTable.java in  » Ajax » GWT » com » google » gwt » user » client » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » GWT » com.google.gwt.user.client.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.google.gwt.user.client.ui.UIObject
      com.google.gwt.user.client.ui.Widget
         com.google.gwt.user.client.ui.Panel
            com.google.gwt.user.client.ui.HTMLTable

All known Subclasses:   com.google.gwt.user.client.ui.Grid,  com.google.gwt.user.client.ui.FlexTable,
HTMLTable
abstract public class HTMLTable extends Panel implements SourcesTableEvents(Code)
HTMLTable contains the common table algorithms for com.google.gwt.user.client.ui.Grid and com.google.gwt.user.client.ui.FlexTable .


Inner Class :public class CellFormatter
Inner Class :public class ColumnFormatter
Inner Class :public class RowFormatter


Constructor Summary
public  HTMLTable()
     Create a new empty HTML Table.

Method Summary
public  voidaddTableListener(TableListener listener)
     Adds a listener to the current table.
protected  voidcheckCellBounds(int row, int column)
     Bounds checks that the cell exists at the specified location.
protected  voidcheckRowBounds(int row)
     Checks that the row is within the correct bounds.
public  voidclear()
     Removes all widgets from this table, but does not remove other HTML or text contents of cells.
public  booleanclearCell(int row, int column)
     Clears the given row and column.
protected  ElementcreateCell()
     Creates a new cell.
protected  ElementgetBodyElement()
     Gets the table's TBODY element.
abstract public  intgetCellCount(int row)
     Gets the number of cells in a given row.
public  CellFormattergetCellFormatter()
     Gets the CellFormatter associated with this table.
public  intgetCellPadding()
     Gets the amount of padding that is added around all cells.
public  intgetCellSpacing()
     Gets the amount of spacing that is added around all cells.
public  ColumnFormattergetColumnFormatter()
     Gets the column formatter.
native protected  intgetDOMCellCount(Element tableBody, int row)
     Directly ask the underlying DOM what the cell count on the given row is.
protected  intgetDOMCellCount(int row)
     Directly ask the underlying DOM what the cell count on the given row is.
protected  intgetDOMRowCount()
     Directly ask the underlying DOM what the row count is.
native protected  intgetDOMRowCount(Element elem)
    
protected  ElementgetEventTargetCell(Event event)
     Determines the TD associated with the specified event.
public  StringgetHTML(int row, int column)
     Gets the HTML contents of the specified cell.
abstract public  intgetRowCount()
     Gets the number of rows present in this table.
public  RowFormattergetRowFormatter()
     Gets the RowFormatter associated with this table.
public  StringgetText(int row, int column)
     Gets the text within the specified cell.
public  WidgetgetWidget(int row, int column)
     Gets the widget in the specified cell.
protected  voidinsertCell(int row, int column)
     Inserts a new cell into the specified row.
protected  voidinsertCells(int row, int column, int count)
     Inserts a number of cells before the specified cell.
protected  intinsertRow(int beforeRow)
     Inserts a new row into the table.
protected  booleaninternalClearCell(Element td, boolean clearInnerHTML)
     Does actual clearing, used by clearCell and cleanCell.
public  booleanisCellPresent(int row, int column)
     Determines whether the specified cell exists.
public  Iterator<Widget>iterator()
     Returns an iterator containing all the widgets in this table.
public  voidonBrowserEvent(Event event)
     Method to process events generated from the browser.
abstract protected  voidprepareCell(int row, int column)
     Subclasses must implement this method.
protected  voidprepareColumn(int column)
     Subclasses can implement this method.
abstract protected  voidprepareRow(int row)
     Subclasses must implement this method.
public  booleanremove(Widget widget)
     Remove the specified widget from the table.
protected  voidremoveCell(int row, int column)
     Removes the specified cell from the table.
protected  voidremoveRow(int row)
     Removes the specified row from the table.
public  voidremoveTableListener(TableListener listener)
     Removes the specified table listener.
public  voidsetBorderWidth(int width)
     Sets the width of the table's border.
protected  voidsetCellFormatter(CellFormatter cellFormatter)
     Sets the table's CellFormatter.
public  voidsetCellPadding(int padding)
     Sets the amount of padding to be added around all cells.
public  voidsetCellSpacing(int spacing)
     Sets the amount of spacing to be added around all cells.
protected  voidsetColumnFormatter(ColumnFormatter formatter)
    
public  voidsetHTML(int row, int column, String html)
     Sets the HTML contents of the specified cell.
protected  voidsetRowFormatter(RowFormatter rowFormatter)
     Sets the table's RowFormatter.
public  voidsetText(int row, int column, String text)
     Sets the text within the specified cell.
public  voidsetWidget(int row, int column, Widget widget)
     Sets the widget within the specified cell.

Inherited implementations may either throw IndexOutOfBounds exception if the cell does not exist, or allocate a new cell to store the content.

FlexTable will automatically allocate the cell at the correct location and then set the widget.



Constructor Detail
HTMLTable
public HTMLTable()(Code)
Create a new empty HTML Table.




Method Detail
addTableListener
public void addTableListener(TableListener listener)(Code)
Adds a listener to the current table.
Parameters:
  listener - listener to add



checkCellBounds
protected void checkCellBounds(int row, int column)(Code)
Bounds checks that the cell exists at the specified location.
Parameters:
  row - cell's row
Parameters:
  column - cell's column
throws:
  IndexOutOfBoundsException -



checkRowBounds
protected void checkRowBounds(int row)(Code)
Checks that the row is within the correct bounds.
Parameters:
  row - row index to check
throws:
  IndexOutOfBoundsException -



clear
public void clear()(Code)
Removes all widgets from this table, but does not remove other HTML or text contents of cells.



clearCell
public boolean clearCell(int row, int column)(Code)
Clears the given row and column. If it contains a Widget, it will be removed from the table. If not, its contents will simply be cleared.
Parameters:
  row - the widget's column
Parameters:
  column - the widget's column true if a widget was removed
throws:
  IndexOutOfBoundsException -



createCell
protected Element createCell()(Code)
Creates a new cell. Override this method if the cell should have initial contents. the newly created TD



getBodyElement
protected Element getBodyElement()(Code)
Gets the table's TBODY element. the TBODY element



getCellCount
abstract public int getCellCount(int row)(Code)
Gets the number of cells in a given row.
Parameters:
  row - the row whose cells are to be counted the number of cells present in the row



getCellFormatter
public CellFormatter getCellFormatter()(Code)
Gets the CellFormatter associated with this table. Use casting to get subclass-specific functionality this table's cell formatter



getCellPadding
public int getCellPadding()(Code)
Gets the amount of padding that is added around all cells. the cell padding, in pixels



getCellSpacing
public int getCellSpacing()(Code)
Gets the amount of spacing that is added around all cells. the cell spacing, in pixels



getColumnFormatter
public ColumnFormatter getColumnFormatter()(Code)
Gets the column formatter. the column formatter



getDOMCellCount
native protected int getDOMCellCount(Element tableBody, int row)(Code)
Directly ask the underlying DOM what the cell count on the given row is.
Parameters:
  tableBody - the element
Parameters:
  row - the row number of columns in the row



getDOMCellCount
protected int getDOMCellCount(int row)(Code)
Directly ask the underlying DOM what the cell count on the given row is.
Parameters:
  row - the row number of columns in the row



getDOMRowCount
protected int getDOMRowCount()(Code)
Directly ask the underlying DOM what the row count is. Returns the number of rows in the table



getDOMRowCount
native protected int getDOMRowCount(Element elem)(Code)



getEventTargetCell
protected Element getEventTargetCell(Event event)(Code)
Determines the TD associated with the specified event.
Parameters:
  event - the event to be queried the TD associated with the event, or null if none isfound.



getHTML
public String getHTML(int row, int column)(Code)
Gets the HTML contents of the specified cell.
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column the cell's HTML contents
throws:
  IndexOutOfBoundsException -



getRowCount
abstract public int getRowCount()(Code)
Gets the number of rows present in this table. the table's row count



getRowFormatter
public RowFormatter getRowFormatter()(Code)
Gets the RowFormatter associated with this table. the table's row formatter



getText
public String getText(int row, int column)(Code)
Gets the text within the specified cell.
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column the cell's text contents
throws:
  IndexOutOfBoundsException -



getWidget
public Widget getWidget(int row, int column)(Code)
Gets the widget in the specified cell.
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column the widget in the specified cell, or null if none ispresent
throws:
  IndexOutOfBoundsException -



insertCell
protected void insertCell(int row, int column)(Code)
Inserts a new cell into the specified row.
Parameters:
  row - the row into which the new cell will be inserted
Parameters:
  column - the column before which the cell will be inserted
throws:
  IndexOutOfBoundsException -



insertCells
protected void insertCells(int row, int column, int count)(Code)
Inserts a number of cells before the specified cell.
Parameters:
  row - the row into which the new cells will be inserted
Parameters:
  column - the column before which the new cells will be inserted
Parameters:
  count - number of cells to be inserted
throws:
  IndexOutOfBoundsException -



insertRow
protected int insertRow(int beforeRow)(Code)
Inserts a new row into the table.
Parameters:
  beforeRow - the index before which the new row will be inserted the index of the newly-created row
throws:
  IndexOutOfBoundsException -



internalClearCell
protected boolean internalClearCell(Element td, boolean clearInnerHTML)(Code)
Does actual clearing, used by clearCell and cleanCell. All HTMLTable methods should use internalClearCell rather than clearCell, as clearCell may be overridden in subclasses to format an empty cell.
Parameters:
  td - element to clear
Parameters:
  clearInnerHTML - should the cell's inner html be cleared? returns whether a widget was cleared



isCellPresent
public boolean isCellPresent(int row, int column)(Code)
Determines whether the specified cell exists.
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column true if the specified cell exists



iterator
public Iterator<Widget> iterator()(Code)
Returns an iterator containing all the widgets in this table. the iterator



onBrowserEvent
public void onBrowserEvent(Event event)(Code)
Method to process events generated from the browser.
Parameters:
  event - the generated event



prepareCell
abstract protected void prepareCell(int row, int column)(Code)
Subclasses must implement this method. It allows them to decide what to do just before a cell is accessed. If the cell already exists, this method must do nothing. Otherwise, a subclass must either ensure that the cell exists or throw an IndexOutOfBoundsException .
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column



prepareColumn
protected void prepareColumn(int column)(Code)
Subclasses can implement this method. It allows them to decide what to do just before a column is accessed. For classes, such as FlexTable, that do not have a concept of a global column length can ignore this method.
Parameters:
  column - the cell's column
throws:
  IndexOutOfBoundsException -



prepareRow
abstract protected void prepareRow(int row)(Code)
Subclasses must implement this method. If the row already exists, this method must do nothing. Otherwise, a subclass must either ensure that the row exists or throw an IndexOutOfBoundsException .
Parameters:
  row - the cell's row



remove
public boolean remove(Widget widget)(Code)
Remove the specified widget from the table.
Parameters:
  widget - widget to remove was the widget removed from the table.



removeCell
protected void removeCell(int row, int column)(Code)
Removes the specified cell from the table.
Parameters:
  row - the row of the cell to remove
Parameters:
  column - the column of cell to remove
throws:
  IndexOutOfBoundsException -



removeRow
protected void removeRow(int row)(Code)
Removes the specified row from the table.
Parameters:
  row - the index of the row to be removed
throws:
  IndexOutOfBoundsException -



removeTableListener
public void removeTableListener(TableListener listener)(Code)
Removes the specified table listener.
Parameters:
  listener - listener to remove



setBorderWidth
public void setBorderWidth(int width)(Code)
Sets the width of the table's border. This border is displayed around all cells in the table.
Parameters:
  width - the width of the border, in pixels



setCellFormatter
protected void setCellFormatter(CellFormatter cellFormatter)(Code)
Sets the table's CellFormatter.
Parameters:
  cellFormatter - the table's cell formatter



setCellPadding
public void setCellPadding(int padding)(Code)
Sets the amount of padding to be added around all cells.
Parameters:
  padding - the cell padding, in pixels



setCellSpacing
public void setCellSpacing(int spacing)(Code)
Sets the amount of spacing to be added around all cells.
Parameters:
  spacing - the cell spacing, in pixels



setColumnFormatter
protected void setColumnFormatter(ColumnFormatter formatter)(Code)



setHTML
public void setHTML(int row, int column, String html)(Code)
Sets the HTML contents of the specified cell.
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column
Parameters:
  html - the cell's HTML contents
throws:
  IndexOutOfBoundsException -



setRowFormatter
protected void setRowFormatter(RowFormatter rowFormatter)(Code)
Sets the table's RowFormatter.
Parameters:
  rowFormatter - the table's row formatter



setText
public void setText(int row, int column, String text)(Code)
Sets the text within the specified cell.
Parameters:
  row - the cell's row
Parameters:
  column - cell's column
Parameters:
  text - the cell's text contents
throws:
  IndexOutOfBoundsException -



setWidget
public void setWidget(int row, int column, Widget widget)(Code)
Sets the widget within the specified cell.

Inherited implementations may either throw IndexOutOfBounds exception if the cell does not exist, or allocate a new cell to store the content.

FlexTable will automatically allocate the cell at the correct location and then set the widget. Grid will set the widget if and only if the cell is within the Grid's bounding box.


Parameters:
  widget - The widget to be added
Parameters:
  row - the cell's row
Parameters:
  column - the cell's column
throws:
  IndexOutOfBoundsException -



Methods inherited from com.google.gwt.user.client.ui.Panel
public void add(Widget child)(Code)(Java Doc)
final protected void adopt(Widget child)(Code)(Java Doc)
protected void adopt(Widget w, Element container)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
protected void disown(Widget w)(Code)(Java Doc)
protected void doAttachChildren()(Code)(Java Doc)
protected void doDetachChildren()(Code)(Java Doc)
protected void onLoad()(Code)(Java Doc)
protected void onUnload()(Code)(Java Doc)
final protected void orphan(Widget child)(Code)(Java Doc)
abstract public boolean remove(Widget child)(Code)(Java Doc)

Methods inherited from com.google.gwt.user.client.ui.Widget
protected void doAttachChildren()(Code)(Java Doc)
protected void doDetachChildren()(Code)(Java Doc)
Object getLayoutData()(Code)(Java Doc)
public Widget getParent()(Code)(Java Doc)
public boolean isAttached()(Code)(Java Doc)
protected void onAttach()(Code)(Java Doc)
public void onBrowserEvent(Event event)(Code)(Java Doc)
protected void onDetach()(Code)(Java Doc)
protected void onLoad()(Code)(Java Doc)
protected void onUnload()(Code)(Java Doc)
public void removeFromParent()(Code)(Java Doc)
protected void setElement(Element elem)(Code)(Java Doc)
void setLayoutData(Object layoutData)(Code)(Java Doc)
void setParent(Widget parent)(Code)(Java Doc)

Methods inherited from com.google.gwt.user.client.ui.UIObject
public void addStyleDependentName(String styleSuffix)(Code)(Java Doc)
public void addStyleName(String style)(Code)(Java Doc)
public int getAbsoluteLeft()(Code)(Java Doc)
public int getAbsoluteTop()(Code)(Java Doc)
public Element getElement()(Code)(Java Doc)
public int getOffsetHeight()(Code)(Java Doc)
public int getOffsetWidth()(Code)(Java Doc)
protected Element getStyleElement()(Code)(Java Doc)
protected static String getStyleName(Element elem)(Code)(Java Doc)
public String getStyleName()(Code)(Java Doc)
protected static String getStylePrimaryName(Element elem)(Code)(Java Doc)
public String getStylePrimaryName()(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
native public static boolean isVisible(Element elem)(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
public void removeStyleDependentName(String styleSuffix)(Code)(Java Doc)
public void removeStyleName(String style)(Code)(Java Doc)
protected void setElement(Element elem)(Code)(Java Doc)
public void setHeight(String height)(Code)(Java Doc)
public void setPixelSize(int width, int height)(Code)(Java Doc)
public void setSize(String width, String height)(Code)(Java Doc)
protected static void setStyleName(Element elem, String styleName)(Code)(Java Doc)
protected static void setStyleName(Element elem, String style, boolean add)(Code)(Java Doc)
public void setStyleName(String style)(Code)(Java Doc)
protected static void setStylePrimaryName(Element elem, String style)(Code)(Java Doc)
public void setStylePrimaryName(String style)(Code)(Java Doc)
public void setTitle(String title)(Code)(Java Doc)
native public static void setVisible(Element elem, boolean visible)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)
public void setWidth(String width)(Code)(Java Doc)
public void sinkEvents(int eventBitsToAdd)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void unsinkEvents(int eventBitsToRemove)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.