Examples of SquirrelAction


Examples of net.sourceforge.squirrel_sql.client.action.SquirrelAction

     return result;
  }

  public static void expectActionCollectionGet(String actionName,
        Class<? extends Action> actionClass, ActionCollection col) {
     SquirrelAction action = AppTestUtil.getEasyMockSquirrelAction(actionName);
     expect(col.get(actionClass)).andReturn(action).anyTimes();
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.action.SquirrelAction

     SquirrelAction action = AppTestUtil.getEasyMockSquirrelAction(actionName);
     expect(col.get(actionClass)).andReturn(action).anyTimes();
  }

  public static SquirrelAction getEasyMockSquirrelAction(String name) {
     SquirrelAction result = createMock(SquirrelAction.class);
     expect(result.getValue(Action.NAME)).andReturn(name).anyTimes();
     expect(result.getValue(Action.SMALL_ICON)).andReturn(null).anyTimes();
     expect(result.getValue(Action.MNEMONIC_KEY)).andReturn(null).anyTimes();
     expect(result.getValue(Action.SHORT_DESCRIPTION)).andReturn(null)
                                                      .anyTimes();
     expect(result.getValue(Action.ACTION_COMMAND_KEY)).andReturn(null)
                                                       .anyTimes();
     expect(result.getValue(Action.ACCELERATOR_KEY)).andReturn(null)
                                                    .anyTimes();
     expect(result.isEnabled()).andReturn(true).anyTimes();
     expect(result.getKeyStroke()).andReturn(null).anyTimes();
     expect(result.getValue(isA(String.class))).andStubReturn(null);
     result.addPropertyChangeListener(isA(PropertyChangeListener.class));
     expectLastCall().anyTimes();
     replay(result);
     return result;
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.action.SquirrelAction

   protected void addBookmarkItem(Bookmark bookmark)
   {
      IApplication app = getApplication();
      ActionCollection coll = app.getActionCollection();

      SquirrelAction action =
         (SquirrelAction) coll.get(RunBookmarkAction.class);

      JMenuItem item = new JMenuItem(action);
      item.setText(bookmark.getName());
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.