PageRenderTime 41ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Unknown | 36 lines | 30 code | 6 blank | 0 comment | 0 complexity | b6eb432b4c14d852918f73be3a0d63c6 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. /**
  2. Print the BeanShell banner (version and author line) - GUI or non GUI.
  3. @author Daniel Leuck
  4. */
  5. import javax.swing.ImageIcon;
  6. import java.awt.*;
  7. import bsh.Interpreter;
  8. import bsh.Capabilities;
  9. import bsh.util.JConsole;
  10. /*
  11. Note: any errors thrown in here will be caught by interpreter and
  12. ignored... printing the default message.
  13. */
  14. printBanner()
  15. {
  16. if ( bsh.console != void
  17. && Capabilities.haveSwing()
  18. && (bsh.console instanceof JConsole) ) {
  19. jconsole = bsh.console;
  20. jconsole.println(
  21. new ImageIcon( getResource("/bsh/util/lib/small_bean_shell.gif")) );
  22. jconsole.print(
  23. Interpreter.VERSION + " - by Pat Niemeyer (pat@pat.net)",
  24. new Font("SansSerif", Font.BOLD, 12),
  25. new Color(20,100,20) );
  26. jconsole.println();
  27. } else
  28. print( "BeanShell "
  29. + Interpreter.VERSION +" - by Pat Niemeyer (pat@pat.net)");
  30. }