View Javadoc
1 package net.sf.panoptes.view.configurator; 2 3 import java.util.HashMap; 4 5 import net.sf.panoptes.controller.MainController; 6 import net.sf.panoptes.model.node.Node; 7 import net.sf.panoptes.model.node.NodeUpdateListener; 8 9 import org.eclipse.swt.widgets.Composite; 10 11 /*** 12 * Abstract superclass for Java-based classes to configure a specific node. 13 * This class is very likely to change - both the name and the methods. 14 * 15 * 1. It shouldn't really be called NodeConfigurator, but maybe ComponentConfigurator 16 * 2. Subclasses need to have constructor like this class, but this is poor practice. 17 * instead, there should be an abstract method called createConfigurator or something. 18 * 19 * @see net.sf.panoptes.model.node.Node 20 * @author Dag Liodden 21 * @version 0.1 22 */ 23 public abstract class NodeConfigurator extends Composite implements NodeUpdateListener { 24 25 private MainController controller; 26 private HashMap attributes; 27 28 public NodeConfigurator(MainController controller, Composite parent, int style, HashMap attributes) { 29 super(parent, style); 30 this.controller = controller; 31 this.attributes = attributes; 32 } 33 34 public Object getAttribute(String key) { 35 return attributes.get(key); 36 } 37 38 public abstract void setNode(Node node); 39 /*** 40 * @return 41 */ 42 public MainController getController() { 43 return controller; 44 } 45 46 /*** 47 * 48 */ 49 public abstract void refresh(); 50 }

This page was automatically generated by Maven