public RepresentationGraph(ViewGraph graph) { Model = new ModelInteraction(); PointListener = new RepresentationListener(graph); DeltaChanged += new DeltaHandler(PointListener.Graph_DeltaChanged); OnNewGraph += new NewGraphHandler(PointListener.Graph_NewGraph); GraphBounds = new int[4] { 10, 20, 20, 10 }; FarthestDataPoint = Model.GetFarthestDataPoint() * 2; NewGraph(); }
private void SetEvents(ViewGraph graph) { graph.SortRandom += new SortHandler(Graph_Sort); graph.SortRandomRadius += new SortHandler(Graph_Sort); graph.SortRandomSwap += new SortHandler(Graph_Sort); graph.SortGrid += new SortHandler(Graph_Sort); graph.NewGraph += new EventHandler(Graph_New); graph.ResetGraph += new EventHandler(Graph_Reset); graph.EllipseMobilityToggle += new AttributeChangedHandler(Point_ToggleMobile); graph.TwoDRepresentation.SizeChanged += new SizeChangedEventHandler(TwoDRepresentation_SizeChanged); }
public ViewListener(ViewGraph graph) { MainGraph = new RepresentationGraph(graph); SetEvents(graph); }
public RepresentationListener(ViewGraph graph) { this.FrontEnd = graph; }