home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 June
/
PCWorld_2007-06_cd.bin
/
multimedia
/
ppsee
/
PPSeeSetup.exe
/
lib
/
bsh-commands-2.0b4.jar
/
bsh
/
commands
/
classBrowser.bsh
< prev
next >
Wrap
Text File
|
2005-05-23
|
1KB
|
49 lines
/**
Open the class browser.
*/
import bsh.util.ClassBrowser;
classBrowser()
{
this.inDesktop = ( bsh.system.desktop != void );
this.browser = new ClassBrowser( this.interpreter.getClassManager() );
browser.init();
if ( inDesktop ) {
this.frame =
bsh.system.desktop.makeInternalFrame("BeanShell Class Browser");
frame.frameIcon = bsh.system.icons.eye;
bsh.system.desktop.classbrowser = browser;
} else {
this.frame = new javax.swing.JFrame("BeanShell Class Browser");
frame.iconImage=bsh.system.icons.eye.image;
}
// Ignore unhandled method invocations from listeners.
invoke( name, args ) {
if ( !name.startsWith("internalFrame") )
throw new Error("method: "+name);
}
internalFrameClosing( e ) {
// really need foo=void;...
bsh.system.desktop.classbrowser = null;
}
if ( inDesktop )
frame.addInternalFrameListener(this);
browser.setFrame( frame );
frame.getContentPane().add("Center", browser);
frame.pack();
if ( inDesktop )
bsh.system.desktop.addInternalFrame(frame);
frame.show();
frame.selected=true;
return browser;
}