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