Package java.awt.peer

Examples of java.awt.peer.MenuBarPeer


      }
      helpMenu = m;
      if (m != null) {
          m.isHelpMenu = true;
    m.parent = this;
    MenuBarPeer peer = (MenuBarPeer)this.peer;
    if (peer != null) {
        if (m.peer == null) {
            m.addNotify();
        }
        peer.addHelpMenu(m);
    }
      }
  }
    }
View Full Code Here


          m.parent.remove(m);
      }
      menus.addElement(m);
      m.parent = this;

      MenuBarPeer peer = (MenuBarPeer)this.peer;
      if (peer != null) {
          if (m.peer == null) {
        m.addNotify();
    }
    peer.addMenu(m);
      }
      return m;
  }
    }
View Full Code Here

     */
    public void remove(int index) {
        synchronized (getTreeLock()) {
            Menu m = getMenu(index);
            menus.removeElementAt(index);
      MenuBarPeer peer = (MenuBarPeer)this.peer;
      if (peer != null) {
    m.removeNotify();
    m.parent = null;
    peer.delMenu(index);
      }
  }
    }
View Full Code Here

                m.parent.remove(m);
            }
            menus.addElement(m);
            m.parent = this;

            MenuBarPeer peer = (MenuBarPeer)this.peer;
            if (peer != null) {
                if (m.peer == null) {
                    m.addNotify();
                }
                peer.addMenu(m);
            }
            return m;
        }
    }
View Full Code Here

     */
    public void remove(int index) {
        synchronized (getTreeLock()) {
            Menu m = getMenu(index);
            menus.removeElementAt(index);
            MenuBarPeer peer = (MenuBarPeer)this.peer;
            if (peer != null) {
                m.removeNotify();
                m.parent = null;
                peer.delMenu(index);
            }
        }
    }
View Full Code Here

     */
    public void remove(int index) {
        synchronized (getTreeLock()) {
            Menu m = getMenu(index);
            menus.removeElementAt(index);
            MenuBarPeer peer = (MenuBarPeer)this.peer;
            if (peer != null) {
                m.removeNotify();
                m.parent = null;
                peer.delMenu(index);
            }
        }
    }
View Full Code Here

            }
            helpMenu = m;
            if (m != null) {
                m.isHelpMenu = true;
                m.parent = this;
                MenuBarPeer peer = (MenuBarPeer)this.peer;
                if (peer != null) {
                    if (m.peer == null) {
                        m.addNotify();
                    }
                    peer.addHelpMenu(m);
                }
            }
        }
    }
View Full Code Here

                m.parent.remove(m);
            }
            menus.addElement(m);
            m.parent = this;

            MenuBarPeer peer = (MenuBarPeer)this.peer;
            if (peer != null) {
                if (m.peer == null) {
                    m.addNotify();
                }
                peer.addMenu(m);
            }
            return m;
        }
    }
View Full Code Here

  public void remove(MenuComponent m)
  {
    if (m != menubar)
      return;

    MenuBarPeer mp = (MenuBarPeer) menubar.getPeer();
    if (mp != null)
      mp.dispose();

    if (peer != null)
      ((FramePeer) peer).setMenuBar(null);

    this.menubar = null;
View Full Code Here

   *
   * @param menu the new help menu for this menu bar
   */
  public synchronized void setHelpMenu(Menu menu)
  {
    MenuBarPeer myPeer = (MenuBarPeer) getPeer ();

    if (helpMenu != null)
      {
  if (myPeer != null)
    helpMenu.removeNotify();
        helpMenu.setParent(null);
      }
    helpMenu = menu;

    MenuContainer parent = menu.getParent();
    if (parent != null)
      parent.remove(menu);
    menu.setParent(this);

    if (myPeer != null)
      {
        menu.addNotify();
        myPeer.addHelpMenu(menu);
      }
  }
View Full Code Here

TOP

Related Classes of java.awt.peer.MenuBarPeer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.