Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
        /// <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;
 }
Exemplo n.º 4
0
        //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();
        }
Exemplo n.º 5
0
 /// <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;
 }
Exemplo n.º 6
0
 /// <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;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="site"></param>
 public BaseShape(IGraphSite site)
     : base(site)
 {
     //设置图元初始大小
     Rectangle = new RectangleF(0, 0, 70, 70);
     //初始连接点
     initConnector();
     //设置可改变大小
     IsResizable = true;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="site"></param>
 public BaseShape(IGraphSite site)
     : base(site)
 {
     //����ͼԪ��ʼ��С
     Rectangle = new RectangleF(0, 0, 70, 70);
     //��ʼ���ӵ�
     initConnector();
     //���ÿɸı��С
     IsResizable = true;
 }
Exemplo n.º 10
0
 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;
 }
Exemplo n.º 11
0
 /// <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;
 }
Exemplo n.º 12
0
 /// <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;
 }
Exemplo n.º 13
0
 /// <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;
 }
Exemplo n.º 14
0
        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);
        }
Exemplo n.º 15
0
        /// <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.
        }
Exemplo n.º 16
0
        /// <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;
        }
Exemplo n.º 17
0
        /// <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);
        }
Exemplo n.º 18
0
 /// <summary>
 /// This is the default constructor of the class.
 /// </summary>
 public DocumentShape(IGraphSite site) : base(site)
 {
 }
Exemplo n.º 19
0
		public ComponentNode(IGraphSite site) : base(site)
		{
			Init(true);
		}
 public FlowChartConnection(IGraphSite site) : base(site)
 {
     Init();
 }
Exemplo n.º 21
0
 /// <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;
 }
Exemplo n.º 23
0
 public AbstractFlowChartShape(IGraphSite site) : base(site)
 {
     this.Site = site;
     Init();
 }
Exemplo n.º 24
0
 /// <summary>
 /// Creates a new entity, specifying the mSite
 /// </summary>
 /// <param name="site"></param>
 protected Entity(IGraphSite site)
 {
     InitEntity();
     this.mSite = site;
 }
Exemplo n.º 25
0
 /// <summary>
 /// Class Constructor
 /// </summary>
 public SpringEmbedder(IGraphSite site) : base(site)
 {
 }
Exemplo n.º 26
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="site"></param>
 public Connection(IGraphSite site) : base(site)
 {
     InitConnection();
 }
Exemplo n.º 27
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="site"></param>
 protected Shape(IGraphSite site) : base(site)
 {
     mControls = new NetronGraphControlCollection();
 }
Exemplo n.º 28
0
		public ActiveRecordBaseClassShape(IGraphSite site) : base(site)
		{
			Init(true);
		}
Exemplo n.º 29
0
 public AutojxtLayout(IGraphSite site)
     : base(site)
 {
     this.mSite = site;
 }
Exemplo n.º 30
0
 public TextShape(IGraphSite site)
     : base(site)
 {
 }
Exemplo n.º 31
0
 public Shape(IGraphSite site)
     : base(site)
 {
     mControls = new NetronGraphControlCollection();
 }
Exemplo n.º 32
0
 /// <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)
 {
 }
Exemplo n.º 34
0
 public AbstractARShape(IGraphSite site) : base(site)
 {
 }
Exemplo n.º 35
0
 /// <summary>
 /// This is the default constructor of the class.
 /// </summary>
 public IOShape(IGraphSite site) : base(site)
 {
 }
Exemplo n.º 36
0
 /// <summary>
 /// This is the default constructor of the class.
 /// </summary>
 public DecisionShape(IGraphSite site) : base(site)
 {
 }
 public Connection(IGraphSite site)
     : base(site)
 {
     InitConnection();
 }
Exemplo n.º 38
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="site"></param>
 public RandomizerLayout(IGraphSite site) : base(site)
 {
     this.mSite = site;
 }
Exemplo n.º 39
0
 public SwitchConnection(IGraphSite site) : base(site)
 {
     Init();
 }
Exemplo n.º 40
0
 /// <summary>
 /// This is the default constructor of the class.
 /// </summary>
 public InputShape(IGraphSite site) : base(site)
 {
 }
Exemplo n.º 41
0
 public ActiveRecordShape(IGraphSite site) : base(site)
 {
     Init(true);
 }
Exemplo n.º 42
0
 public ComponentNode(IGraphSite site) : base(site)
 {
     Init(true);
 }
Exemplo n.º 43
0
		public AbstractARShape(IGraphSite site) : base(site)
		{
		}