Examples of PhotoInfo


Examples of org.photovault.imginfo.PhotoInfo

         */
        protected abstract void doSetViewMultivaluedState( RawPhotoView view );
       
       
        protected void setModelValue( Object model ) {
            PhotoInfo obj = (PhotoInfo) model;
            RawSettingsFactory f = getRawSettingsFactory( obj );
            if ( f != null ) {
                doSetModelValue( f, value );
                rawSettingsChanged();
            }
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

                doSetModelValue( f, value );
                rawSettingsChanged();
            }
        }
        protected Object getModelValue( Object model ) {
            PhotoInfo obj = (PhotoInfo) model;
            RawConversionSettings r = obj.getRawSettings();
            Object ret = null;
            if ( r != null ) {
                ret = doGetModelValue( r );
            }
            return ret;
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

        }
       
        final String name;       
       
        protected void setModelValue( Object model ) {
            PhotoInfo obj = (PhotoInfo) model;
            ChannelMapOperationFactory f = getColorMappingFactory( obj );
            if ( f != null ) {
                f.setChannelCurve( name, (ColorCurve) value );
            }
            colorMappingChanged();
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

                f.setChannelCurve( name, (ColorCurve) value );
            }
            colorMappingChanged();
        }
        protected Object getModelValue( Object model ) {
            PhotoInfo obj = (PhotoInfo) model;
            ChannelMapOperation cm = obj.getColorChannelMapping();
            ColorCurve ret = null;
            if ( cm != null ) {
                ret = cm.getChannelCurve( name );
            }
            return ret;
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

            }
        });
        digester.addRuleSet( new ChannelMapRuleSet( "*/photo/") );
        digester.addRule( "*/photo/color-mapping", new Rule() {
            public void end( String namespace, String name ) {
                PhotoInfo p = (PhotoInfo) digester.peek(1);
                ChannelMapOperationFactory f =
                        (ChannelMapOperationFactory) digester.peek();
                p.setColorChannelMapping( f.create() );               
            }
        });
       
        digester.addObjectCreate( "*/photo/raw-conversion", RawSettingsFactory.class );
        digester.addRule( "*/photo/raw-conversion", new Rule() {
            public void end( String namespace, String name ) {
                PhotoInfo p = (PhotoInfo)digester.peek(1);
                RawSettingsFactory f = (RawSettingsFactory) digester.peek();
                try {
                    p.setRawSettings( f.create() );
                } catch (PhotovaultException ex) {
                    digester.createSAXException( ex );
                }
            }
        })
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

        }
       
        public Object createObject( Attributes attrs ) {
            String uuidStr = attrs.getValue( "id" );
            UUID uuid = UUID.fromString( uuidStr );
            PhotoInfo p = null;
            try {
                p = PhotoInfo.retrievePhotoInfo(uuid);
            } catch (PhotoNotFoundException ex) {
                log.error( "Error while finding PhotoInfo with uuid " + uuid +
                        ":" + ex.getMessage() );
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

    Thumbnail thumbnail = null;

    public static void main( String args[] ) {
  File f = new File("c:\\java\\photovault\\testfiles\\test1.jpg" );
  try {
      final PhotoInfo photo = PhotoInfo.addToDB( f );
      JFrame frame = new JFrame( "ThumbnailView test" );
      ThumbnailView view = new ThumbnailView();
      frame.getContentPane().add( view, BorderLayout.CENTER );
      frame.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
      photo.delete();
      System.exit(0);
        }
    } );
     
      view.setPhoto( photo );
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

        importer.importData();
        reader.close();

        assertFalse( l.error );
        assertEquals( XmlImporter.IMPORTING_COMPLETED, l.status );
        PhotoInfo p = PhotoInfo.retrievePhotoInfo( UUID.fromString( "65bd68f7-79f4-463b-9e37-0a91182e6499") );
        assertEquals( "NIKON D200", p.getCamera() );
        assertEquals( 8.0, p.getFStop() );
        assertEquals( "Digital", p.getFilm() );
        assertEquals( 100, p.getFilmSpeed() );
        assertEquals( 0, p.getQuality() );
        ChannelMapOperation cm = p.getColorChannelMapping();
        ColorCurve c = cm.getChannelCurve( "value" );
        assertEquals( 0.4, c.getY( 1 ) );
        assertEquals( 0.5, c.getX( 1 ) );
        boolean foundOrig = false;
        for ( int n = 0; n < p.getNumInstances(); n++ ) {
            ImageInstance i = p.getInstance( n );
            if ( i.getInstanceType() == ImageInstance.INSTANCE_TYPE_ORIGINAL ) {
                cm = i.getColorChannelMapping();
                c = cm.getChannelCurve( "value" );
                assertEquals( 0.2, c.getY( 1 ) );
                assertEquals( 0.6, c.getX( 1 ) );               
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

    */
    private void refreshPhotoChangeListeners() {
  // remove change listeners from all existing photos
  Iterator iter = photos.iterator();
  while ( iter.hasNext() ) {
      PhotoInfo photo = (PhotoInfo) iter.next();
      photo.removeChangeListener( this );
  }
 
  photos.removeAllElements();
 
  // Add the change listeners to all photos so that we are aware of modifications
  for ( int n = 0; n < photoCollection.getPhotoCount(); n++ ) {
      PhotoInfo photo = photoCollection.getPhoto( n );
      photo.addChangeListener( this );
      photos.add( photo );
  }
    } 
View Full Code Here

Examples of org.photovault.imginfo.PhotoInfo

        Rectangle thumbRect = new Rectangle();
       
        for ( int i = 0; i < photoCount; i++ ) {
            thumbRect.setBounds(col*columnWidth, row*rowHeight, columnWidth, rowHeight );
            if ( thumbRect.intersects( clipRect ) ) {
                PhotoInfo photo = photoCollection.getPhoto( i );
                if ( photo != null ) {
                    paintThumbnail( g2, photo, col*columnWidth, row*rowHeight, selection.contains( photo ) );
                }
            }
            col++;
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.