PageRenderTime 34ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-0-pre5/bsh/commands/printBanner.bsh

#
Unknown | 33 lines | 26 code | 7 blank | 0 comment | 0 complexity | ea903b8a0e88de99c4b1cb0161cae640 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. import javax.swing.ImageIcon;
  2. import java.awt.*;
  3. import bsh.Interpreter;
  4. import bsh.Capabilities;
  5. import bsh.util.JConsole;
  6. /**
  7. Daniel Leuck: supplied this
  8. Note: any errors thrown in here will be caught by interpreter and
  9. ignored... printing the default message.
  10. */
  11. printBanner() {
  12. if ( bsh.console != void
  13. && Capabilities.haveSwing()
  14. && (bsh.console instanceof JConsole) ) {
  15. jconsole = bsh.console;
  16. jconsole.println(
  17. new ImageIcon( getResource("/bsh/util/lib/small_bean_shell.gif")) );
  18. jconsole.print(
  19. Interpreter.VERSION + " - by Pat Niemeyer (pat@pat.net)",
  20. new Font("SansSerif", Font.BOLD, 12),
  21. new Color(20,100,20) );
  22. jconsole.println();
  23. } else
  24. print( "BeanShell "
  25. + Interpreter.VERSION +" - by Pat Niemeyer (pat@pat.net)");
  26. }