Java Doc for Column.java in  » Ajax » zk » org » zkoss » zul » 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 » zk » org.zkoss.zul 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.zul.impl.HeaderElement
   org.zkoss.zul.Column

Column
public class Column extends HeaderElement (Code)
A single column in a Columns element. Each child of the Column element is placed in each successive cell of the grid. The column with the most child elements determines the number of rows in each column.

The use of column is mainly to define attributes for each cell in the grid.
author:
   tomyeh




Constructor Summary
public  Column()
    
public  Column(String label)
    
public  Column(String label, String src)
    

Method Summary
public  GridgetGrid()
     Returns the grid that contains this column.
public  StringgetOuterAttrs()
    
public  StringgetSclass()
     Returns the style class.
public  ComparatorgetSortAscending()
     Returns the ascending sorter, or null if not available.
public  ComparatorgetSortDescending()
     Returns the descending sorter, or null if not available.
public  StringgetSortDirection()
     Returns the sort direction.
protected  voidinvalidateWhole()
     Invalidates the whole grid.
public  voidonSort()
     It invokes Column.sort(boolean) to sort list items and maintain Column.getSortDirection .
public  voidsetParent(Component parent)
    
public  voidsetSortAscending(Comparator sorter)
     Sets the ascending sorter, or null for no sorter for the ascending order.
public  voidsetSortAscending(String clsnm)
     Sets the ascending sorter with the class name, or null for no sorter for the ascending order.
public  voidsetSortDescending(Comparator sorter)
     Sets the descending sorter, or null for no sorter for the descending order.
public  voidsetSortDescending(String clsnm)
     Sets the descending sorter with the class name, or null for no sorter for the descending order.
public  voidsetSortDirection(String sortDir)
     Sets the sort direction.
public  booleansort(boolean ascending)
     Sorts the rows ( Row ) based on Column.getSortAscending and Column.getSortDescending , if Column.getSortDirection doesn't matches the ascending argument.

It checks Column.getSortDirection to see whether sorting is required, and update Column.setSortDirection after sorted. For example, if Column.getSortDirection returns "ascending" and the ascending argument is false, nothing happens. To enforce the sorting, you can invoke Column.setSortDirection with "natural" before invoking this method. Alternatively, you can invoke Column.sort(boolean,boolean) instead.

It sorts the rows by use of Components.sort , if not live data (i.e., Grid.getModel is null).

On the other hand, it invokes ListModelExt.sort to sort the rows, if live data (i.e., Grid.getModel is not null). In other words, if you use the live data, you have to implement ListModelExt to sort the live data explicitly.
Parameters:
  ascending - whether to use Column.getSortAscending.If the corresponding comparator is not set, it returns falseand does nothing.

public  booleansort(boolean ascending, boolean force)
     Sorts the rows ( Row ) based on Column.getSortAscending and Column.getSortDescending .
Parameters:
  ascending - whether to use Column.getSortAscending.If the corresponding comparator is not set, it returns falseand does nothing.
Parameters:
  force - whether to enforce the sorting no matter what the sortdirection (Column.getSortDirection) is.If false, this method is the same as Column.sort(boolean).


Constructor Detail
Column
public Column()(Code)



Column
public Column(String label)(Code)



Column
public Column(String label, String src)(Code)




Method Detail
getGrid
public Grid getGrid()(Code)
Returns the grid that contains this column.



getOuterAttrs
public String getOuterAttrs()(Code)



getSclass
public String getSclass()(Code)
Returns the style class. If the style class is not defined ( Column.setSclass is not called or called with null or empty), it returns "sort" if sortable, or null if not sortable.

By sortable we mean that Column.setSortAscending or Column.setSortDescending was called with a non-null comparator




getSortAscending
public Comparator getSortAscending()(Code)
Returns the ascending sorter, or null if not available.



getSortDescending
public Comparator getSortDescending()(Code)
Returns the descending sorter, or null if not available.



getSortDirection
public String getSortDirection()(Code)
Returns the sort direction.

Default: "natural".




invalidateWhole
protected void invalidateWhole()(Code)
Invalidates the whole grid.



onSort
public void onSort()(Code)
It invokes Column.sort(boolean) to sort list items and maintain Column.getSortDirection .



setParent
public void setParent(Component parent)(Code)



setSortAscending
public void setSortAscending(Comparator sorter)(Code)
Sets the ascending sorter, or null for no sorter for the ascending order.



setSortAscending
public void setSortAscending(String clsnm) throws ClassNotFoundException, InstantiationException, IllegalAccessException(Code)
Sets the ascending sorter with the class name, or null for no sorter for the ascending order.



setSortDescending
public void setSortDescending(Comparator sorter)(Code)
Sets the descending sorter, or null for no sorter for the descending order.



setSortDescending
public void setSortDescending(String clsnm) throws ClassNotFoundException, InstantiationException, IllegalAccessException(Code)
Sets the descending sorter with the class name, or null for no sorter for the descending order.



setSortDirection
public void setSortDirection(String sortDir) throws WrongValueException(Code)
Sets the sort direction. This does not sort the data, it only serves as an indicator as to how the grid is sorted.

If you use Column.sort(boolean) to sort rows ( Row ), the sort direction is maintained automatically. If you want to sort it in customized way, you have to set the sort direction manaully.
Parameters:
  sortDir - one of "ascending", "descending" and "natural"




sort
public boolean sort(boolean ascending)(Code)
Sorts the rows ( Row ) based on Column.getSortAscending and Column.getSortDescending , if Column.getSortDirection doesn't matches the ascending argument.

It checks Column.getSortDirection to see whether sorting is required, and update Column.setSortDirection after sorted. For example, if Column.getSortDirection returns "ascending" and the ascending argument is false, nothing happens. To enforce the sorting, you can invoke Column.setSortDirection with "natural" before invoking this method. Alternatively, you can invoke Column.sort(boolean,boolean) instead.

It sorts the rows by use of Components.sort , if not live data (i.e., Grid.getModel is null).

On the other hand, it invokes ListModelExt.sort to sort the rows, if live data (i.e., Grid.getModel is not null). In other words, if you use the live data, you have to implement ListModelExt to sort the live data explicitly.
Parameters:
  ascending - whether to use Column.getSortAscending.If the corresponding comparator is not set, it returns falseand does nothing. whether the rows are sorted.
exception:
  UiException - if Grid.getModel is notnull but ListModelExt is not implemented.




sort
public boolean sort(boolean ascending, boolean force)(Code)
Sorts the rows ( Row ) based on Column.getSortAscending and Column.getSortDescending .
Parameters:
  ascending - whether to use Column.getSortAscending.If the corresponding comparator is not set, it returns falseand does nothing.
Parameters:
  force - whether to enforce the sorting no matter what the sortdirection (Column.getSortDirection) is.If false, this method is the same as Column.sort(boolean). whether the rows are sorted.



Methods inherited from org.zkoss.zul.impl.HeaderElement
public String getAlign()(Code)(Java Doc)
public String getColAttrs()(Code)(Java Doc)
public String getOuterAttrs()(Code)(Java Doc)
public String getValign()(Code)(Java Doc)
abstract protected void invalidateWhole()(Code)(Java Doc)
public void setAlign(String align)(Code)(Java Doc)
public void setValign(String valign)(Code)(Java Doc)
public boolean setVisible(boolean visible)(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.