Package timeflow.data.time

Examples of timeflow.data.time.RoughTime


        @Override
        public void adjustmentValueChanged(AdjustmentEvent e) {
          visuals.grid.setDY(bar.getValue());
         
          // set time in model.
          RoughTime startTime=visuals.grid.getFirstDrawnTime();
          Interval viewInterval=getModel().getViewInterval();
          if (viewInterval!=null)
          {
            viewInterval.translateTo(startTime.getTime());
          }
         
          calendarPanel.drawVisualization();
          calendarPanel.repaint();
        }
View Full Code Here


  public double scoreFormatMatch(String s) {
    if (s==null || s.length()==0)
      return -.05;
    try
    {
      RoughTime f=g.guess(s);
      if (f==null)
        return -1;
      if (g.getLastGoodFormat().getUnits()==TimeUnit.YEAR)
      {
        int year=TimeUtils.cal(f.getTime()).get(Calendar.YEAR);
        if (year>2100)
          return -1;
        if (year>1900 && year<2050)
          return 1;
        if (year>2050 || year<1600)
View Full Code Here

      super(field, "by time");
    }

    @Override
    public int compare(Act o1, Act o2) {
      RoughTime a1=o1.getTime(field);
      RoughTime a2=o2.getTime(field);
      if (a1==a2)
        return 0;
      if (a1==null)
        return ascending ? 1 : -1;
      if (a2==null)
View Full Code Here

TOP

Related Classes of timeflow.data.time.RoughTime

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.