Commits

Anonymous committed b2274be

Adding some JavaDoc to a few public classes

Comments (0)

Files changed (21)

src/org/lantern/BuildInformation.java

+package org.lantern;
 
-package org.lantern;
 public class BuildInformation
 {
-    public static final String VERSION = "1.0-rc2";
-    public static final int BUILD = 45;
+    public static final String VERSION = "1.0";
+    public static final int BUILD = 46;
 }
+
         

src/org/lantern/LanternException.java

 import java.io.PrintWriter;
 
 /**
- *
+ * This is a general exception class used by all of Lantern, mostly for 
+ * wrapping IOException:s. If you think this should be extending
+ * RuntimeException instead of Exception, please let us know.
  * @author mabe02
  */
 public class LanternException extends Exception {

src/org/lantern/LanternTerminal.java

 import org.lantern.terminal.Terminal;
 
 /**
- *
+ * This is a helper class for creating the three types of terminal objects.
  * @author mabe02
  */
 public class LanternTerminal

src/org/lantern/TerminalFactory.java

 import org.lantern.terminal.Terminal;
 
 /**
- *
+ * This factory class will create terminal objects suitable for a specific environment
  * @author mabe02
  */
 public abstract class TerminalFactory
 {
     public abstract Terminal createTerminal(InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset);
 
+    /**
+     * This factory implementation returns a Swing terminal if GraphicsEnvironment.isHeadless() returns false,
+     * otherwise a common Unix text terminal.
+     */
     public static class Default extends TerminalFactory
     {
         @Override
         }
     }
 
+    /**
+     * This factory implementation returns a common unix text terminal.
+     */
     public static class Common extends TerminalFactory
     {
         @Override
         }
     }
 
+    /**
+     * This factory implementation returns a Swing-based text terminal emulator
+     */
     public static class Swing extends TerminalFactory
     {
         @Override

src/org/lantern/gui/theme/Theme.java

 import org.lantern.terminal.Terminal.Color;
 
 /**
- *
+ * Extend this class to create your own themes
  * @author mabe02
  */
 public class Theme

src/org/lantern/input/CommonProfile.java

 import java.util.List;
 
 /**
- *
+ * Common key press profiles that seems to be shared by most terminals/terminal emulators.
  * @author mabe02
  */
 public class CommonProfile extends KeyMappingProfile

src/org/lantern/input/GnomeTerminalProfile.java

 import java.util.Collection;
 
 /**
- *
+ * Adds some codes from the gnome-terminal, commonly used in Ubuntu.
  * @author mabe02
  */
 public class GnomeTerminalProfile extends CommonProfile

src/org/lantern/input/Key.java

 package org.lantern.input;
 
 /**
- *
+ * Represents a key pressed. Use getKind() to see if it's a normal alpha-numeric
+ * key or any special key. Currently the function keys F1 - F12 are not implemented.
+ * Also, sorry if the special keys are sort of european-language centered, that's
+ * unfortunately the only keyboard I have to test this with.
  * @author mabe02
  */
 public class Key

src/org/lantern/input/PuttyProfile.java

 import java.util.Collection;
 
 /**
- *
+ * Adds some codes from the Putty, a popular terminal emulator for Windows 
+ * (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
  * @author mabe02
  */
 public class PuttyProfile extends CommonProfile

src/org/lantern/screen/Screen.java

 import org.lantern.terminal.TerminalSize;
 
 /**
- *
+ * A layer to put on top of a Terminal object, giving you a kind of screen buffer
+ * to use, which is a lot easier to work with. Drawing text or graphics to the
+ * terminal is kind of like writing to a bitmap.
  * @author mabe02
  */
 public class Screen implements InputProvider

src/org/lantern/screen/ScreenWriter.java

 import org.lantern.terminal.TerminalPosition;
 
 /**
- *
+ * Helper class to write to a Screen, a bit like a pen in graphical environments.
  * @author mabe02
  */
 public class ScreenWriter

src/org/lantern/terminal/AbstractTerminal.java

 import org.lantern.input.KeyMappingProfile;
 
 /**
- *
+ * Containing a common implementation for most terminal
  * @author mabe02
  */
 public abstract class AbstractTerminal implements Terminal

src/org/lantern/terminal/CommonTerminal.java

 import org.lantern.input.CommonProfile;
 
 /**
- *
+ * A common ANSI text terminal implementation
  * @author mabe02
  */
 public abstract class CommonTerminal extends AbstractTerminal

src/org/lantern/terminal/CommonUnixTerminal.java

 import sun.misc.SignalHandler;
 
 /**
- *
+ * A common ANSI terminal extention with support for Unix resize signals
  * @author mabe02
  */
 public class CommonUnixTerminal extends CommonTerminal

src/org/lantern/terminal/SwingTerminal.java

 import org.lantern.input.KeyMappingProfile;
 
 /**
- *
+ * A Swing-based text terminal emulator
  * @author mabe02
  */
 public class SwingTerminal implements Terminal

src/org/lantern/terminal/TermInfoTerminal.java

 import org.lantern.input.TermInfoProfile;
 
 /**
- *
+ * A terminal implementation reading it's format for the term-info database.
+ * Warning, many term-info databases are not accurate! Please use the common Unix
+ * terminal instead!
  * @author mabe02
  */
 public abstract class TermInfoTerminal extends AbstractTerminal

src/org/lantern/terminal/Terminal.java

 import org.lantern.input.KeyMappingProfile;
 
 /**
- *
+ * This is the main terminal interface, at the lowest level supported by Lantern.
+ * You can implement your own implementation of this if you want to target an
+ * exotic text terminal specification or another graphical environment (like SWT).
  * @author mabe02
  */
 public interface Terminal extends InputProvider

src/org/lantern/terminal/TerminalPosition.java

 package org.lantern.terminal;
 
 /**
- *
+ * A 2-d position in 'terminal space'
  * @author mabe02
  */
 public class TerminalPosition {

src/org/lantern/terminal/TerminalSize.java

 import org.lantern.LanternException;
 
 /**
- *
+ * Terminal dimensions in 2-d space
  * @author mabe02
  */
 public class TerminalSize {

src/org/lantern/terminal/TerminalStatus.java

 import org.lantern.LanternException;
 
 /**
- *
+ * A rather hacky class for figuring out and controlling the terminal environment.
+ * Much of this is sort of Linux specific, but I've got some of it working 
+ * on Solaris too.
  * @author mabe02
  */
 class TerminalStatus

src/org/lantern/terminal/UnixTerminal.java

 import org.lantern.LanternException;
 
 /**
- *
+ * A term-info driven terminal with Unix resize capabilities.
+ * Warning, this probably won't be too accurate, use CommonUnixTerminal instead.
  * @author mabe02
  */
 public class UnixTerminal extends TermInfoTerminal