- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 40 of file FileEditor.java.
◆ afterCompose()
void org.turro.zkoss.text.FileEditor.afterCompose |
( |
| ) |
|
Definition at line 103 of file FileEditor.java.
106 setValue(FileUtil.getContent(
file, Strings.isBlank(
encoding) ? ElephantContext.getEncoding() :
encoding));
108 }
catch (IOException ex) {
109 Logger.getLogger(FileEditor.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ editFile()
static void org.turro.zkoss.text.FileEditor.editFile |
( |
File |
file | ) |
|
|
static |
Definition at line 42 of file FileEditor.java.
43 ElephantMenu.showEntity(
45 "@Editor: " +
file.getName(),
◆ getEncoding()
String org.turro.zkoss.text.FileEditor.getEncoding |
( |
| ) |
|
◆ getFile()
File org.turro.zkoss.text.FileEditor.getFile |
( |
| ) |
|
◆ save()
void org.turro.zkoss.text.FileEditor.save |
( |
| ) |
|
Definition at line 68 of file FileEditor.java.
70 FileUtil.setContent(
file, getText(), Strings.isBlank(
encoding) ? ElephantContext.getEncoding() :
encoding);
71 }
catch (IOException ex) {
72 Logger.getLogger(FileEditor.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ saveAs()
void org.turro.zkoss.text.FileEditor.saveAs |
( |
| ) |
throws IOException |
Definition at line 76 of file FileEditor.java.
81 new InputField(
"Name", getFile().getName(), null, 0)
84 public Object execute(Context context) {
85 InputField[] fields = (InputField[]) context.get(
"fields");
86 if(fields.length > 0) {
87 for(InputField f : fields) {
88 if(
"Name".equals(f.getLabel())) {
89 String path = FileUtil.getParentPath(
file.getAbsolutePath());
91 file =
new File(path +
"/" + f.getValue());
◆ setEncoding()
void org.turro.zkoss.text.FileEditor.setEncoding |
( |
String |
encoding | ) |
|
◆ setFile()
void org.turro.zkoss.text.FileEditor.setFile |
( |
File |
file | ) |
|
◆ encoding
String org.turro.zkoss.text.FileEditor.encoding = null |
|
protected |
◆ file
File org.turro.zkoss.text.FileEditor.file |
|
protected |
The documentation for this class was generated from the following file: