Class Console

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants

public class Console extends JScrollPane
This class is a general purpose console.
See Also:
  • Constructor Details

    • Console

      public Console()
  • Method Details

    • setErrorFunction

      public void setErrorFunction(Console.IErrorFunction errorFunction)
      Sets a used defined error reporting function.
      Parameters:
      errorFunction -
    • clear

      public void clear()
      Clears the console.
    • save

      public void save(File file) throws FileNotFoundException
      Saves the console content as text to the file given as argument.
      Parameters:
      file -
      Throws:
      FileNotFoundException
    • getText

      public String getText()
      Returns all text in the console.
      Returns:
      Content as String.
    • getSelectedText

      public String getSelectedText()
      Returns the selected text of the console.
      Returns:
      Selection as String.
    • copySelectionToClipboard

      public void copySelectionToClipboard()
      Copy the selected text in the console to the clipboard.
    • copyToClipboard

      public void copyToClipboard()
      Copy the console as text to the clipboard.
    • setStdOut

      public void setStdOut()
      Sets the system's stdout to this console.
    • setStdErr

      public void setStdErr()
      Sets the system's stderr to this console.
    • println

      public void println(String str)
      Prints on the console.
      Parameters:
      str -