Changeset 3386 for trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfoFactory.cs
- Timestamp:
- 04/17/10 23:50:05 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfoFactory.cs
r3374 r3386 30 30 31 31 namespace HeuristicLab.Operators.Views.GraphVisualization { 32 public static class Factory { 33 private static LinePenStyle connectionPenStyle; 34 35 static Factory() { 36 connectionPenStyle = new LinePenStyle(); 37 connectionPenStyle.EndCap = LineCap.ArrowAnchor; 38 } 39 32 internal static class OperatorShapeInfoFactory { 33 public const string PredecessorConnector = "Predecessor"; 40 34 public static IOperatorShapeInfo CreateOperatorShapeInfo(IOperator op) { 41 IEnumerable<string> operatorParameterNames = op.Parameters.Where(p => p is IValueParameter<IOperator> && p.Name != "Successor").Select(p => p.Name);35 IEnumerable<string> operatorParameterNames = op.Parameters.Where(p => p is IValueParameter<IOperator>).Select(p => p.Name); 42 36 IEnumerable<string> paramaterNameValues = op.Parameters.Where(p => !(p is IValueParameter<IOperator>)).Select(p => p.ToString()); 43 37 44 OperatorShapeInfo operatorShapeInfo = new OperatorShapeInfo(operatorParameterNames,paramaterNameValues); 38 OperatorShapeInfo operatorShapeInfo = new OperatorShapeInfo(operatorParameterNames, paramaterNameValues); 39 operatorShapeInfo.AddConnector(PredecessorConnector); 45 40 operatorShapeInfo.Collapsed = true; 46 41 operatorShapeInfo.Title = op.Name; … … 52 47 return operatorShapeInfo; 53 48 } 54 55 public static IConnection CreateConnection(IConnector from, IConnector to) {56 Connection connection = new Connection(from.Point, to.Point);57 connection.From.AllowMove = false;58 connection.To.AllowMove = false;59 from.AttachConnector(connection.From);60 61 to.AttachConnector(connection.To);62 connection.PenStyle = connectionPenStyle;63 return connection;64 }65 49 } 66 50 }
Note: See TracChangeset
for help on using the changeset viewer.