Java Doc for ElementTable.java in  » Ajax » ItsNat » org » itsnat » core » domutil » 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 » ItsNat » org.itsnat.core.domutil 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.itsnat.core.domutil.ElementTable

All known Subclasses:   org.itsnat.impl.core.domutil.ElementTableImpl,
ElementTable
public interface ElementTable extends ElementTableBase(Code)
Manages a pattern based DOM Element table.

The generic table structure is:

 <tableParent>
 <row> 
 ...
 <optRowContent>
 <cell>
 <opt1>...<optN>Pattern</optN>...</opt1>                
 </cell>
 ...
 </optRowContent>
 ...
 </row>
 ...
 </tableParent>
 

The starting point usually is a DOM table with a single row containing one or several cells this row is save as the pattern (really a deep clone) and used when new rows are added, the first cell of the pattern is used to create new cells (for instance a new column). The initial DOM table (including the row pattern) may be initially cleared or kept as is when this object is created and attached to the underlying DOM table.

This type of table helps to render a table of values into the DOM element table, for instance, this interface support "out the box" the typical DOM element table where every cell element contains some value usually as the data of a text node. Methods to add new cells include optionally a value parameter. The structure and renderer objects are used to customize how and where this value is saved in the table beyond the default cases.

Columns can be added or removed, if a column is removed/added the same column is removed/added to the row pattern too (in fact the table may be empty, no rows, but ElementTable.getColumnCount() may be non-zero), the cell pattern is used to add new cells to the row pattern if necessary. All rows have the same number of columns.

By default a just created table has one row if the row pattern is not removed or zero rows if removed and as many columns as declared in the row pattern.

A pattern based DOM Element table ever works in "master" mode ElementListFree.isMaster
See Also:   org.itsnat.core.ItsNatDocument.createElementTable(Elementboolean)
author:
   Jose Maria Arranz Santamaria





Method Summary
public  Element[]addColumn()
     Adds a new column at the end of columns using the cell pattern.
public  Element[]addColumn(Object[] columnData)
     Adds a new column at the end of columns using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  columnData - the column values to render.
public  Element[]addColumn(List columnData)
     Adds a new column at the end of columns using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  columnData - the column values to render.
public  ElementaddRow()
     Adds a new row element at the end of the table using the row pattern (the new row is a clone).
public  ElementaddRow(Object[] rowData)
     Adds a new row element at the end of the table using the row pattern, and renders the specified values using the current structure and renderer.
Parameters:
  rowData - the row values to render.
public  ElementaddRow(List rowData)
     Adds a new row element at the end of the table using the row pattern, and renders the specified values using the current structure and renderer.
Parameters:
  rowData - the row values to render.
public  ElementgetCellContentElementAt(int row, int column)
     Returns the "content" element of the cell, this element is used to render below the associated value of the cell.
public  DocumentFragmentgetCellContentPatternFragment()
     Returns the pattern used to render values if ElementTable.isUsePatternMarkupToRender() is true.
public  ElementgetCellPatternElement()
     Returns the element used as a cell pattern.
public  intgetColumnCount()
     Returns the number of columns.
public  ElementTableRenderergetElementTableRenderer()
     Returns the current renderer used by this table.
public  ElementTableStructuregetElementTableStructure()
     Returns the current structure used by this table.
public  ElementgetRowContentElementAt(int row)
     Returns the "content" element of the row, this element is the parent of the row cells This element is obtained using the current structure.
Parameters:
  row - index of the row.
public  ElementgetRowPatternElement()
     Returns the element used as a row pattern.
public  Element[]insertColumnAt(int column)
     Inserts a new column at the specified position using the cell pattern.
Parameters:
  column - index of the new column.
public  Element[]insertColumnAt(int column, Object[] columnData)
     Inserts a new column at the specified position using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  column - index of the new column.
Parameters:
  columnData - the column values to render.
public  Element[]insertColumnAt(int column, List columnData)
     Inserts a new column at the specified position using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  column - index of the new column.
Parameters:
  columnData - the column values to render.
public  ElementinsertRowAt(int row)
     Inserts a new row element at the specified position using the row pattern.
Parameters:
  row - index of the new row.
public  ElementinsertRowAt(int row, Object[] rowData)
     Inserts a new row element at the specified position using the row pattern, and renders the specified row values using the current structure and renderer.
Parameters:
  row - index of the new row.
public  ElementinsertRowAt(int row, List rowData)
     Inserts a new row element at the specified position using the row pattern and renders the specified row values using the current structure and renderer.
Parameters:
  row - index of the new row.
public  booleanisUsePatternMarkupToRender()
     Informs whether the original (saved as pattern) markup is used to render.
public  voidsetCellValueAt(int row, int column, Object value)
     Renders the specified value into the cell element with the given row and column position using the current structure and renderer.
Parameters:
  row - row of the cell.
public  voidsetColumnCount(int columnCount)
     Increases or shrinks the number of columns to fit the new size.
public  voidsetColumnValuesAt(int column, Object[] columnData)
     Renders the specified values into the column with the given position using the current structure and renderer.
