home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Freeware 25 / FreelogHS25.iso / Dessin / ArtOfIllusion2.2.1 / ArtOfIllusion.jar / bsh / commands / printBanner.bsh < prev    next >
Text File  |  2005-05-23  |  867b  |  38 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.  
  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. }
  38.