FileDocCategorySizeDatePackage
SiteManager.javaAPI DocExample1571Mon Nov 09 12:43:34 GMT 1998None

SiteManager

public class SiteManager extends JFrame

Fields Summary
JLayeredPane
desktop
Vector
popups
Constructors Summary
public SiteManager()


    
    super("Web Site Manager");
    setSize(450, 250);
    addWindowListener(new BasicWindowMonitor());
    Container contentPane = getContentPane();

    JToolBar jtb = new JToolBar();
    jtb.add(new CutAction(this));
    jtb.add(new CopyAction(this));
    jtb.add(new PasteAction(this));
    contentPane.add(jtb, BorderLayout.NORTH);
    
    // Add our LayeredPane object for the Internal frames
    desktop = new JDesktopPane();
    contentPane.add(desktop, BorderLayout.CENTER);

    addSiteFrame("Sample");
  
Methods Summary
public voidaddPageFrame(java.lang.String name)

    PageFrame pf = new PageFrame(name, this);
    desktop.add(pf, new Integer(1));
    pf.setIconifiable(true);
    popups.addElement(pf);
  
public voidaddSiteFrame(java.lang.String name)

    SiteFrame sf = new SiteFrame(name, this);
    popups.addElement(sf);
    desktop.add(sf, new Integer(2));  // Keep sites on top for now
  
public javax.swing.JInternalFramegetCurrentFrame()

    for (int i = 0; i < popups.size(); i++) {
      JInternalFrame currentFrame = (JInternalFrame)popups.elementAt(i);
      if (currentFrame.isSelected()) {
	return currentFrame;
      }
    }
    return null;
  
public static voidmain(java.lang.String[] args)

    SiteManager mgr = new SiteManager();
    mgr.setVisible(true);