Beispiel #1
0
 public void printOwnHierarchy(ConsoleWriter cw)
 {
     printSiblings(cw);
     cw.indent();
     printUpperHierarchy(cw);
 }
Beispiel #2
0
        public void printUpperHierarchy(ConsoleWriter cw)
        {
            int indentation = cw.Indentation;

                if (parentOne != null)
                {
                    cw.writeLine(parentOne.Info);
                    cw.indent();
                    parentOne.printUpperHierarchy(cw);
                }

                if (parentTwo != null)
                {
                    cw.Indentation = indentation;

                    cw.writeLine(parentTwo.Info);
                    cw.indent();
                    parentTwo.printUpperHierarchy(cw);
                }
        }