Package org.photovault.imginfo

Examples of org.photovault.imginfo.FuzzyDate.format()


  log.debug( "Checking that all are found" );
  for ( int n = 0; n < expected.length; n++ ) {
      if ( expected[n] ) {
                PhotoInfo photo = (PhotoInfo)photos.elementAt( n );
                FuzzyDate d = new FuzzyDate( photo.getShootTime(), photo.getTimeAccuracy() );
    fail( "Photo "+ n + " (id" + photo.getUid() + ", dated " + d.format() + ") not included in result set" );
      }
  }
    }

    class TestListener implements PhotoCollectionChangeListener {
View Full Code Here


        Font attrFont = new Font( "Arial", Font.PLAIN, 10 );
        FontRenderContext frc = g2.getFontRenderContext();
        if ( showDate && photo.getShootTime() != null ) {
            FuzzyDate fd = new FuzzyDate( photo.getShootTime(), photo.getTimeAccuracy() );
           
            String dateStr = fd.format();
            TextLayout txt = new TextLayout( dateStr, attrFont, frc );
            // Calculate the position for the text
            Rectangle2D bounds = txt.getBounds();
            int xpos = startx + ((int)(columnWidth - bounds.getWidth()))/2 - (int)bounds.getMinX();
            g2.clearRect( xpos-2, ypos-2,
View Full Code Here

  Date start = null;
  if ( useFuzzyDateField ) {
      log.debug( "Parsing date range" );
      FuzzyDate fd = FuzzyDate.parse( dateRange.getText() );
      if ( fd != null ) {
    log.debug( "Parsed date range: " + fd.format() );
    start = fd.getMinDate();
      }
  } else {
      start = (Date) startDate.getValue();
  }
View Full Code Here

  Date end = null;
  if ( useFuzzyDateField ) {
      log.debug( "Parsing date range" );
       FuzzyDate fd = FuzzyDate.parse( dateRange.getText() );
      if ( fd != null ) {
    log.debug( "Parsed date range: " + fd.format() );
    end = fd.getMaxDate();
      }
  } else {
      end = (Date) endDate.getValue();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.