- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 34 of file FileColumn.java.
◆ FileColumn() [1/2]
◆ FileColumn() [2/2]
org.turro.file.zul.tree.FileColumn.FileColumn |
( |
String |
label, |
|
|
FileColumnType |
type |
|
) |
| |
Definition at line 42 of file FileColumn.java.
43 super(label ==
null ? I_.byKey(type.toString()) : label);
45 if(type.equals(FileColumnType.FILE_NAME_COLUMN)) {
47 }
else if(type.equals(FileColumnType.FILE_SIZE_COLUMN)) {
49 }
else if(type.equals(FileColumnType.FILE_DATE_COLUMN)) {
◆ getCell()
Treecell org.turro.file.zul.tree.FileColumn.getCell |
( |
FileItem |
fileItem | ) |
|
Definition at line 54 of file FileColumn.java.
55 if(type.equals(FileColumnType.FILE_NAME_COLUMN)) {
56 Treecell cell =
new Treecell(
57 fileItem.getFileLabel() !=
null ?
58 fileItem.getFileLabel() :
59 fileItem.getFile().getName());
60 if(fileItem.getFile().isFile()) {
61 cell.appendChild(
new Space());
62 IAcceptanceCtrl accept = (IAcceptanceCtrl) Plugins.loadImplementation(IAcceptanceCtrl.class);
63 accept.setEntity(fileItem.getFile().getAbsolutePath());
64 cell.appendChild((Component) accept);
67 }
else if(type.equals(FileColumnType.FILE_SIZE_COLUMN)) {
68 if(fileItem.getFile().isDirectory()) {
69 return new Treecell(
"");
71 return new Treecell(
new org.turro.formatter.BytesFormatter(fileItem.getFile().length()).toString());
73 }
else if(type.equals(FileColumnType.FILE_DATE_COLUMN)) {
74 DateFormat df = DateFormat.getDateInstance();
75 return new Treecell(df.format(
new Date(fileItem.getFile().lastModified())));
The documentation for this class was generated from the following file: