/** * Returns the action for the givven key * * @param keyid * @return */ public static ToolBarAction getToolBarAction(final String keyid) { synchronized (ActionController.TOOLBAR_ACTION_LIST) { for (final ToolBarAction a : ActionController.TOOLBAR_ACTION_LIST) { if (a.getID().equals(keyid)) { return a; } } return null; } }
public static void register(final ToolBarAction action) { synchronized (ActionController.TOOLBAR_ACTION_LIST) { if (ActionController.TOOLBAR_ACTION_LIST.contains(action)) { return; } for (final ToolBarAction act : ActionController.TOOLBAR_ACTION_LIST) { if (act.getID().equalsIgnoreCase(action.getID())) { return; } } ActionController.TOOLBAR_ACTION_LIST.add(action); } }