se.datadosen.jalbum
Class TextEditor

java.lang.Object
  extended by se.datadosen.jalbum.TextEditor

public class TextEditor
extends java.lang.Object

Gives access to the currently plugged in text editor. Our JTextPad editor plugs itself into this class on init To open documents for editing, simply issue TextEditor.openDocument(File)

Since:
8.9.2

Nested Class Summary
static interface TextEditor.Editor
           
 
Method Summary
static javax.swing.text.JTextComponent getCurrentEditorComponent()
          Return the editor component for the last used editor
static void install(TextEditor.Editor editor)
           
static boolean isInstalled()
           
static javax.swing.text.JTextComponent newDocument()
          Return the editor component for a new editor
static boolean openDocument(java.io.File f)
          Open document for editing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openDocument

public static boolean openDocument(java.io.File f)
Open document for editing

Returns:
true if opening succeeds. False if editor is missing

getCurrentEditorComponent

public static javax.swing.text.JTextComponent getCurrentEditorComponent()
Return the editor component for the last used editor


newDocument

public static javax.swing.text.JTextComponent newDocument()
Return the editor component for a new editor


isInstalled

public static boolean isInstalled()

install

public static void install(TextEditor.Editor editor)