PageRenderTime 2143ms CodeModel.GetById 30ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 2111ms

/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
 1
 2import javax.swing.ImageIcon;
 3import java.awt.*;
 4import bsh.Interpreter;
 5import bsh.Capabilities;
 6import bsh.util.JConsole;
 7
 8/**
 9	Daniel Leuck: supplied this
10
11	Note: any errors thrown in here will be caught by interpreter and
12	ignored... printing the default message.
13*/
14printBanner() {
15
16	if ( bsh.console != void 
17		&& Capabilities.haveSwing() 
18		&& (bsh.console instanceof JConsole) ) {
19
20	    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
29	} else
30		print( "BeanShell "
31			+ Interpreter.VERSION +" - by Pat Niemeyer (pat@pat.net)");
32
33}