PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/bsh/commands/printBanner.bsh

#
Unknown | 37 lines | 31 code | 6 blank | 0 comment | 0 complexity | 775459d73f47366999859870b1bfa1f8 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 org.gjt.sp.jedit.bsh.Interpreter;
  8. import org.gjt.sp.jedit.bsh.Capabilities;
  9. import org.gjt.sp.jedit.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. {
  20. this.jconsole = bsh.console;
  21. jconsole.println(
  22. new ImageIcon( getResource("/bsh/util/lib/small_bean_shell.gif")) );
  23. jconsole.print(
  24. Interpreter.VERSION + " - by Pat Niemeyer (pat@pat.net)",
  25. new Font("SansSerif", Font.BOLD, 12),
  26. new Color(20,100,20) );
  27. jconsole.println();
  28. } else
  29. print( "BeanShell "
  30. + Interpreter.VERSION +" - by Pat Niemeyer (pat@pat.net)");
  31. }