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

Public Member Functions

 FileTree ()
 
 FileTree (String title)
 
void initTreeColumns (List< FileColumn > fileColumns)
 
FileFilter getFileFilter ()
 
void setFileFilter (FileFilter fileFilter)
 
FileListener getFileListener ()
 
void setFileListener (FileListener listener)
 
String getRole ()
 
void setRole (String role)
 
boolean isInRole (String role)
 
Menupopup getActionMenu ()
 
void setAddToolbar (boolean addToolbar)
 
FileItem addFolder (String label, String path)
 
List< FileColumngetColumns ()
 
File getSelectedFile ()
 

Detailed Description

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

Definition at line 39 of file tree/FileTree.java.

Constructor & Destructor Documentation

◆ FileTree() [1/2]

org.turro.file.zul.tree.FileTree.FileTree ( )

Definition at line 70 of file tree/FileTree.java.

70  {
71  this(null);
72  }

◆ FileTree() [2/2]

org.turro.file.zul.tree.FileTree.FileTree ( String  title)

Definition at line 74 of file tree/FileTree.java.

74  {
75  super();
76  this.title = title;
77  expressionFilter = new ExpressionFilter();
78  innerFileFilter = new InnerFileFilter(this);
79  }

Member Function Documentation

◆ addFolder()

FileItem org.turro.file.zul.tree.FileTree.addFolder ( String  label,
String  path 
)

Definition at line 146 of file tree/FileTree.java.

146  {
147  FileItem fi = new FileItem(label, new File(path));
148  children.appendChild(fi);
149  fi.initPreview();
150  fi.setContext(getActionMenu());
151  if(fi instanceof AfterCompose) {
152  ((AfterCompose) fi).afterCompose();
153  }
154  fi.showContents();
155  return fi;
156  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActionMenu()

Menupopup org.turro.file.zul.tree.FileTree.getActionMenu ( )

Definition at line 134 of file tree/FileTree.java.

134  {
135  return actionMenu;
136  }
Here is the caller graph for this function:

◆ getColumns()

List<FileColumn> org.turro.file.zul.tree.FileTree.getColumns ( )

Definition at line 158 of file tree/FileTree.java.

158  {
159  return CollectionUtil.from(getTreecols().getChildren()).<List<FileColumn>>cast();
160  }

◆ getFileFilter()

FileFilter org.turro.file.zul.tree.FileTree.getFileFilter ( )

Definition at line 106 of file tree/FileTree.java.

106  {
107  return innerFileFilter;
108  }

◆ getFileListener()

FileListener org.turro.file.zul.tree.FileTree.getFileListener ( )

Definition at line 114 of file tree/FileTree.java.

114  {
115  return fileListener;
116  }

◆ getRole()

String org.turro.file.zul.tree.FileTree.getRole ( )

Definition at line 122 of file tree/FileTree.java.

122  {
123  return role;
124  }

◆ getSelectedFile()

File org.turro.file.zul.tree.FileTree.getSelectedFile ( )

Definition at line 162 of file tree/FileTree.java.

162  {
163  if(getSelectedItem() instanceof FileItem) {
164  return ((FileItem) getSelectedItem()).getFile();
165  }
166  return null;
167  }

◆ initTreeColumns()

void org.turro.file.zul.tree.FileTree.initTreeColumns ( List< FileColumn fileColumns)

Definition at line 81 of file tree/FileTree.java.

81  {
82  addColumns(fileColumns);
83  addChildrenSpace();
84  addEventListener(Events.ON_CLICK, new EventListener() {
85  @Override
86  public void onEvent(Event event) throws Exception {
87  FileItem fi = (FileItem) FileTree.this.getSelectedItem();
88  if(fi != null) {
89  fi.processSelection(true);
90  }
91  }
92  });
93  actionMenu = new Menupopup();
94  actionMenu.addEventListener(Events.ON_OPEN, new EventListener() {
95  @Override
96  public void onEvent(Event event) throws Exception {
97  if(lastSelection == null || !lastSelection.equals(FileTree.this.getSelectedItem())) {
98  lastSelection = (FileItem) FileTree.this.getSelectedItem();
99  updateActions();
100  }
101  }
102  });
103  getParent().appendChild(actionMenu);
104  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInRole()

boolean org.turro.file.zul.tree.FileTree.isInRole ( String  role)

Definition at line 130 of file tree/FileTree.java.

130  {
131  return Application.getApplication().isInRole(this.role + ":" + role);
132  }
Here is the call graph for this function:

◆ setAddToolbar()

void org.turro.file.zul.tree.FileTree.setAddToolbar ( boolean  addToolbar)

Definition at line 138 of file tree/FileTree.java.

138  {
139  if(addToolbar) {
140  searchbar = new Toolbar();
141  getParent().insertBefore(searchbar, FileTree.this);
142  addSearchbarButtons();
143  }
144  }

◆ setFileFilter()

void org.turro.file.zul.tree.FileTree.setFileFilter ( FileFilter  fileFilter)

Definition at line 110 of file tree/FileTree.java.

110  {
111  this.fileFilter = fileFilter;
112  }
Here is the caller graph for this function:

◆ setFileListener()

void org.turro.file.zul.tree.FileTree.setFileListener ( FileListener  listener)

Definition at line 118 of file tree/FileTree.java.

118  {
119  this.fileListener = listener;
120  }

◆ setRole()

void org.turro.file.zul.tree.FileTree.setRole ( String  role)

Definition at line 126 of file tree/FileTree.java.

126  {
127  this.role = role;
128  }

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