/**
   * closes the internal frame and removes any associated button and menu components
   *
   * @param f the internal frame being closed
   */
  public void closeFrame(JInternalFrame f) {

    super.closeFrame(f);

    // possible to retrieve the associated buttons right here via
    // f.getAssociatedButton(), and then with a call to getParent() the item
    // can be directly removed from its parent container, but I find the
    // below message propogation to DesktopPane a cleaner implementation...

    desktopPane.removeAssociatedComponents((BaseInternalFrame) f);
    desktopPane.resizeDesktop();
  }
Пример #2
0
 public void endDraggingFrame(JComponent f) {
   super.endDraggingFrame(f);
   resizeDesktop();
 }
  /**
   * insures that the associated toolbar and menu buttons of the internal frame are activated as
   * well
   *
   * @param f the internal frame being activated
   */
  public void activateFrame(JInternalFrame f) {

    super.activateFrame(f);
    ((BaseInternalFrame) f).selectFrameAndAssociatedButtons();
  }