Skip to contentMethod: createNode(Point)
      1: package networkconfigurator.actions;
2: 
3: import java.awt.Point;
4: 
5: import model.assignment.VariableAssignment;
6: import networkconfigurator.ConfigurationGraph;
7: import networkconfigurator.item.Host;
8: import networkconfigurator.item.Node;
9: 
10: /**
11:  * Action for adding a new host.
12:  * 
13:  * @author Max Hölscher
14:  *
15:  */
16: public class NewHostAction extends AbstractNewAction {
17:         /**
18:          * The constructor.
19:          * 
20:          * @param graph
21:          *            the graph.
22:          */
23:         public NewHostAction(final ConfigurationGraph graph) {
24:                 super(graph);
25:         }
26: 
27:         @Override
28:         protected Node createNode(final Point p) {
29:                 return new Host(p, new VariableAssignment(null, null, "Host", null));
30:         }
31: }