BrightSide Workbench Full Report + Source Code
org.turro.file.zul.tree.FileColumn Class Reference
Inheritance diagram for org.turro.file.zul.tree.FileColumn:
Collaboration diagram for org.turro.file.zul.tree.FileColumn:

Public Member Functions

 FileColumn (FileColumnType type)
 
 FileColumn (String label, FileColumnType type)
 
Treecell getCell (FileItem fileItem)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 34 of file FileColumn.java.

Constructor & Destructor Documentation

◆ FileColumn() [1/2]

org.turro.file.zul.tree.FileColumn.FileColumn ( FileColumnType  type)

Definition at line 38 of file FileColumn.java.

38  {
39  this(null, type);
40  }

◆ FileColumn() [2/2]

org.turro.file.zul.tree.FileColumn.FileColumn ( String  label,
FileColumnType  type 
)

Definition at line 42 of file FileColumn.java.

42  {
43  super(label == null ? I_.byKey(type.toString()) : label);
44  this.type = type;
45  if(type.equals(FileColumnType.FILE_NAME_COLUMN)) {
46  //
47  } else if(type.equals(FileColumnType.FILE_SIZE_COLUMN)) {
48  setWidth("90px");
49  } else if(type.equals(FileColumnType.FILE_DATE_COLUMN)) {
50  setWidth("110px");
51  }
52  }
Here is the call graph for this function:

Member Function Documentation

◆ getCell()

Treecell org.turro.file.zul.tree.FileColumn.getCell ( FileItem  fileItem)

Definition at line 54 of file FileColumn.java.

54  {
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);//PluginChecker.get("acceptctrl");
63  accept.setEntity(fileItem.getFile().getAbsolutePath());
64  cell.appendChild((Component) accept);
65  }
66  return cell;
67  } else if(type.equals(FileColumnType.FILE_SIZE_COLUMN)) {
68  if(fileItem.getFile().isDirectory()) {
69  return new Treecell("");
70  } else {
71  return new Treecell(new org.turro.formatter.BytesFormatter(fileItem.getFile().length()).toString());
72  }
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())));
76  }
77  return null;
78  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: