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

Public Member Functions

 AttachTree ()
 
 AttachTree (String title)
 
 AttachTree (String title, Set< AttachColumn > columns, boolean publicOnly)
 
AttachListener getAttachListener ()
 
void setAttachListener (AttachListener listener)
 
void setAddToolbar (boolean addToolbar)
 
boolean isOnlyDownload ()
 
void setOnlyDownload (boolean onlyDownload)
 
AttachFolder addFolder (String label, String path, boolean loadOnDemand)
 
Set< AttachColumngetColumns ()
 
Attachment getSelectedAttachment ()
 
AttachResults getResults ()
 
void updateButtons ()
 
boolean getCanDelete ()
 
boolean getCanNew ()
 
boolean getCanEdit ()
 

Detailed Description

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

Definition at line 45 of file zul/tree/AttachTree.java.

Constructor & Destructor Documentation

◆ AttachTree() [1/3]

org.turro.attach.zul.tree.AttachTree.AttachTree ( )

Definition at line 57 of file zul/tree/AttachTree.java.

57  {
58  this(null, EnumSet.of(AttachColumn.ATTACH_SIZE, AttachColumn.ATTACH_DATE, AttachColumn.ATTACH_OWNER), false);
59  }

◆ AttachTree() [2/3]

org.turro.attach.zul.tree.AttachTree.AttachTree ( String  title)

Definition at line 61 of file zul/tree/AttachTree.java.

61  {
62  this(title, EnumSet.of(AttachColumn.ATTACH_SIZE, AttachColumn.ATTACH_DATE, AttachColumn.ATTACH_OWNER), false);
63  }

◆ AttachTree() [3/3]

org.turro.attach.zul.tree.AttachTree.AttachTree ( String  title,
Set< AttachColumn columns,
boolean  publicOnly 
)

Definition at line 65 of file zul/tree/AttachTree.java.

65  {
66  super();
67  this.title = title;
68  this.columns = columns;
69  addColumns();
70  addChildrenSpace();
71  results = new AttachResults();
72  results.setPublicOnly(publicOnly);
73  results.markAll();
74  results.setCkOthers(false);
75  }
void setPublicOnly(boolean publicOnly)
Here is the call graph for this function:

Member Function Documentation

◆ addFolder()

AttachFolder org.turro.attach.zul.tree.AttachTree.addFolder ( String  label,
String  path,
boolean  loadOnDemand 
)

Definition at line 116 of file zul/tree/AttachTree.java.

116  {
117  AttachFolder af = new AttachFolder(label, path, loadOnDemand, columns);
118  children.appendChild(af);
119  af.doProcessors();
120  return af;
121  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttachListener()

AttachListener org.turro.attach.zul.tree.AttachTree.getAttachListener ( )

Definition at line 77 of file zul/tree/AttachTree.java.

77  {
78  return attachListener;
79  }
Here is the caller graph for this function:

◆ getCanDelete()

boolean org.turro.attach.zul.tree.AttachTree.getCanDelete ( )

Definition at line 377 of file zul/tree/AttachTree.java.

377  {
378  return Application.getApplication().isInRole("attach:delete");
379  }
Here is the call graph for this function:

◆ getCanEdit()

boolean org.turro.attach.zul.tree.AttachTree.getCanEdit ( )

Definition at line 385 of file zul/tree/AttachTree.java.

385  {
386  return Application.getApplication().isInRole("attach:edit");
387  }
Here is the call graph for this function:

◆ getCanNew()

boolean org.turro.attach.zul.tree.AttachTree.getCanNew ( )

Definition at line 381 of file zul/tree/AttachTree.java.

381  {
382  return Application.getApplication().isInRole("attach:new");
383  }
Here is the call graph for this function:

◆ getColumns()

Set<AttachColumn> org.turro.attach.zul.tree.AttachTree.getColumns ( )

Definition at line 123 of file zul/tree/AttachTree.java.

123  {
124  return columns;
125  }

◆ getResults()

AttachResults org.turro.attach.zul.tree.AttachTree.getResults ( )

Definition at line 134 of file zul/tree/AttachTree.java.

134  {
135  return results;
136  }

◆ getSelectedAttachment()

Attachment org.turro.attach.zul.tree.AttachTree.getSelectedAttachment ( )

Definition at line 127 of file zul/tree/AttachTree.java.

127  {
128  if(getSelectedItem() instanceof AttachFile) {
129  return ((AttachFile) getSelectedItem()).getAttachment();
130  }
131  return null;
132  }

◆ isOnlyDownload()

boolean org.turro.attach.zul.tree.AttachTree.isOnlyDownload ( )

Definition at line 108 of file zul/tree/AttachTree.java.

108  {
109  return onlyDownload;
110  }

◆ setAddToolbar()

void org.turro.attach.zul.tree.AttachTree.setAddToolbar ( boolean  addToolbar)

Definition at line 85 of file zul/tree/AttachTree.java.

85  {
86  if(addToolbar) {
87  toolbar = new Toolbar();
88  getParent().insertBefore(toolbar, AttachTree.this);
89  if(!onlyDownload) {
90  addSearchbarButtons();
91  toolbar.appendChild(new Space());
92  }
93  addToolbarButtons();
94  }
95  addEventListener(Events.ON_SELECT, new EventListener() {
96  @Override
97  public void onEvent(Event event) throws Exception {
98  updateButtons();
99  if(getSelectedItem() instanceof AttachFolder) {
100  ((AttachFolder) getSelectedItem()).showContents();
101  } else if(onlyDownload && getSelectedItem() instanceof AttachFile) {
102  ((AttachFile) getSelectedItem()).doDownload();
103  }
104  }
105  });
106  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAttachListener()

void org.turro.attach.zul.tree.AttachTree.setAttachListener ( AttachListener  listener)

Definition at line 81 of file zul/tree/AttachTree.java.

81  {
82  this.attachListener = listener;
83  }
Here is the caller graph for this function:

◆ setOnlyDownload()

void org.turro.attach.zul.tree.AttachTree.setOnlyDownload ( boolean  onlyDownload)

Definition at line 112 of file zul/tree/AttachTree.java.

112  {
113  this.onlyDownload = onlyDownload;
114  }
Here is the caller graph for this function:

◆ updateButtons()

void org.turro.attach.zul.tree.AttachTree.updateButtons ( )

Definition at line 289 of file zul/tree/AttachTree.java.

289  {
290  if(toolbar != null) {
291  boolean isFolder = getSelectedItem() instanceof AttachFolder,
292  isFile = getSelectedItem() instanceof AttachFile;
293  if(!onlyDownload) {
294  if(addFolderButton != null) addFolderButton.setVisible(isFolder);
295  if(uploadButton != null) uploadButton.setVisible(isFolder);
296  }
297  downloadButton.setVisible(isFile);
298  if(!onlyDownload) {
299  if(editButton != null) editButton.setVisible(isFile);
300 // if(excelButton != null) excelButton.setVisible(isFile && new AttachSheet((AttachFile) getSelectedItem()).isSheet());
301  if(deleteButton != null) deleteButton.setVisible(isFile);
302  }
303  }
304  }
Here is the caller graph for this function:

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