/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
- import javax.swing.ImageIcon;
- import java.awt.*;
- import bsh.Interpreter;
- import bsh.Capabilities;
- import bsh.util.JConsole;
- /**
- Daniel Leuck: supplied this
- Note: any errors thrown in here will be caught by interpreter and
- ignored... printing the default message.
- */
- printBanner() {
- if ( bsh.console != void
- && Capabilities.haveSwing()
- && (bsh.console instanceof JConsole) ) {
- jconsole = bsh.console;
- jconsole.println(
- new ImageIcon( getResource("/bsh/util/lib/small_bean_shell.gif")) );
- jconsole.print(
- Interpreter.VERSION + " - by Pat Niemeyer (pat@pat.net)",
- new Font("SansSerif", Font.BOLD, 12),
- new Color(20,100,20) );
- jconsole.println();
- } else
- print( "BeanShell "
- + Interpreter.VERSION +" - by Pat Niemeyer (pat@pat.net)");
- }