Package net.sourceforge.squirrel_sql.client.action

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


     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

   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

Related Classes of net.sourceforge.squirrel_sql.client.action.SquirrelAction

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.