All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bsh.util.commands.printBanner.bsh Maven / Gradle / Ivy

The newest version!
/**
	Print the BeanShell banner (version and author line) - GUI or non GUI.

	@author Daniel Leuck
*/

import javax.swing.ImageIcon;
import java.awt.*;
import bsh.Interpreter;
import bsh.Capabilities;
import bsh.util.JConsole;

/*
	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) ) 
	{

	    this.jconsole = bsh.console;
	    jconsole.println( 
			new ImageIcon( getResource("/bsh/util/lib/small_bean_shell.gif")) );
	    jconsole.print(
			Interpreter.VERSION + " - by Pat Niemeyer ([email protected])",
			new Font("SansSerif", Font.BOLD, 12), 
			new Color(20,100,20) );
	    jconsole.println();

	} else
		print( "BeanShell "
			+ Interpreter.VERSION +" - by Pat Niemeyer ([email protected])");

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy