public static void unRegister(final ToolBarAction action) { synchronized (ActionController.TOOLBAR_ACTION_LIST) { if (!ActionController.TOOLBAR_ACTION_LIST.contains(action)) { return; } ActionController.TOOLBAR_ACTION_LIST.remove(action); } }
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); } }