Parameters:
  column - index of the column.
public  voidsetColumnValuesAt(int column, List columnData)
     Renders the specified values into the column with the given position using the current structure and renderer.
Parameters:
  column - index of the column.
public  voidsetElementTableRenderer(ElementTableRenderer renderer)
     Sets the renderer used by this table.
public  voidsetElementTableStructure(ElementTableStructure structure)
     Sets the structure used by this table.
public  voidsetRowCount(int rowCount)
     Increases or shrinks the number of rows to fit the new size.
public  voidsetRowValuesAt(int row, Object[] rowData)
     Renders the specified values into the row with the given position using the current structure and renderer.
Parameters:
  row - index of the row.
public  voidsetRowValuesAt(int row, List rowData)
     Renders the specified values into the row with the given position using the current structure and renderer.
Parameters:
  row - index of the row.
public  voidsetTableValues(Object[][] values)
     Renders all table cells with new values using the current structure and renderer.
public  voidsetTableValues(List values)
     Renders all table cells with new values using the current structure and renderer.
public  voidsetUsePatternMarkupToRender(boolean value)
     Sets whether the original (saved as pattern) markup is used to render.



Method Detail
addColumn
public Element[] addColumn()(Code)
Adds a new column at the end of columns using the cell pattern. the new cell elements.
See Also:   ElementTable.addColumn(Object[])



addColumn
public Element[] addColumn(Object[] columnData)(Code)
Adds a new column at the end of columns using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  columnData - the column values to render. the new cell elements.
See Also:   ElementTable.addColumn()
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



addColumn
public Element[] addColumn(List columnData)(Code)
Adds a new column at the end of columns using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  columnData - the column values to render. the new cell elements.
See Also:   ElementTable.addColumn(Object[])



addRow
public Element addRow()(Code)
Adds a new row element at the end of the table using the row pattern (the new row is a clone). the new row element.
See Also:   ElementTable.addRow(Object[])



addRow
public Element addRow(Object[] rowData)(Code)
Adds a new row element at the end of the table using the row pattern, and renders the specified values using the current structure and renderer.
Parameters:
  rowData - the row values to render. the new row element.
See Also:   ElementTable.addRow()
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



addRow
public Element addRow(List rowData)(Code)
Adds a new row element at the end of the table using the row pattern, and renders the specified values using the current structure and renderer.
Parameters:
  rowData - the row values to render. the new row element.
See Also:   ElementTable.addRow(Object[])



getCellContentElementAt
public Element getCellContentElementAt(int row, int column)(Code)
Returns the "content" element of the cell, this element is used to render below the associated value of the cell. This element is obtained using the current structure.
Parameters:
  row - index of the row. the content element of the row.
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTableStructure.getCellContentElement(ElementTableintintElement)
See Also:   



getCellContentPatternFragment
public DocumentFragment getCellContentPatternFragment()(Code)
Returns the pattern used to render values if ElementTable.isUsePatternMarkupToRender() is true. the pattern used to render values.



getCellPatternElement
public Element getCellPatternElement()(Code)
Returns the element used as a cell pattern. This element may be a clone of the original first cell used as a pattern. the cell pattern element.



getColumnCount
public int getColumnCount()(Code)
Returns the number of columns.
See Also:   ElementTable.setColumnCount(int) the number of columns.



getElementTableRenderer
public ElementTableRenderer getElementTableRenderer()(Code)
Returns the current renderer used by this table. the current renderer.
See Also:   ElementTable.setElementTableRenderer(ElementTableRenderer)
See Also:   



getElementTableStructure
public ElementTableStructure getElementTableStructure()(Code)
Returns the current structure used by this table. the current structure.
See Also:   ElementTable.setElementTableStructure(ElementTableStructure)



getRowContentElementAt
public Element getRowContentElementAt(int row)(Code)
Returns the "content" element of the row, this element is the parent of the row cells This element is obtained using the current structure.
Parameters:
  row - index of the row. the content element of the row.
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTableStructure.getRowContentElement(ElementTableintElement)
See Also:   



getRowPatternElement
public Element getRowPatternElement()(Code)
Returns the element used as a row pattern. This element may be a clone of the original first row used as a pattern. the row pattern element.



insertColumnAt
public Element[] insertColumnAt(int column)(Code)
Inserts a new column at the specified position using the cell pattern.
Parameters:
  column - index of the new column. the new cell elements.
See Also:   ElementTable.insertColumnAt(int,Object[])



insertColumnAt
public Element[] insertColumnAt(int column, Object[] columnData)(Code)
Inserts a new column at the specified position using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  column - index of the new column.
Parameters:
  columnData - the column values to render. the new cell elements.
See Also:   ElementTable.insertColumnAt(int)
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



insertColumnAt
public Element[] insertColumnAt(int column, List columnData)(Code)
Inserts a new column at the specified position using the cell pattern, and renders the specified values using the current structure and renderer.
Parameters:
  column - index of the new column.
