예제 #1
0
        internal void Draw(Graphic g)
        {
            int fh    = 30;
            int space = node.GetSpace();

            // TODO:unfinished
            if (space >= fh)
            {
                active = true;
                HTCoordS zs    = node.GetScreenCoordinates();
                String   name  = node.GetName();
                Color    color = node.GetColor();

                height = fh + 2 * node.GetSize();
                width  = space + 10 + 2 * node.GetSize();
                x      = zs.X - (width / 2) - node.GetSize();
                y      = zs.Y - (fh / 2) - node.GetSize();

                g.DrawDot(zs.X, zs.Y, 3, color);
                g.DrawLabel(x, y, width, height, name, color);
            }
            else
            {
                active = false;
            }
        }
예제 #2
0
        override public String ToString()
        {
            String     result = base.ToString();
            HTDrawNode child  = null;

            result += "\n\tChildren :";
            for (IEnumerator i = Children(); i.MoveNext();)
            {
                child   = (HTDrawNode)i.Current;
                result += "\n\t-> " + child.GetName();
            }
            return(result);
        }