de.miethxml.hawron.gui.context.editor
Interface Editor

All Known Subinterfaces:
CacheableEditor
All Known Implementing Classes:
ExternalEditor, PlainTextEditor

public interface Editor

This interface handle an editor.

Author:
Simon Mieth

Method Summary
 Editor createNewEditor()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getToolTip(java.lang.String lang)
           
 void init()
           
 boolean isSupported(java.lang.String file)
          This method is called when a file is selected and should give the information back, if the editor can edit this type of file or not.
 void newFile(java.lang.String directory)
          Edit a new file in the given directory.
 void open(java.lang.String file)
           
 void save()
           
 void setVisible(boolean state)
           
 

Method Detail

init

public void init()

open

public void open(java.lang.String file)

isSupported

public boolean isSupported(java.lang.String file)
This method is called when a file is selected and should give the information back, if the editor can edit this type of file or not.

Parameters:
file -
Returns:
true if the file is supported otherwise false

save

public void save()

newFile

public void newFile(java.lang.String directory)
Edit a new file in the given directory.

Parameters:
directory -

setVisible

public void setVisible(boolean state)

getIcon

public javax.swing.Icon getIcon()

getToolTip

public java.lang.String getToolTip(java.lang.String lang)

createNewEditor

public Editor createNewEditor()