Package java.awt

Examples of java.awt.MenuBar$AccessibleAWTMenuBar


                2));

        fMain.setIconImage(imgEmpty);
        fMain.addWindowListener(this);

        MenuBar bar = new MenuBar();

        // no shortcuts used
        String[] fitems = {
            "-Connect...", "--", "-Open Script...", "-Save Script...",
            "-Save Result...", "--", "-Exit"
        };

        addMenu(bar, "File", fitems);

        String[] vitems = {
            "-Refresh Tree", "--", "-View Tree", "-View Command",
            "-View Result", "-View Editor", "--", "-Results in Grid",
            "-Results in Text"
        };

        addMenu(bar, "View", vitems);

        String[] sitems = {
            "-SELECT", "-INSERT", "-UPDATE", "-DELETE", "--", "-CREATE TABLE",
            "-DROP TABLE", "-CREATE INDEX", "-DROP INDEX", "--", "-SCRIPT",
            "-SHUTDOWN", "--", "-Test Script"
        };

        addMenu(bar, "SQL", sitems);

        Menu recent = new Menu("Recent");

        mRecent = new Menu("Recent");

        bar.add(mRecent);

        String[] soptions = {
            "-AutoCommit on", "-AutoCommit off", "-Commit", "-Rollback", "--",
            "-Disable MaxRows", "-Set MaxRows to 100", "--", "-Logging on",
            "-Logging off", "--",
View Full Code Here


        fMain.setIconImage(imgEmpty);
        fMain.addWindowListener(this);
        fMain.setSize(640, 480);
        fMain.add("Center", this);

        MenuBar  bar    = new MenuBar();
        String[] extras = {
            "Insert 10 rows only", "Insert 1000 rows only", "Insert all rows",
            "-", "Load Settings...", "Save Settings...", "-", "Exit"
        };
        Menu menu = new Menu("Options");

        addMenuItems(menu, extras);
        bar.add(menu);
        fMain.setMenuBar(bar);
        initGUI();

        Dimension d    = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension size = fMain.getSize();
View Full Code Here

     * @return java.awt.MenuBar
     */
    private MenuBar getAntMakeMenuBar() {
        if (iAntMakeMenuBar == null) {
            try {
                iAntMakeMenuBar = new MenuBar();
                iAntMakeMenuBar.add(getFileMenu());
                iAntMakeMenuBar.add(getHelpMenu());
            } catch (Throwable iExc) {
                handleException(iExc);
            }
View Full Code Here

    if (type != oldInstance.getClass())
    {
      return;
    }

    MenuBar bar = (MenuBar) oldInstance;
    int count = bar.getMenuCount();
    Expression getterExp = null;
    for (int i = 0; i < count; i++)
    {
      getterExp = new Expression(bar.getMenu(i), "getLabel", null);
      try
      {
        // Calculate the old value of the property
        Object oldVal = getterExp.getValue();
        // Write the getter expression to the encoder
        enc.writeExpression(getterExp);
        // Get the target value that exists in the new environment
        Object targetVal = enc.get(oldVal);
        // Get the current property value in the new environment
        Object newVal = null;
        try
        {
          newVal = new Expression(((MenuBar) newInstance).getMenu(i), "getLabel", null).getValue();
        }
        catch (IndexOutOfBoundsException ex)
        {
          // The newInstance has no elements, so current property
          // value remains null
        }
        /*
         * Make the target value and current property value equivalent in the new environment
         */
        if (null == targetVal)
        {
          if (null != newVal)
          {
            // Set to null
            Statement setterStm = new Statement(oldInstance, "insert", new Object[] { null, i });
            enc.writeStatement(setterStm);
          }
        }
        else
        {
          PersistenceDelegate pd = enc.getPersistenceDelegate(targetVal.getClass());
          if (!pd.mutatesTo(targetVal, newVal))
          {
            Menu menu = new Menu((String) oldVal);
            menu.setName(bar.getMenu(i).getName());
            Statement setterStm = new Statement(oldInstance, "add", new Object[] { menu });
            enc.writeStatement(setterStm);
          }
        }
      }
View Full Code Here

  {
    this.fMain = new Frame("HSQL Database Manager");
    this.imgEmpty = createImage(new MemoryImageSource(2, 2, new int[16], 2, 2));
    this.fMain.setIconImage(this.imgEmpty);
    this.fMain.addWindowListener(this);
    MenuBar localMenuBar = new MenuBar();
    String[] arrayOfString1 = { "-Connect...", "--", "-Open Script...", "-Save Script...", "-Save Result...", "-Save Result csv...", "--", "-Exit" };
    addMenu(localMenuBar, "File", arrayOfString1);
    String[] arrayOfString2 = { "RRefresh Tree", "--", "GResults in Grid", "TResults in Text", "--", "1Shrink Tree", "2Enlarge Tree", "3Shrink Command", "4Enlarge Command" };
    addMenu(localMenuBar, "View", arrayOfString2);
    String[] arrayOfString3 = { "SSELECT", "IINSERT", "UUPDATE", "DDELETE", "--", "-CREATE TABLE", "-DROP TABLE", "-CREATE INDEX", "-DROP INDEX", "--", "-CHECKPOINT", "-SCRIPT", "-SET", "-SHUTDOWN", "--", "-Test Script" };
    addMenu(localMenuBar, "Command", arrayOfString3);
    Menu localMenu1 = new Menu("Recent");
    this.mRecent = new Menu("Recent");
    localMenuBar.add(this.mRecent);
    String[] arrayOfString4 = { "-AutoCommit on", "-AutoCommit off", "OCommit", "LRollback", "--", "-Disable MaxRows", "-Set MaxRows to 100", "--", "-Logging on", "-Logging off", "--", "-Insert test data" };
    addMenu(localMenuBar, "Options", arrayOfString4);
    String[] arrayOfString5 = { "-Dump", "-Restore", "-Transfer" };
    addMenu(localMenuBar, "Tools", arrayOfString5);
    Menu localMenu2 = new Menu("Help");
View Full Code Here

        setLayout (new java.awt.BorderLayout ());

        drawCanvas_ = new BrushSizeDrawCanvas(controller_, 400,400);
        add(drawCanvas_, BorderLayout.CENTER);

        menuBar1 = new MenuBar ();
        menu1 = new Menu ();
        menu1.setLabel ("Menu");
        select = new MenuItem ();
        select.setLabel ("Select");
        select.setName ("select");
View Full Code Here

          System.exit(0);
        }
      }
    );

    MenuBar mb = new MenuBar();
    createMenus(mb);
    frame.setMenuBar(mb);

    //---- first section
    Label suiteLabel= new Label("Test class name:");
View Full Code Here

TOP

Related Classes of java.awt.MenuBar$AccessibleAWTMenuBar

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.