PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/bsh/commands/printBanner.bsh

#
Unknown | 37 lines | 31 code | 6 blank | 0 comment | 0 complexity | 2b43f441da9a58f481b12a80f8d74142 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
24	    this.jconsole = bsh.console;
25	    jconsole.println( 
26			new ImageIcon( getResource("/bsh/util/lib/small_bean_shell.gif")) );
27	    jconsole.print(
28			Interpreter.VERSION + " - by Pat Niemeyer (pat@pat.net)",
29			new Font("SansSerif", Font.BOLD, 12), 
30			new Color(20,100,20) );
31	    jconsole.println();
32
33	} else
34		print( "BeanShell "
35			+ Interpreter.VERSION +" - by Pat Niemeyer (pat@pat.net)");
36
37}