de.miethxml.hawron.gui.context.editor
Class PlainTextEditor

java.lang.Object
  extended byde.miethxml.hawron.gui.context.editor.PlainTextEditor
All Implemented Interfaces:
Cacheable, CacheableEditor, Editor

public class PlainTextEditor
extends java.lang.Object
implements Cacheable, CacheableEditor

Author:
Simon Mieth

Constructor Summary
PlainTextEditor()
           
 
Method Summary
 void addEditorCloseListener(EditorCloseListener listener)
           
 Editor createNewEditor()
           
 void destroy()
           
 void dispose()
           
 javax.swing.Icon getIcon()
           
 javax.swing.JComponent getSetup()
           
 java.lang.String getToolTip(java.lang.String lang)
           
 boolean hasSetup()
           
 void init()
           
 boolean isSetup()
           
 boolean isSupported(java.lang.String extension)
          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 file)
          Edit a new file in the given directory.
 void open(java.lang.String file)
           
 void removeEditorCloseListener(EditorCloseListener listener)
           
 void save()
           
 void setVisible(boolean state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextEditor

public PlainTextEditor()
Throws:
java.awt.HeadlessException
Method Detail

init

public void init()
Specified by:
init in interface Editor

open

public void open(java.lang.String file)
Specified by:
open in interface Editor

save

public void save()
Specified by:
save in interface Editor

destroy

public void destroy()
Specified by:
destroy in interface Cacheable

getIcon

public javax.swing.Icon getIcon()
Specified by:
getIcon in interface Editor

getSetup

public javax.swing.JComponent getSetup()

getToolTip

public java.lang.String getToolTip(java.lang.String lang)
Specified by:
getToolTip in interface Editor

hasSetup

public boolean hasSetup()

isSetup

public boolean isSetup()

isSupported

public boolean isSupported(java.lang.String extension)
Description copied from interface: Editor
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.

Specified by:
isSupported in interface Editor
Parameters:
extension -
Returns:
true if the file is supported otherwise false

newFile

public void newFile(java.lang.String file)
Description copied from interface: Editor
Edit a new file in the given directory.

Specified by:
newFile in interface Editor
Parameters:
file -

setVisible

public void setVisible(boolean state)
Specified by:
setVisible in interface Editor

addEditorCloseListener

public void addEditorCloseListener(EditorCloseListener listener)
Specified by:
addEditorCloseListener in interface CacheableEditor

removeEditorCloseListener

public void removeEditorCloseListener(EditorCloseListener listener)
Specified by:
removeEditorCloseListener in interface CacheableEditor

createNewEditor

public Editor createNewEditor()
Specified by:
createNewEditor in interface Editor

dispose

public void dispose()
Specified by:
dispose in interface CacheableEditor