예제 #1
0
 public Dimension2D calculateDimension(StringBounder stringBounder) {
   int n = 0;
   for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
     n++;
   }
   return new Dimension2DDouble(n * dayWidth, getHeight());
 }
예제 #2
0
 public TimeElement getEnd() {
   TimeElement result = start;
   for (int i = 1; i < duration; i++) {
     result = timeLine.next(result);
   }
   return result;
 }
예제 #3
0
  public void drawU(UGraphic ug) {
    int n = 0;
    String last = null;

    double pendingX = -1;
    for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
      final String text = "" + d.getMonth().name();
      if (pendingX == -1) {
        pendingX = n * dayWidth;
        last = text;
      }
      ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
      ug = ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE));
      if (text.equals(last) == false) {
        manage(ug, 0, 0, n, last, pendingX);
        pendingX = n * dayWidth;
      }
      last = text;
      n++;
    }
    manage(ug, 0, 0, n, last, pendingX);
  }
예제 #4
0
  public void drawU(UGraphic ug, double x, double y) {
    int n = 0;
    String last = null;

    double pendingX = -1;
    for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
      final String text = "" + d.getMonth().name();
      if (pendingX == -1) {
        pendingX = n * dayWidth;
        last = text;
      }
      ug.getParam().setColor(HtmlColorUtils.BLACK);
      ug.getParam().setBackcolor(HtmlColorUtils.WHITE);
      if (text.equals(last) == false) {
        manage(ug, x, y, n, last, pendingX);
        pendingX = n * dayWidth;
      }
      last = text;
      n++;
    }
    manage(ug, x, y, n, last, pendingX);
  }
예제 #5
0
 public TimeElement getCompleted() {
   return timeLine.next(getEnd());
 }