- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 52 of file FileItem.java.
◆ FileItem() [1/4]
org.turro.file.zul.tree.FileItem.FileItem |
( |
File |
file | ) |
|
◆ FileItem() [2/4]
org.turro.file.zul.tree.FileItem.FileItem |
( |
String |
label, |
|
|
File |
file |
|
) |
| |
Definition at line 64 of file FileItem.java.
66 this.fileLabel = label;
69 addEventListener(Events.ON_OPEN,
new EventListener<Event>() {
71 public void onEvent(Event event) throws Exception {
72 processSelection(false);
◆ FileItem() [3/4]
org.turro.file.zul.tree.FileItem.FileItem |
( |
String |
label | ) |
|
Definition at line 78 of file FileItem.java.
79 throw new UnsupportedOperationException(
"Do not use");
◆ FileItem() [4/4]
org.turro.file.zul.tree.FileItem.FileItem |
( |
| ) |
|
Definition at line 82 of file FileItem.java.
83 throw new UnsupportedOperationException(
"Do not use");
◆ afterCompose()
void org.turro.file.zul.tree.FileItem.afterCompose |
( |
| ) |
|
Definition at line 313 of file FileItem.java.
315 File file = (File) getValue();
317 setImage(getMimeImage());
318 }
else if(!file.exists() || file.isDirectory()) {
319 setImage(
"/_zul/images/folder.png");
◆ doAddFolder()
void org.turro.file.zul.tree.FileItem.doAddFolder |
( |
| ) |
throws InterruptedException |
Definition at line 99 of file FileItem.java.
100 InputDialog.getInput(
104 new InputField(
"Name",
"", null, 0)
107 public Object execute(Context context) {
108 InputField[] fields = (InputField[]) context.get(
"fields");
109 if(fields.length > 0) {
110 for(InputField f : fields) {
111 if(
"Name".equals(f.getLabel())) {
112 File newFolder =
new File(
getFile().getAbsolutePath() +
"/" + f.getValue());
113 if(newFolder.mkdirs()) {
◆ doRename()
void org.turro.file.zul.tree.FileItem.doRename |
( |
| ) |
throws InterruptedException |
Definition at line 124 of file FileItem.java.
125 if(getParentItem() ==
null)
return;
126 InputDialog.getInput(
130 new InputField(
"Name", getFile().getName(), null, 0)
133 public Object execute(Context context) {
134 InputField[] fields = (InputField[]) context.get(
"fields");
135 if(fields.length > 0) {
136 for(InputField f : fields) {
137 if(
"Name".equals(f.getLabel())) {
138 String path = FileUtil.getParentPath(
getFile().getAbsolutePath());
140 if(
getFile().renameTo(
new File(path +
"/" + f.getValue()))) {
141 FileItem.this.setValue(
new File(path +
"/" + f.getValue()));
◆ getFile()
File org.turro.file.zul.tree.FileItem.getFile |
( |
| ) |
|
◆ getFileLabel()
String org.turro.file.zul.tree.FileItem.getFileLabel |
( |
| ) |
|
◆ getParentFile()
FileItem org.turro.file.zul.tree.FileItem.getParentFile |
( |
| ) |
|
◆ getPath()
String org.turro.file.zul.tree.FileItem.getPath |
( |
| ) |
|
Definition at line 169 of file FileItem.java.
173 if(fi.getParentFile() ==
null) {
176 path =
"/" + fi.getFile().getName() + path;
177 fi = fi.getParentFile();
◆ getTree()
FileTree org.turro.file.zul.tree.FileItem.getTree |
( |
| ) |
|
Definition at line 87 of file FileItem.java.
88 return (FileTree) super.getTree();
◆ initPreview()
void org.turro.file.zul.tree.FileItem.initPreview |
( |
| ) |
|
Definition at line 202 of file FileItem.java.
203 File file = getValue();
204 if(!file.isDirectory()) {
205 FilePreview fp =
new FilePreview(file);
206 getTree().getParent().appendChild(fp);
◆ processSelection()
void org.turro.file.zul.tree.FileItem.processSelection |
( |
boolean |
openItem | ) |
|
◆ reloadContents()
void org.turro.file.zul.tree.FileItem.reloadContents |
( |
| ) |
|
Definition at line 158 of file FileItem.java.
159 if(children !=
null) {
160 children.getChildren().clear();
◆ showContents()
void org.turro.file.zul.tree.FileItem.showContents |
( |
| ) |
|
The documentation for this class was generated from the following file: