Package com.baulsupp.kolja.util.colours

Examples of com.baulsupp.kolja.util.colours.ColouredString


          }
         
          text = text.substring(xPos);
        }
       
        panel.printString(0, row, new ColouredString(ColourPair.WHITE_ON_BLACK, text));
      }
    }
View Full Code Here


    for (int i = 0; i < lines.size(); i++) {
      if (i > 0) {
        newLine();
      }

      append(new ColouredString(lines.get(i)));
    }
  }
View Full Code Here

      append(new ColouredString(lines.get(i)));
    }
  }

  public void append(String string) {
    append(new ColouredString(string));
  }
View Full Code Here

  public void append(String string) {
    append(new ColouredString(string));
  }

  public void append(ColourPair columnColour, String string) {
    append(new ColouredString(columnColour, string));
  }
View Full Code Here

    for (int i = 0; i < lines.length; i++) {
      if (i > 0) {
        newLine();
      }

      append(new ColouredString(columnColour, lines[i]));
    }
  }
View Full Code Here

    formats = new ArrayList<OutputFormat>();
  }

  public TextDisplayRow getRow(Line viewRow) {
    OutputRow row = new OutputRow(viewRow);
    ColouredString seperator = null;

    int l = widths.getColumnCount();

    HighlightResult highlightResults = null;
    if (highlight != null) {
      highlightResults = highlight.getHighlights(viewRow);
    }

    ColourPair rowColour = highlightResults != null ? highlightResults.getRow() : null;
    if (rowColour != null) {
      seperator = this.seperator.changeColour(rowColour);
    } else {
      seperator = this.seperator;
    }

    if (viewRow.isFailed()) {
      row.append(new ColouredString(rowColour, viewRow.toString()));
      return row;
    }

    MultiColourString gridRow = new MultiColourString();
    boolean firstColumn = true;
View Full Code Here

  public MultiColourString fixedWidth(MultiColourString string, int itemWidth, ColourPair rowColour) {
    if (string.length() < itemWidth) {
      int extra = itemWidth - string.length();

      string = new MultiColourString(string);
      string.append(new ColouredString(rowColour, TextUtil.blank(extra)));

      return string;
    } else if (string.length() > itemWidth) {
      return string.part(0, itemWidth);
    } else {
View Full Code Here

    for (int i = 0; i < lines.size(); i++) {
      if (i > 0) {
        newLine();
      }

      append(new ColouredString(lines.get(i)));
    }
  }
View Full Code Here

      append(new ColouredString(lines.get(i)));
    }
  }

  public void append(String string) {
    append(new ColouredString(string));
  }
View Full Code Here

  public void append(String string) {
    append(new ColouredString(string));
  }

  public void append(ColourPair columnColour, String string) {
    append(new ColouredString(columnColour, string));
  }
View Full Code Here

TOP

Related Classes of com.baulsupp.kolja.util.colours.ColouredString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.