Package ch.sahits.game.openpatrician.model.time

Examples of ch.sahits.game.openpatrician.model.time.DateObject


      y = drawRow(g2d, y, firstColumn, sb.toString());
     
      y += positions.lineHeight;
     
      // Birth
      DateObject now = new DateObject(Date.getInstance(0).getCurrentDate()); // TODO ugly
      y = drawRow(g2d, y, firstColumn, "Born");
      sb = new StringBuilder();
      ICity birthPlace = data.getBirthPlace();
      sb.append("on ").append(data.getBirthDate().toDisplayString()).append(" in ").append(birthPlace.getName()).append(", ");
      sb.append("Age ").append(data.getAge(now));
View Full Code Here


    }
    Calendar cal = Calendar.getInstance();
    cal.set(Calendar.YEAR, year);
    cal.set(Calendar.MONTH, month);
    cal.set(Calendar.DAY_OF_MONTH, day);
    return new DateObject(cal);
  }
View Full Code Here

  public Contributions() {
    contributions = new DailyContribution[]{new DailyContribution(),new DailyContribution(),new DailyContribution(),
                                        new DailyContribution(),new DailyContribution(),new DailyContribution(),
                                        new DailyContribution()};
    date = Date.getInstance(0); // TODO ugly
    lastDate = new DateObject(date.getCurrentDate());
  }
View Full Code Here

   * @param ware
   * @param amount
   */
  public void contribute(IWare ware,int amount){
    int index = date.getWeekdayIndex();
    DateObject now = new DateObject(date.getCurrentDate());
    if (!lastDate.isSameDate(now)){
      contributions[index]=new DailyContribution(); // contribution happens on another day
      lastDate=now;
    }
    contributions[index].contribute(ware, amount);
View Full Code Here

TOP

Related Classes of ch.sahits.game.openpatrician.model.time.DateObject

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.