/// <summary> /// Constructor /// </summary> /// <param name="site"></param> public LabelShape(IGraphSite site) : base(site) { Rectangle = new RectangleF(0, 0, 70, 20); ShapeColor = Color.LightYellow; textRectangle = Rectangle; textRectangle.Inflate(-2, -2); }
/// <summary> /// This is the default constructor of the class. /// </summary> public PanelShape(IGraphSite site) : base(site) { //set the default size Rectangle = new RectangleF(0, 0, 70, 20); IsResizable = true; }
public ShapeTracker(IGraphSite mSite, RectangleF r, Boolean s) { mRectangle = r; Resizable = s; mTrack = false; this.mSite=mSite; }
//public BlockShape() : base() //{ // Init(); // m_linkedLayer = new GraphLayer(UID.ToString()); // m_linkedLayer.Visible = false; // m_linkedLayer.UseColor = false; // BindingEventHandler(); //} public BlockShape(IGraphSite site) : base(site) { Init(); m_linkedLayer = GenerateLayer(UID.ToString().Trim()); site.Abstract.Insert(m_linkedLayer); BindingEventHandler(); }
/// <summary> /// This is the default constructor of the class. /// </summary> public ArrowShape(IGraphSite site) : base(site) { //set the default size Rectangle = new RectangleF(0, 0, 100, 100); ShapeColor = Color.Red; IsResizable = true; this.IsSquare = true; }
/// <summary> /// Constructs a new ShapeTracker for the given IGraphSite, based on the given rectangle and whether it's resizable. /// </summary> /// <param name="site"></param> /// <param name="r"></param> /// <param name="resizable"></param> /// <param name="square">whether the tracker should constraint the shape to square proportions</param> /// <param name="shape">the shape to which this tracker applies</param> public ShapeTracker(IGraphSite site, RectangleF r, bool resizable, bool square, Shape shape) { mRectangle = r; Resizable = resizable; mTrack = false; this.mSite = site; this.mSquare = square; this.mShape = shape; }
public GraphLayout(IGraphSite mSite) { if(mSite==null) throw new Exception("No mSite specified in graph layout constructor.");; this.mSite = mSite; nnodes = mSite.Nodes.Count; nedges=mSite.Edges.Count; CanvasSize = mSite.Size; nodes=mSite.Nodes; edges=mSite.Edges; }
/// <summary> /// Constructor /// </summary> /// <param name="site"></param> public BaseShape(IGraphSite site) : base(site) { //设置图元初始大小 Rectangle = new RectangleF(0, 0, 70, 70); //初始连接点 initConnector(); //设置可改变大小 IsResizable = true; }
/// <summary> /// Constructor /// </summary> /// <param name="site"></param> public BaseShape(IGraphSite site) : base(site) { //����ͼԪ��ʼ��С Rectangle = new RectangleF(0, 0, 70, 70); //��ʼ���ӵ� initConnector(); //���ÿɸı��С IsResizable = true; }
public TextBoxControlShape(IGraphSite site) : base(site) { //set the default size Rectangle = new RectangleF(0, 0, 70, 40); //set the connector leftConnector = new Connector(this, "Connector", true); leftConnector.ConnectorLocation = ConnectorLocation.West; Connectors.Add(leftConnector); //cannot be resized IsResizable = false; }
/// <summary> /// Constructor /// </summary> /// <param name="site"></param> public SimpleNode(IGraphSite site) : base(site) { //set the default size Rectangle = new RectangleF(0, 0, 70, 20); //set the connector leftConnector = new Connector(this, "Connector", true); leftConnector.ConnectorLocation = ConnectorLocation.West; Connectors.Add(leftConnector); //cannot be resized IsResizable = true; }
/// <summary> /// Constructor /// </summary> /// <param name="site"></param> public ZNode(IGraphSite site) : base(site) { //set the default size Rectangle = new RectangleF(0, 0, 30, 30); //set the centralConnector centralConnector = new Connector(this, "Connector", true); centralConnector.ConnectorLocation = ConnectorLocation.Omni; Connectors.Add(centralConnector); //cannot be resized IsResizable = false; ShapeColor = Color.DarkSlateBlue; }
/// <summary> /// Default constructor /// </summary> /// <param name="mSite"></param> protected GraphLayout(IGraphSite mSite) { if (mSite == null) { throw new Exception("No mSite specified in graph layout constructor."); } ; this.mSite = mSite; nnodes = mSite.Shapes.Count; nedges = mSite.Connections.Count; CanvasSize = mSite.Size; nodes = mSite.Shapes; edges = mSite.Connections; extract = mSite.Abstract; }
public DatabaseShape(IGraphSite site) : base(site) { Rectangle = new RectangleF(0, 0, 70, 20); ShapeColor = Color.DarkRed; TopNode = new Connector(this, "Top", true); TopNode.ConnectorLocation = ConnectorLocation.North; Connectors.Add(TopNode); BottomNode = new Connector(this, "Bottom", true); BottomNode.ConnectorLocation = ConnectorLocation.South; Connectors.Add(BottomNode); LeftNode = new Connector(this, "Left", true); LeftNode.ConnectorLocation = ConnectorLocation.West; Connectors.Add(LeftNode); RightNode = new Connector(this, "Right", true); RightNode.ConnectorLocation = ConnectorLocation.East; Connectors.Add(RightNode); }
/// <summary> /// Update/refresh the connector's appearance /// </summary> public override void Invalidate() { if (mBelongsTo == null) { return; } IGraphSite c = mBelongsTo.Site; //should return the underlying canvasobject if (c == null) { return; } RectangleF r = ConnectionGrip(); //get the neighborhood of the connector if (IsHovered) { r.Inflate(+100, +100); // make sure a sufficient piece of the neighborhood will be refreshed. } c.Invalidate(Rectangle.Round(r)); //...and refresh it by calling the control's invalidate method. }
/// <summary> /// This is the default constructor of the class. /// </summary> public BasicNode(IGraphSite site) : base(site) { //set the default size Rectangle = new RectangleF(0, 0, 70, 20); //add the connectors TopNode = new Connector(this, "Top", true); TopNode.ConnectorLocation = ConnectorLocation.North; Connectors.Add(TopNode); BottomNode = new Connector(this, "Bottom", true); BottomNode.ConnectorLocation = ConnectorLocation.South; Connectors.Add(BottomNode); LeftNode = new Connector(this, "Left", true); LeftNode.ConnectorLocation = ConnectorLocation.West; Connectors.Add(LeftNode); RightNode = new Connector(this, "Right", true); RightNode.ConnectorLocation = ConnectorLocation.East; Connectors.Add(RightNode); IsResizable = true; }
/// <summary> /// Default constructor for the class /// </summary> /// <remarks> /// Parametrem by se mohlo predavat jmeno vystupniho konektoru. /// Problem bude s resenim vystupniho konenktoru, pro ktery vlastne /// neni socket ale pozaduje SVG (bud kreslit natvrdo, nebo udelat /// v IBoxModule pro to nejaky zvlastni socket /// </remarks> /// <param name="site">Interface of a graph site (control) /// </param> /// <param name="box">Box that is connected with this node</param> /// <param name="resM">Resource manager of the application</param> /// <param name="svgman">Provider of svg images</param> /// <param name="view">View where this box is located</param> public BoxNode(IGraphSite site, ModulesManager.IBoxModule box, SVGManager svgman, ProjectManager.View view, ResourceManager resM) : base(site) { FerdaConstants constants = new FerdaConstants(); //filling the node this.box = box; this.svgManager = svgman; this.ResManager = resM; //determining the size Rectangle = new RectangleF(0, 0, constants.KrabickaWidth, constants.KrabickaHeight); //adding the output connector //it is not a FerdaConnector, because the box has no socket defined outputConnector = new Connector(this, ResManager.GetString("PropertiesOutputConnector"), true); Connectors.Add(outputConnector); outputConnector.ConnectorLocation = ConnectorLocations.East; //adding the input connectors inputConnectors = new ConnectorCollection(); for (int i = 0; i < box.Sockets.Length; i++) { bool packed = view.IsAnyBoxPackedIn(box, box.Sockets[i].name); inputConnectors.Add( new FerdaConnector(this, svgManager, box.Sockets[i], packed)); Connectors.Add(inputConnectors[i]); inputConnectors[i].ConnectorLocation = ConnectorLocations.West; } //getting the bitmap bitmap = svgManager.GetBoxBitmap(box); //setting the view this.view = view; //adding the moving handler OnMouseDown += new MouseEventHandler(BoxNode_OnMouseDown); OnMouseUp += new MouseEventHandler(BoxNode_OnMouseUp); Resizable = false; this.Text = box.UserName; //using a smaller font - we have big labels mFont = new Font(mFontFamily, 7, FontStyle.Regular, GraphicsUnit.Point); }
/// <summary> /// This is the default constructor of the class. /// </summary> public DocumentShape(IGraphSite site) : base(site) { }
public ComponentNode(IGraphSite site) : base(site) { Init(true); }
public FlowChartConnection(IGraphSite site) : base(site) { Init(); }
/// <summary> /// Creates a new entity, specifying the mSite /// </summary> /// <param name="mSite"></param> public Entity(IGraphSite mSite) { this.mSite = mSite; InitEntity(); }
public LayoutFactory(IGraphSite mSite) { this.mSite = mSite; }
public AbstractFlowChartShape(IGraphSite site) : base(site) { this.Site = site; Init(); }
/// <summary> /// Creates a new entity, specifying the mSite /// </summary> /// <param name="site"></param> protected Entity(IGraphSite site) { InitEntity(); this.mSite = site; }
/// <summary> /// Class Constructor /// </summary> public SpringEmbedder(IGraphSite site) : base(site) { }
/// <summary> /// Constructor /// </summary> /// <param name="site"></param> public Connection(IGraphSite site) : base(site) { InitConnection(); }
/// <summary> /// Constructor /// </summary> /// <param name="site"></param> protected Shape(IGraphSite site) : base(site) { mControls = new NetronGraphControlCollection(); }
public ActiveRecordBaseClassShape(IGraphSite site) : base(site) { Init(true); }
public AutojxtLayout(IGraphSite site) : base(site) { this.mSite = site; }
public TextShape(IGraphSite site) : base(site) { }
public Shape(IGraphSite site) : base(site) { mControls = new NetronGraphControlCollection(); }
/// <summary> /// Default constructor /// </summary> /// <param name="mSite"></param> public LayoutFactory(IGraphSite mSite) { this.mSite = mSite; }
/// <summary> /// Class Constructor /// </summary> public SpringEmbedder(IGraphSite site ) : base(site) { }
public AbstractARShape(IGraphSite site) : base(site) { }
/// <summary> /// This is the default constructor of the class. /// </summary> public IOShape(IGraphSite site) : base(site) { }
/// <summary> /// This is the default constructor of the class. /// </summary> public DecisionShape(IGraphSite site) : base(site) { }
public Connection(IGraphSite site) : base(site) { InitConnection(); }
/// <summary> /// Default constructor /// </summary> /// <param name="site"></param> public RandomizerLayout(IGraphSite site) : base(site) { this.mSite = site; }
public SwitchConnection(IGraphSite site) : base(site) { Init(); }
/// <summary> /// This is the default constructor of the class. /// </summary> public InputShape(IGraphSite site) : base(site) { }
public ActiveRecordShape(IGraphSite site) : base(site) { Init(true); }
public ComponentNode(IGraphSite site) : base(site) { Init(true); }
public AbstractARShape(IGraphSite site) : base(site) { }