Skip to content

Method: 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.Node;
8: import networkconfigurator.item.Router;
9:
10: /**
11: * Action for adding a new Router.
12: *
13: * @author Erik Arand
14: *
15: */
16: public class NewRouterAction extends AbstractNewAction {
17:         /**
18:          * action for a new Internet-Object.
19:          *
20:          * @param graph
21:          * the graph.
22:          */
23:         public NewRouterAction(final ConfigurationGraph graph) {
24:                 super(graph);
25:         }
26:
27:         @Override
28:         protected Node createNode(final Point p) {
29:                 return new Router(p, new VariableAssignment(null, null, "Router", null));
30:         }
31:
32: }