19 package org.turro.file.zul.repository;
22 import org.turro.file.zul.navigator.FileRow;
23 import org.turro.i18n.I_;
24 import org.turro.zkoss.grid.PagingGrid;
25 import org.zkoss.zk.ui.ext.AfterCompose;
26 import org.zkoss.zul.Column;
27 import org.zkoss.zul.Columns;
36 private boolean readOnly;
47 this.readOnly = readOnly;
55 this.currentFolder = currentFolder;
59 private void populateList() {
60 getRows(
true).getChildren().clear();
61 if(currentFolder !=
null) {
65 for(File a : currentFolder.
getFiles()) {
66 getRows(
true).appendChild(
new FileRow(a, readOnly));
76 private void addColumns() {
81 Column col =
new Column();
82 col.setLabel(
I_.
get(
"Name"));
84 cols.appendChild(col);
87 col.setLabel(
I_.
get(
"Size"));
88 col.setAlign(
"right");
89 col.setWidth(
"120px");
90 cols.appendChild(col);
93 col.setLabel(
I_.
get(
"Date"));
94 col.setWidth(
"180px");
95 cols.appendChild(col);
RepositoryItem getCurrentFolder()
void setCurrentFolder(RepositoryItem currentFolder)
void setReadOnly(boolean readOnly)
Collection< File > getFiles()
Collection< RepositoryItem > getFileFolders()
static String get(String msg)
Columns getColumns(boolean create)
Rows getRows(boolean create)
void setRowCount(int rows)