Java Doc for Table.java in  » Testing » UISpec4J » org » uispec4j » 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 » Testing » UISpec4J » org.uispec4j 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.uispec4j.AbstractUIComponent
      org.uispec4j.Table

Table
public class Table extends AbstractUIComponent (Code)
Wrapper for JTable components.

The contents of the underlying table can be usually checked with String or Boolean values, as in the following example:


 assertTrue(table.contentEquals(new String[]{
 {"Bart", "Simpson"},
 {"Marge", "Simpson"}
 }));
 
The conversion between the values (Strings) given in the test and the values actually displayed by the table renderer is performed by a dedicated TableCellValueConverter , which retrieves the graphical component that draws the table cells and determines the displayed value accordingly. A DefaultTableCellValueConverter is used by default by the Table component.

Inner Class :public class Cell extends Panel
Inner Class :public class Header

Field Summary
final public static  Class[]SWING_CLASSES
    
final public static  StringTYPE_NAME
    

Constructor Summary
public  Table(JTable table)
    

Method Summary
public  voidaddRowToSelection(int row)
    
public  AssertionbackgroundEquals(Object[][] colors)
    
public  AssertionborderEquals(Border[][] borders)
    
public  AssertioncellIsEditable(int rowIndex, int columnIndex)
    
public  AssertioncellIsSelected(int rowIndex, int columnIndex)
    
public  voidclearSelection()
    
public  voidclick(int row, int column)
    
public  voidclick(int row, int column, Key.Modifier modifier)
    
public  AssertioncolumnEquals(int columnIndex, Object[] expectedColumn)
    
public  AssertioncolumnIsEditable(int columnIndex, boolean isEditable)
    
public  AssertioncolumnIsEditable(String columnName, boolean shouldBeEditable)
    
public  AssertioncolumnSizeEquals(String columnName, int expectedWidth)
    
public  AssertioncolumnSizeEquals(int columnIndex, int expectedWidth)
    
public  AssertioncontentEquals(Object[][] expected)
    
public  AssertioncontentEquals(String[] columnNames, Object[][] expected)
     Checks the values displayed in the table for a given set of columns.
public  voiddoubleClick(int row, int column)
    
public  CelleditCell(int row, int column)
    
public  voideditCell(int row, int column, String value, boolean validateChange)
     Inputs some text in a given cell.

This method only works when the underlying editor is a JTextField or a JComboBox - it will throw an exception if this is not the case, or if the cell is not editable.

public  AssertionforegroundEquals(Object[][] colors)
    
public  ComponentgetAwtComponent()
    
public  intgetColumnCount()
    
public  ObjectgetContentAt(int row, int column)
     Returns the object (String or Boolean) displayed in a given cell.

The returned object is that returned by the current TableCellValueConverter used by the table.

public  ObjectgetContentAt(int row, int column, TableCellValueConverter converter)
     Returns the displayed in a given cell using a specific converter.
public  StringgetDescriptionTypeName()
    
public  HeadergetHeader()
     Returns a helper interface which gives access to the table header.
public  JTablegetJTable()
    
public  intgetRowCount()
    
public  ComponentgetSwingEditorComponentAt(int row, int column)
    
public  AssertionhasHeader()
     Checks that no header is displayed for this table.
public  AssertionisEditable(boolean[][] expected)
    
public  AssertionisEmpty()
    
public  voidremoveRowFromSelection(int row)
    
public  voidresizeColumn(String columnName, int width)
    
public  voidrightClick(int row, int column)
    
public  AssertionrowEquals(int rowIndex, Object[] expectedRow)
    
public  AssertionrowEquals(int rowIndex, String[] columnNames, Object[] expected)
    
public  AssertionrowIsSelected(int rowIndex)
    
public  AssertionrowsAreSelected(int[] rowIndexes)
    
public  voidselectBlock(int top, int left, int bottom, int right)
    
public  voidselectCell(int row, int column)
    
public  voidselectRow(int row)
    
public  voidselectRows(int[] rowIndexes)
    
public  voidselectRows(int start, int end)
    
public  AssertionselectionEquals(boolean[][] expected)
     Checks the selection on a cell-by-cell basis.
public  AssertionselectionIsEmpty()
    
public  voidsetCellValueConverter(int column, TableCellValueConverter tableCellValueConverter)
     Sets a new converter for analyzing the cells of a given column.
public  voidsetDefaultCellValueConverter(TableCellValueConverter cellValueConverter)
     Sets a new converter for analyzing the table cells content.
public  StringtoString()
    
public  TriggertriggerClick(int row, int column, Key.Modifier modifier)
    
public  TriggertriggerDoubleClick(int row, int column)
    
public  TriggertriggerRightClick(int row, int column)
    

Field Detail
SWING_CLASSES
final public static Class[] SWING_CLASSES(Code)



TYPE_NAME
final public static String TYPE_NAME(Code)




Constructor Detail
Table
public Table(JTable table)(Code)




Method Detail
addRowToSelection
public void addRowToSelection(int row)(Code)



backgroundEquals
public Assertion backgroundEquals(Object[][] colors)(Code)
Checks the background color of the table cells
See Also:    Using colors



borderEquals
public Assertion borderEquals(Border[][] borders)(Code)



cellIsEditable
public Assertion cellIsEditable(int rowIndex, int columnIndex)(Code)



cellIsSelected
public Assertion cellIsSelected(int rowIndex, int columnIndex)(Code)



clearSelection
public void clearSelection()(Code)



click
public void click(int row, int column)(Code)



click
public void click(int row, int column, Key.Modifier modifier)(Code)



