1 23 package org.objectweb.clif.scenario.util.isac.gui.action; 24 25 import org.apache.log4j.Category; 26 import org.eclipse.jface.action.Action; 27 import org.eclipse.jface.window.ApplicationWindow; 28 import org.objectweb.clif.scenario.util.isac.gui.ScenarioGUIEditor; 29 import org.objectweb.clif.scenario.util.isac.loadprofile.LoadProfileManager; 30 import org.objectweb.clif.scenario.util.isac.util.tree.Node; 31 37 public class AddLoadProfileElementAction extends Action { 38 41 private ScenarioGUIEditor window; 42 private String type ; 43 static Category cat = Category.getInstance(AddLoadProfileElementAction.class 44 .getName()); 45 51 public AddLoadProfileElementAction(ApplicationWindow w, String type) { 52 cat.debug("-> constructor"); 53 this.window = (ScenarioGUIEditor) w; 54 this.type = type; 55 this.setText(type) ; 57 this.setToolTipText("Add a new " + type + " element in the load profile tree viewer") ; 58 } 59 60 public void run() { 61 cat.debug("-> run"); 62 LoadProfileManager loadManager = LoadProfileManager.getInstance() ; 64 if (type.equals(Node.GROUP)) 65 this.window.setScenarioSavedState(false) ; 68 } 69 } | Popular Tags |