Examples of XMenuBar


Examples of com.sun.star.awt.XMenuBar

    /**
    * Creates a simple menu bar and adds to the window. <p>
    * Has <b>OK</b> status if no runtime exceptions occured.
    */
    public void _setMenuBar() {
        XMenuBar menu = null ;
        boolean result = true ;

        try {
            menu = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class,
                ((XMultiServiceFactory)tParam.getMSF()).
                createInstance("com.sun.star.awt.MenuBar")) ;
        } catch (com.sun.star.uno.Exception e) {
            log.println("Can't instanciate MenuBar service") ;
            result = false ;
        }

        menu.insertItem((short)1, "MenuItem",
            com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;

        oObj.setMenuBar(menu) ;

        tRes.tested("setMenuBar()", result) ;
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    /**
    * Creates a simple menu bar and adds to the window. <p>
    * Has <b>OK</b> status if no runtime exceptions occured.
    */
    public void _setMenuBar() {
        XMenuBar menu = null ;
        boolean result = true ;

        try {
            menu = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class,
                ((XMultiServiceFactory)tParam.getMSF()).
                createInstance("com.sun.star.awt.MenuBar")) ;
        } catch (com.sun.star.uno.Exception e) {
            log.println("Can't instanciate MenuBar service") ;
            result = false ;
        }

        menu.insertItem((short)1, "MenuItem",
            com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;

        oObj.setMenuBar(menu) ;

        tRes.tested("setMenuBar()", result) ;
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    /**
    * Creates a simple menu bar and adds to the window. <p>
    * Has <b>OK</b> status if no runtime exceptions occured.
    */
    public void _setMenuBar() {
        XMenuBar menu = null ;
        boolean result = true ;

        try {
            menu = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class,
                ((XMultiServiceFactory)tParam.getMSF()).
                createInstance("com.sun.star.awt.MenuBar")) ;
        } catch (com.sun.star.uno.Exception e) {
            log.println("Can't instanciate MenuBar service") ;
            result = false ;
        }

        menu.insertItem((short)1, "MenuItem",
            com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;

        oObj.setMenuBar(menu) ;

        tRes.tested("setMenuBar()", result) ;
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    public void addMenuBar(XTopWindow _xTopWindow, XMenuListener _xMenuListener){
    try{
        // create a menubar at the global MultiComponentFactory...
        Object oMenuBar = m_xMCF.createInstanceWithContext("stardiv.Toolkit.VCLXMenuBar", m_xContext);
        // add the menu items...
        XMenuBar xMenuBar = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class, oMenuBar);
        xMenuBar.insertItem((short) 0, "~First MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 0);
        xMenuBar.insertItem((short) 1, "~Second MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 1);
        xMenuBar.setPopupMenu((short) 0, getPopupMenu());
        xMenuBar.addMenuListener(_xMenuListener);
        _xTopWindow.setMenuBar(xMenuBar);
    }catch( Exception e ) {
        throw new java.lang.RuntimeException("cannot happen...");   
    }}
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    public void addMenuBar(XTopWindow _xTopWindow, XMenuListener _xMenuListener){
    try{
        // create a menubar at the global MultiComponentFactory...
        Object oMenuBar = m_xMCF.createInstanceWithContext("com.sun.star.awt.MenuBar", m_xContext);
        // add the menu items...
        XMenuBar xMenuBar = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class, oMenuBar);
        xMenuBar.insertItem((short) 1, "~First MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 0);
        xMenuBar.insertItem((short) 2, "~Second MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 1);
        xMenuBar.setPopupMenu((short) 1, getPopupMenu());
        xMenuBar.addMenuListener(_xMenuListener);
        _xTopWindow.setMenuBar(xMenuBar);
    }catch( Exception e ) {
        throw new java.lang.RuntimeException("cannot happen...");   
    }}
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    public void addMenuBar(XTopWindow _xTopWindow, XMenuListener _xMenuListener){
    try{
        // create a menubar at the global MultiComponentFactory...
        Object oMenuBar = m_xMCF.createInstanceWithContext("stardiv.Toolkit.VCLXMenuBar", m_xContext);
        // add the menu items...
        XMenuBar xMenuBar = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class, oMenuBar);
        xMenuBar.insertItem((short) 0, "~First MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 0);
        xMenuBar.insertItem((short) 1, "~Second MenuBar Item", com.sun.star.awt.MenuItemStyle.AUTOCHECK, (short) 1);
        xMenuBar.setPopupMenu((short) 0, getPopupMenu());
        xMenuBar.addMenuListener(_xMenuListener);
        _xTopWindow.setMenuBar(xMenuBar);
    }catch( Exception e ) {
        throw new java.lang.RuntimeException("cannot happen...");   
    }}
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    /**
    * Creates a simple menu bar and adds to the window. <p>
    * Has <b>OK</b> status if no runtime exceptions occured.
    */
    public void _setMenuBar() {
        XMenuBar menu = null ;
        boolean result = true ;

        try {
            menu = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class,
                ((XMultiServiceFactory)tParam.getMSF()).
                createInstance("com.sun.star.awt.MenuBar")) ;
        } catch (com.sun.star.uno.Exception e) {
            log.println("Can't instanciate MenuBar service") ;
            result = false ;
        }

        menu.insertItem((short)1, "MenuItem",
            com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;

        oObj.setMenuBar(menu) ;

        tRes.tested("setMenuBar()", result) ;
View Full Code Here

Examples of com.sun.star.awt.XMenuBar

    /**
    * Creates a simple menu bar and adds to the window. <p>
    * Has <b>OK</b> status if no runtime exceptions occured.
    */
    public void _setMenuBar() {
        XMenuBar menu = null ;
        boolean result = true ;

        try {
            menu = (XMenuBar) UnoRuntime.queryInterface(XMenuBar.class,
                ((XMultiServiceFactory)tParam.getMSF()).
                createInstance("com.sun.star.awt.MenuBar")) ;
        } catch (com.sun.star.uno.Exception e) {
            log.println("Can't instanciate MenuBar service") ;
            result = false ;
        }

        menu.insertItem((short)1, "MenuItem",
            com.sun.star.awt.MenuItemStyle.CHECKABLE, (short)1) ;

        oObj.setMenuBar(menu) ;

        tRes.tested("setMenuBar()", result) ;
View Full Code Here

Examples of us.thinkable.framework.zed.XMenuBar

  private void init(String menuFname) {
    XFrame.frame = this;
    this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    if (menuFname != null) {
      xmenuBar = new XMenuBar(this, new File(menuFname));
      this.setJMenuBar(xmenuBar);
    }

    //Create the tabpanel
    xtabbedEditorPanel = new XTabbedPanel();
View Full Code Here

Examples of us.thinkable.framework.zed.XMenuBar

    super(frame, title);
    this.frame = frame;
    xtabbedPanel = frame.getXTabbedEditorPanel();
    frame.addEditor(this, title);
    if (menuFname != null) {
      xmenuBar = new XMenuBar(this, new File(menuFname));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.