Parameters:
  columnData - the column values to render. the new cell elements.
See Also:   ElementTable.insertColumnAt(int,Object[])



insertRowAt
public Element insertRowAt(int row)(Code)
Inserts a new row element at the specified position using the row pattern.
Parameters:
  row - index of the new row. the new row element.
See Also:   ElementTable.insertRowAt(int,Object[])



insertRowAt
public Element insertRowAt(int row, Object[] rowData)(Code)
Inserts a new row element at the specified position using the row pattern, and renders the specified row values using the current structure and renderer.
Parameters:
  row - index of the new row.
Parameters:
  rowData - the row values to render. the new row element.
See Also:   ElementTable.insertRowAt(int)
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



insertRowAt
public Element insertRowAt(int row, List rowData)(Code)
Inserts a new row element at the specified position using the row pattern and renders the specified row values using the current structure and renderer.
Parameters:
  row - index of the new row.
Parameters:
  rowData - the row values to render. the new row element.
See Also:   ElementTable.insertRowAt(int,Object[])



isUsePatternMarkupToRender
public boolean isUsePatternMarkupToRender()(Code)
Informs whether the original (saved as pattern) markup is used to render.

The default value is defined by org.itsnat.core.ItsNatDocument.isUsePatternMarkupToRender

true if the original markup is used.
See Also:   ElementTable.setUsePatternMarkupToRender(boolean)



setCellValueAt
public void setCellValueAt(int row, int column, Object value)(Code)
Renders the specified value into the cell element with the given row and column position using the current structure and renderer.
Parameters:
  row - row of the cell.
Parameters:
  column - column of the cell.
Parameters:
  value - the value to render.
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



setColumnCount
public void setColumnCount(int columnCount)(Code)
Increases or shrinks the number of columns to fit the new size.

If the new size is bigger new columns are added at the end, if the size is lower tail columns are removed.


Parameters:
  columnCount - the new number of columns.
See Also:   ElementTable.getColumnCount()
See Also:   ElementTable.addColumn()
See Also:   ElementTable.removeColumnAt(int)



setColumnValuesAt
public void setColumnValuesAt(int column, Object[] columnData)(Code)
Renders the specified values into the column with the given position using the current structure and renderer.
Parameters:
  column - index of the column.
Parameters:
  columnData - the column values to render.
See Also:   ElementTable.insertColumnAt(int,Object[])
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



setColumnValuesAt
public void setColumnValuesAt(int column, List columnData)(Code)
Renders the specified values into the column with the given position using the current structure and renderer.
Parameters:
  column - index of the column.
Parameters:
  columnData - the column values to render.
See Also:   ElementTable.setColumnValuesAt(int,Object[])



setElementTableRenderer
public void setElementTableRenderer(ElementTableRenderer renderer)(Code)
Sets the renderer used by this table.
Parameters:
  renderer - the new renderer.
See Also:   ElementTable.getElementTableRenderer()
See Also:   



setElementTableStructure
public void setElementTableStructure(ElementTableStructure structure)(Code)
Sets the structure used by this table.
Parameters:
  structure - the new structure.
See Also:   ElementTable.getElementTableStructure()
See Also:   



setRowCount
public void setRowCount(int rowCount)(Code)
Increases or shrinks the number of rows to fit the new size.

If the new size is bigger new rows are added at the end, if the size is lower tail rows are removed.


Parameters:
  rowCount - the new number of rows.
See Also:   ElementTable.getRowCount()
See Also:   ElementTable.addRow()
See Also:   ElementTable.removeRowAt(int)



setRowValuesAt
public void setRowValuesAt(int row, Object[] rowData)(Code)
Renders the specified values into the row with the given position using the current structure and renderer.
Parameters:
  row - index of the row.
Parameters:
  rowData - the row values to render.
See Also:   ElementTable.insertRowAt(int,Object[])
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



setRowValuesAt
public void setRowValuesAt(int row, List rowData)(Code)
Renders the specified values into the row with the given position using the current structure and renderer.
Parameters:
  row - index of the row.
Parameters:
  rowData - the row values to render.
See Also:   ElementTable.setRowValuesAt(int,Object[])



setTableValues
public void setTableValues(Object[][] values)(Code)
Renders all table cells with new values using the current structure and renderer.
Parameters:
  values - the values to render.
See Also:   ElementTable.getElementTableStructure()
See Also:   ElementTable.getElementTableRenderer()
See Also:   
See Also:   ElementTableStructure
See Also:   ElementTableRenderer.renderTable(ElementTableintintObjectElementboolean)



setTableValues
public void setTableValues(List values)(Code)
Renders all table cells with new values using the current structure and renderer.
Parameters:
  values - the values to render.
See Also:   ElementTable.setTableValues(Object[][])



setUsePatternMarkupToRender
public void setUsePatternMarkupToRender(boolean value)(Code)
Sets whether the original (saved as pattern) markup is used to render.
Parameters:
  value - true to enable the use of original markup to render.
See Also:   ElementTable.isUsePatternMarkupToRender()



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