columnEquals
public Assertion columnEquals(int columnIndex, Object[] expectedColumn)(Code)



columnIsEditable
public Assertion columnIsEditable(int columnIndex, boolean isEditable)(Code)



columnIsEditable
public Assertion columnIsEditable(String columnName, boolean shouldBeEditable)(Code)



columnSizeEquals
public Assertion columnSizeEquals(String columnName, int expectedWidth)(Code)



columnSizeEquals
public Assertion columnSizeEquals(int columnIndex, int expectedWidth)(Code)



contentEquals
public Assertion contentEquals(Object[][] expected)(Code)
Checks the values displayed in the table.

Sample usage:


 assertTrue(table.contentEquals(new Object[][]{
 {"a", Boolean.TRUE, "3"},
 {"c", Boolean.FALSE, "4"}
 }));
 
The conversion between the displayed values and the objects to be given in the array can be customized with Table.setCellValueConverter(int,TableCellValueConverter)



contentEquals
public Assertion contentEquals(String[] columnNames, Object[][] expected)(Code)
Checks the values displayed in the table for a given set of columns.
See Also:   Table.contentEquals(Object[][])



doubleClick
public void doubleClick(int row, int column)(Code)



editCell
public Cell editCell(int row, int column)(Code)
Returns a Cell object for interacting with the content of an individual table cell.

Sample usage:


 ComboBox comboBox = table.editCell(0, 0).getComboBox();
 assertTrue(comboBox.contentEquals(choices));
 comboBox.select("b");
 



editCell
public void editCell(int row, int column, String value, boolean validateChange)(Code)
Inputs some text in a given cell.

This method only works when the underlying editor is a JTextField or a JComboBox - it will throw an exception if this is not the case, or if the cell is not editable. Please refer to Table.editCell(int,int) for a more flexible edition method.




foregroundEquals
public Assertion foregroundEquals(Object[][] colors)(Code)
Checks the foreground color of the table cells
See Also:    Using colors



getAwtComponent
public Component getAwtComponent()(Code)



getColumnCount
public int getColumnCount()(Code)



getContentAt
public Object getContentAt(int row, int column)(Code)
Returns the object (String or Boolean) displayed in a given cell.

The returned object is that returned by the current TableCellValueConverter used by the table.
See Also:   Table.setCellValueConverter(int,TableCellValueConverter)
See Also:   Table.setDefaultCellValueConverter(TableCellValueConverter)




getContentAt
public Object getContentAt(int row, int column, TableCellValueConverter converter)(Code)
Returns the displayed in a given cell using a specific converter.



getDescriptionTypeName
public String getDescriptionTypeName()(Code)



getHeader
public Header getHeader()(Code)
Returns a helper interface which gives access to the table header.



getJTable
public JTable getJTable()(Code)



getRowCount
public int getRowCount()(Code)



getSwingEditorComponentAt
public Component getSwingEditorComponentAt(int row, int column)(Code)



hasHeader
public Assertion hasHeader()(Code)
Checks that no header is displayed for this table.



isEditable
public Assertion isEditable(boolean[][] expected)(Code)



isEmpty
public Assertion isEmpty()(Code)



removeRowFromSelection
public void removeRowFromSelection(int row)(Code)



resizeColumn
public void resizeColumn(String columnName, int width)(Code)



rightClick
public void rightClick(int row, int column)(Code)



rowEquals
public Assertion rowEquals(int rowIndex, Object[] expectedRow)(Code)



rowEquals
public Assertion rowEquals(int rowIndex, String[] columnNames, Object[] expected)(Code)



rowIsSelected
public Assertion rowIsSelected(int rowIndex)(Code)



rowsAreSelected
public Assertion rowsAreSelected(int[] rowIndexes)(Code)



selectBlock
public void selectBlock(int top, int left, int bottom, int right)(Code)



selectCell
public void selectCell(int row, int column)(Code)



selectRow
public void selectRow(int row)(Code)



selectRows
public void selectRows(int[] rowIndexes)(Code)



selectRows
public void selectRows(int start, int end)(Code)



selectionEquals
public Assertion selectionEquals(boolean[][] expected)(Code)
Checks the selection on a cell-by-cell basis.



selectionIsEmpty
public Assertion selectionIsEmpty()(Code)



setCellValueConverter
public void setCellValueConverter(int column, TableCellValueConverter tableCellValueConverter)(Code)
Sets a new converter for analyzing the cells of a given column.



setDefaultCellValueConverter
public void setDefaultCellValueConverter(TableCellValueConverter cellValueConverter)(Code)
Sets a new converter for analyzing the table cells content.



toString
public String toString()(Code)



triggerClick
public Trigger triggerClick(int row, int column, Key.Modifier modifier)(Code)



triggerDoubleClick
public Trigger triggerDoubleClick(int row, int column)(Code)



triggerRightClick
public Trigger triggerRightClick(int row, int column)(Code)



Methods inherited from org.uispec4j.AbstractUIComponent
protected void addAttributes(Component component, XmlWriter.Tag tag)(Code)(Java Doc)
public Assertion backgroundEquals(String expectedColor)(Code)(Java Doc)
public Assertion foregroundEquals(String expectedColor)(Code)(Java Doc)
final public String getDescription()(Code)(Java Doc)
protected void getDescription(Component component, XmlWriter.Tag tag, boolean showVisibleOnly)(Code)(Java Doc)
public String getLabel()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
protected void getSubDescription(Container container, XmlWriter.Tag tag)(Code)(Java Doc)
public Assertion isEnabled()(Code)(Java Doc)
public Assertion isVisible()(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.