01: package org.cougaar.core.qos.frame.visualizer.util;
02:
03: import java.io.PrintWriter;
04:
05: /**
06: * Created by IntelliJ IDEA.
07: * User: mwalczak
08: * Date: May 17, 2005
09: * Time: 11:18:02 AM
10: * To change this template use File | Settings | File Templates.
11: */
12: public class FormatWriter {
13: public void indent(PrintWriter w, int numSpaces) {
14: for (int i = 0; i < numSpaces; i++)
15: w.print(' ');
16: }
17:
18: public void write(PrintWriter w, int indentation, String str) {
19: indent(w, indentation);
20: w.println(str);
21: }
22:
23: public void writeLines(PrintWriter w, int indentation,
24: String lines[]) {
25: for (int i = 0; i < lines.length; i++)
26: write(w, indentation, lines[i]);
27: }
28: }
|