home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Shareware / Comunicatii / advwebrank / awr.msi / disk1.cab / bsh_1.2b6.jar / bsh / commands / printBanner.bsh < prev    next >
Encoding:
Text File  |  2002-05-26  |  860 b   |  37 lines

  1. /**
  2.     Print the BeanShell banner (version and author line) - GUI or non GUI.
  3.  
  4.     @author Daniel Leuck
  5. */
  6.  
  7. import javax.swing.ImageIcon;
  8. import java.awt.*;
  9. import bsh.Interpreter;
  10. import bsh.Capabilities;
  11. import 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. */
  17. printBanner() 
  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. }
  37.