com.darwinsys.notepad
Class Notepad

java.lang.Object
  extended by com.darwinsys.notepad.Notepad

public class Notepad
extends java.lang.Object

Simple text editor, making Swing do the work. Is it MVC? Well, the JTextArea is the Model, the Actions are Controllers, and the rest is View.


Constructor Summary
Notepad()
           
Notepad(boolean isStandalone)
           
 
Method Summary
 void doLoad(java.io.File file)
           
 void doLoad(java.lang.String fileName)
           
 void doPrint()
          Print a file by name
 void doSave(java.io.File file)
          Save the file to disk, in such a way as to map the UNIX line-endings used inside JTextArea to the correct platform-specific line endings as generated by println().
 void doSave(java.lang.String fileName)
          Thin wrapper for doSave(File).
 javax.swing.JMenu getEditMenu()
           
 javax.swing.JMenu getFileMenu()
           
 javax.swing.JMenu getHelpMenu()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Notepad

public Notepad()

Notepad

public Notepad(boolean isStandalone)
Method Detail

doPrint

public final void doPrint()
                   throws java.io.IOException,
                          javax.print.PrintException
Print a file by name

Throws:
java.io.IOException
javax.print.PrintException

doLoad

public final void doLoad(java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException

doLoad

public final void doLoad(java.lang.String fileName)
                  throws java.io.IOException
Throws:
java.io.IOException

doSave

public final void doSave(java.lang.String fileName)
                  throws java.io.IOException
Thin wrapper for doSave(File).

Parameters:
fileName -
Throws:
java.io.IOException

doSave

public final void doSave(java.io.File file)
                  throws java.io.IOException
Save the file to disk, in such a way as to map the UNIX line-endings used inside JTextArea to the correct platform-specific line endings as generated by println().

Parameters:
file -
Throws:
java.io.IOException

getEditMenu

public javax.swing.JMenu getEditMenu()

getFileMenu

public javax.swing.JMenu getFileMenu()

getHelpMenu

public javax.swing.JMenu getHelpMenu()


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.