source: trunk/j/src/bsh/commands/classBrowser.bsh @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 815 bytes
Line 
1import bsh.util.ClassBrowser;
2
3classBrowser() {
4  inDesktop = ( bsh.system.desktop != void );
5
6  browser = new ClassBrowser();
7  browser.init();
8
9  if ( inDesktop ) {
10    frame = bsh.system.desktop.makeInternalFrame("BeanShell Class Browser");
11    bsh.system.desktop.classbrowser = browser;
12  } else
13    frame = new javax.swing.JFrame("BeanShell Class Browser");
14
15  // Ignore unhandled method invocations from listeners.
16  invoke( method, args ) { }
17
18  internalFrameClosing( e ) {
19    // really need foo=void;... 
20    bsh.system.desktop.classbrowser = null;
21  }
22
23  if ( inDesktop )
24    frame.addInternalFrameListener(this);
25
26  browser.setFrame( frame );
27  frame.getContentPane().add("Center", browser);
28  frame.pack();
29
30  if ( inDesktop )
31    bsh.system.desktop.addInternalFrame(frame);
32
33  frame.show();
34  frame.toFront();
35
36  return browser;
37}
38
Note: See TracBrowser for help on using the repository browser.