Example #1
0
        public HTDraw(HTModel model, HTView view)
        {
            drawToHTNodeMap = new Dictionary<HTNode, HTDrawNode>();

            this.view = view;
            this.model = model;
            HTModelNode root = model.GetRoot();
            sOrigin = new HTCoordS();
            sMax = new HTCoordS();

            ray = new double[4];
            ray[0] = model.GetLength();

            for (int i = 1; i < ray.Length; i++)
            {
                ray[i] = (ray[0] + ray[i - 1]) / (1 + (ray[0] * ray[i - 1]));
            }

            if (root.IsLeaf())
            {
                drawRoot = new HTDrawNode(null, root, this);
            }
            else
            {
                drawRoot = new HTDrawNodeComposite(null, (HTModelNodeComposite)root, this);
            }
            return;
        }
Example #2
0
        public HTDraw(HTModel model, HTView view)
        {
            drawToHTNodeMap = new Dictionary <HTNode, HTDrawNode>();

            this.view  = view;
            this.model = model;
            HTModelNode root = model.GetRoot();

            sOrigin = new HTCoordS();
            sMax    = new HTCoordS();

            ray    = new double[4];
            ray[0] = model.GetLength();

            for (int i = 1; i < ray.Length; i++)
            {
                ray[i] = (ray[0] + ray[i - 1]) / (1 + (ray[0] * ray[i - 1]));
            }

            if (root.IsLeaf())
            {
                drawRoot = new HTDrawNode(null, root, this);
            }
            else
            {
                drawRoot = new HTDrawNodeComposite(null, (HTModelNodeComposite)root, this);
            }
            return;
        }
Example #3
0
        public HTModelNode(HTNode node, HTModelNodeComposite parent, HTModel model)
        {
            this.node = node;
            this.parent = parent;
            this.model = model;
            model.IncrementNumberOfNodes();

            z = new HTCoordE();
        }
Example #4
0
        public HTModelNode(HTNode node, HTModelNodeComposite parent, HTModel model)
        {
            this.node   = node;
            this.parent = parent;
            this.model  = model;
            model.IncrementNumberOfNodes();

            z = new HTCoordE();
        }
Example #5
0
        public SilverlightHTView(HTModel model)
        {
            this.model = model;
            draw = new HTDraw(model, this);
            action = new HTAction(draw);
            this.Width = 500;
            this.Height = 500;

            StartMouseListening();
        }
Example #6
0
        public SilverlightHTView(HTModel model)
        {
            this.model  = model;
            draw        = new HTDraw(model, this);
            action      = new HTAction(draw);
            this.Width  = 500;
            this.Height = 500;

            StartMouseListening();
        }
        public SilverlightHTView(HTModel model)
        {
            InitializeComponent();  //What does this method do?
            this.model  = model;
            draw        = new HTDraw(model, this);
            action      = new HTAction(draw);
            this.Width  = 500;
            this.Height = 500;

            /*TextBlock tiptext = new TextBlock() { TextWrapping = TextWrapping.Wrap };
             * tiptext.Text = toolTipText;
             *
             * ToolTipService.SetToolTip(this,tiptext);*/

            StartMouseListening();
        }
        public SilverlightHTView(HTModel model)
        {
            InitializeComponent();  //What does this method do?
            this.model = model;
            draw = new HTDraw(model, this);
            action = new HTAction(draw);
            this.Width = 500;
            this.Height = 500;

            /*TextBlock tiptext = new TextBlock() { TextWrapping = TextWrapping.Wrap };
            tiptext.Text = toolTipText;

            ToolTipService.SetToolTip(this,tiptext);*/

            StartMouseListening();
        }
 public HTModelNodeComposite(HTNode node, HTModelNodeComposite parent, HTModel model)
     : base(node, parent, model)
 {
     this.children = new ObservableCollection<HTModelNode>();
     HTNode childNode = null;
     HTModelNode child = null;
     for (IEnumerator i = node.Children(); i.MoveNext(); )
     {
         childNode = (HTNode)i.Current;
         if (childNode.IsLeaf())
         {
             child = new HTModelNode(childNode, this, model);
             //Debug.WriteLine("HTModelNode:" + child);
         }
         else
         {
             child = new HTModelNodeComposite(childNode, this, model);
             //Debug.WriteLine("HTModelNodeComposite:" + child);
         }
         AddChild(child);
     }
     ComputeWeight();
 }
Example #10
0
        public HTModelNodeComposite(HTNode node, HTModelNodeComposite parent, HTModel model)
            : base(node, parent, model)
        {
            this.children = new ObservableCollection <HTModelNode>();
            HTNode      childNode = null;
            HTModelNode child     = null;

            for (IEnumerator i = node.Children(); i.MoveNext();)
            {
                childNode = (HTNode)i.Current;
                if (childNode.IsLeaf())
                {
                    child = new HTModelNode(childNode, this, model);
                    //Debug.WriteLine("HTModelNode:" + child);
                }
                else
                {
                    child = new HTModelNodeComposite(childNode, this, model);
                    //Debug.WriteLine("HTModelNodeComposite:" + child);
                }
                AddChild(child);
            }
            ComputeWeight();
        }
Example #11
0
 public HyperTree(HTNode root)
 {
     model = new HTModel(root);
 }
Example #12
0
 public HTModelNode(HTNode node, HTModel model)
     : this(node,null,model)
 {
 }
Example #13
0
 public HyperTree(HTNode root)
 {
     model = new HTModel(root);
 }
Example #14
0
 public HTModelNodeComposite(HTNode node, HTModel model) : this(node, null, model)
 {
 }