Examples of addPhoto()


Examples of net.sourceforge.cardme.vcard.VCardImpl.addPhoto()

    photo1.setCompression(false);
    photo1.setEncodingType(EncodingType.BINARY);
    photo1.setImageMediaType(ImageMediaType.PNG);
    byte[] tuxPicture1 = Util.getFileAsBytes(new File("test/images/smallTux.png"));
    photo1.setPhoto(tuxPicture1);
    vcard.addPhoto(photo1);
   
    LogoType logo = new LogoType();
    logo.setCompression(true);
    logo.setEncodingType(EncodingType.BINARY);
    logo.setImageMediaType(ImageMediaType.PNG);
View Full Code Here

Examples of net.sourceforge.cardme.vcard.VCardImpl.addPhoto()

    appyBasicName(vcard);
   
    PhotoType photo = new PhotoType();
    photo.setPhotoURI(new URI("http://www.google.com/intl/en_com/images/srpr/logo3w.png"));
    photo.setImageMediaType(ImageMediaType.PNG);
    vcard.addPhoto(photo);
    String result = getSerializedString(vcard);
   
    //Changed path to full URI as per http://www.ietf.org/rfc/rfc2426.txt, section 3.1.4
    assertTrue(result.contains("PHOTO;VALUE=URI:http://www.google.com/intl/en_com/images/srpr/logo3w.png"));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.VCardImpl.addPhoto()

    photo.setCompression(true);

    byte[] tuxPicture1 = Util.getFileAsBytes(new File("test/images/smallTux.png"));
    photo.setPhoto(tuxPicture1);
   
    vcard.addPhoto(photo);
    String result = getSerializedString(vcard);
    assertTrue(result.contains("PHOTO;ENCODING=BASE64;TYPE=PNG:"));
  }
 
  @Test
View Full Code Here

Examples of org.photovault.folder.PhotoFolder.addPhoto()

            Collection selectedPhotos = getSelection();
            Iterator iter = selectedPhotos.iterator();
            while ( iter.hasNext() ) {
                PhotoInfo photo = (PhotoInfo) iter.next();
                if ( photo != null ) {
                    folder.addPhoto ( photo );
                }
            }
        }
    }
View Full Code Here

Examples of org.photovault.folder.PhotoFolder.addPhoto()

    PhotoFolder folder = (PhotoFolder) collection;
                lastImportTarget = folder;
    try {
        PhotoInfo[] photos = (PhotoInfo[])t.getTransferData(photoInfoFlavor);
        for ( int n = 0; n < photos.length; n++ ) {
      folder.addPhoto( photos[n] );
        }
        return true;
    } catch (UnsupportedFlavorException ufe) {
        log.warn("importData: unsupported data flavor");
    } catch (IOException ioe) {
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.