◆ doFinally()
void org.turro.elephant.configuration.FilesComposer.doFinally |
( |
| ) |
throws Exception |
Definition at line 168 of file FilesComposer.java.
169 save.setDisabled(
true);
170 save.setAutodisable(
"+self,+saveAs");
171 saveAs.setDisabled(
true);
172 saveAs.setAutodisable(
"+self,+save");
◆ onChange()
void org.turro.elephant.configuration.FilesComposer.onChange |
( |
Event |
event | ) |
|
Definition at line 159 of file FilesComposer.java.
160 save.setDisabled(
false);
163 saveAs.setDisabled(
false);
FilesItem getSelectedFile()
◆ onDelFile()
void org.turro.elephant.configuration.FilesComposer.onDelFile |
( |
Event |
event | ) |
|
Definition at line 136 of file FilesComposer.java.
139 Messages.confirmDeletion().add(file.getLabel()).show(() -> {
140 if(Document.from(file.getCurrentFile()).delete()) {
142 filesTree.setSelectedItem(folder);
FilesItem getSelectedFileParent()
◆ onFomantic()
void org.turro.elephant.configuration.FilesComposer.onFomantic |
( |
UploadEvent |
event | ) |
throws Exception |
Definition at line 148 of file FilesComposer.java.
149 Folder fomantic = Folder.from(ElephantContext.getRealPath(
"/_internal/js/semantic-ui"));
151 for(Media media : event.getMedias()) {
152 Medias.toFolder(media, fomantic.folder());
153 Compress.unzip(fomantic.path().resolve(media.getName()), fomantic.path());
154 Document.from(fomantic.path().resolve(media.getName())).delete();
◆ onNewFile()
void org.turro.elephant.configuration.FilesComposer.onNewFile |
( |
Event |
event | ) |
|
Definition at line 115 of file FilesComposer.java.
119 editor.
newFile(folder.getCurrentFile(),
new Command() {
121 public Object execute(Context context) {
122 save.setDisabled(
false);
123 saveAs.setDisabled(
false);
125 filesTree.
selectFile((File) context.get(
"file"), folder);
130 }
catch (IOException ex) {
131 Logger.getLogger(FilesComposer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
FilesItem getSelectedFolder()
void selectFile(File file, Treeitem parent)
void newFile(final File folder, final Command command)
◆ onSave()
void org.turro.elephant.configuration.FilesComposer.onSave |
( |
Event |
event | ) |
|
◆ onSaveAs()
void org.turro.elephant.configuration.FilesComposer.onSaveAs |
( |
Event |
event | ) |
|
Definition at line 96 of file FilesComposer.java.
98 editor.
saveAs(
new Command() {
100 public Object execute(Context context) {
101 save.setDisabled(
false);
102 saveAs.setDisabled(
false);
105 filesTree.
selectFile((File) context.get(
"file"), selectedParent);
109 }
catch (IOException ex) {
110 Logger.getLogger(FilesComposer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
void saveAs(final Command command)
◆ onSelectFile()
void org.turro.elephant.configuration.FilesComposer.onSelectFile |
( |
Event |
event | ) |
|
Definition at line 71 of file FilesComposer.java.
72 save.setDisabled(
true);
73 saveAs.setDisabled(
true);
75 if(file !=
null && (file.isFile() || !file.exists())) {
76 fileName.setValue(file.getName());
82 fileName.setValue(
null);
86 filesTree.getSelectedItem().setOpen(
true);
void setDisabled(boolean value)
void setText(String value)
void setEncoding(String encoding)
The documentation for this class was generated from the following file: