Package javax.media.jai.remote

Examples of javax.media.jai.remote.SerializableRenderedImage


    }
    else if (source instanceof RenderedImage) {
        try {
      remoteImage.setRenderableSource(
        id,
        new SerializableRenderedImage((RenderedImage)source),
        i);

        } catch(RemoteException e) {
                        String message = JaiI18N.getString("RMIServerProxy6");
                        listener.errorOccurred(message,
View Full Code Here


            RenderedImage img = (RenderedImage)sourceVector.get(i);
            if(!(img instanceof Serializable)) {
                if(!isCloned) {
                    sourceVector = (Vector)sourceVector.clone();
                }
                sourceVector.set(i, new SerializableRenderedImage(img, false));
            }
        }
        return sourceVector;
    }
View Full Code Here

            try {
                if(source instanceof Serializable) {
                    remoteImage.setSource(id, source);
                } else {
                    remoteImage.setSource(id,
                                          new
                                          SerializableRenderedImage(source));
                }
            } catch(RemoteException e) {
                throw new RuntimeException(e.getMessage());
            }
View Full Code Here

/*     */
/*     */   private void writeObject(ObjectOutputStream out)
/*     */     throws IOException
/*     */   {
/*  93 */     out.defaultWriteObject();
/*     */     SerializableRenderedImage sri;
/*     */     SerializableRenderedImage sri;
/*  97 */     if ((this.formatName == null) || (this.encodingParam == null) || (this.decodingParam == null))
/*     */     {
/* 100 */       sri = new SerializableRenderedImage((RenderedImage)this.theObject, this.useDeepCopy);
/*     */     }
/*     */     else {
/* 103 */       sri = new SerializableRenderedImage((RenderedImage)this.theObject, this.useDeepCopy, this.registry, this.formatName, this.encodingParam, this.decodingParam);
/*     */     }
/*     */
/* 112 */     out.writeObject(sri);
/*     */   }
View Full Code Here

/*     */
/* 112 */             replacedSrcs.add(str);
/*     */           }
/*     */         } else {
/* 115 */           RenderedImage ri = (RenderedImage)ai;
/* 116 */           replacedSrcs.add(new SerializableRenderedImage(ri));
/*     */         }
/* 118 */       } else if ((obj instanceof RenderedOp)) {
/* 119 */         RenderedOp rop = (RenderedOp)obj;
/* 120 */         replacedSrcs.add(new SerializableRenderedImage(rop.getRendering()));
/*     */       }
/* 122 */       else if ((obj instanceof Serializable)) {
/* 123 */         replacedSrcs.add(obj);
/* 124 */       } else if ((obj instanceof RenderedImage)) {
/* 125 */         RenderedImage ri = (RenderedImage)obj;
/* 126 */         replacedSrcs.add(new SerializableRenderedImage(ri));
/*     */       }
/*     */     }
/*     */
/* 130 */     return replacedSrcs;
/*     */   }
View Full Code Here

/*  264 */       else if ((source instanceof RenderedOp))
/*      */       {
/*  269 */         RenderedOp rop = (RenderedOp)source;
/*  270 */         RenderedImage rendering = rop.getRendering();
/*  271 */         if (!(rendering instanceof Serializable))
/*  272 */           rendering = new SerializableRenderedImage(rendering);
/*      */         try
/*      */         {
/*  275 */           this.remoteImage.setRenderedSource(this.id, rendering, i);
/*      */         } catch (RemoteException e) {
/*  277 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  278 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */         }
/*      */
/*      */       }
/*  287 */       else if ((source instanceof RenderedImage)) {
/*      */         try {
/*  289 */           if ((source instanceof Serializable))
/*  290 */             this.remoteImage.setRenderedSource(this.id, source, i);
/*      */           else {
/*  292 */             this.remoteImage.setRenderedSource(this.id, new SerializableRenderedImage(source), i);
/*      */           }
/*      */
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
View Full Code Here

/*      */         }
/*  387 */         oldSrc = serverNodeDesc;
/*  388 */       } else if ((oldSrcRendering instanceof Serializable)) {
/*  389 */         oldSrc = oldSrcRendering;
/*      */       } else {
/*  391 */         oldSrc = new SerializableRenderedImage(oldSrcRendering);
/*      */       }
/*      */
/*  394 */       Object srcInvalidRegion = rce.getInvalidRegion();
/*  395 */       SerializableState shapeState = SerializerFactory.getState((Shape)srcInvalidRegion, null);
/*      */
View Full Code Here

/*      */         }
/*      */
/*      */       }
/*  628 */       else if ((source instanceof RenderedImage)) {
/*      */         try {
/*  630 */           this.remoteImage.setRenderableSource(this.id, new SerializableRenderedImage((RenderedImage)source), i);
/*      */         }
/*      */         catch (RemoteException e)
/*      */         {
/*  636 */           String message = JaiI18N.getString("RMIServerProxy6");
/*  637 */           this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
View Full Code Here

/*     */         }
/* 573 */         else if ((source instanceof RenderedOp))
/*     */         {
/* 579 */           RenderedImage ri = ((RenderedOp)source).getRendering();
/*     */           try {
/* 581 */             SerializableRenderedImage sri = new SerializableRenderedImage(ri);
/*     */
/* 583 */             remoteImage.setRenderedSource(opID, sri, i);
/* 584 */             newPB.setSource(sri, i);
/*     */           } catch (RemoteException e) {
/* 586 */             String message = JaiI18N.getString("RMIServerProxy6");
/* 587 */             listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*     */           }
/*     */
/*     */         }
/* 593 */         else if ((source instanceof RenderedImage))
/*     */         {
/* 599 */           RenderedImage ri = (RenderedImage)source;
/*     */           try {
/* 601 */             SerializableRenderedImage sri = new SerializableRenderedImage(ri);
/*     */
/* 603 */             remoteImage.setRenderedSource(opID, sri, i);
/* 604 */             newPB.setSource(sri, i);
/*     */           } catch (RemoteException e) {
/* 606 */             String message = JaiI18N.getString("RMIServerProxy6");
View Full Code Here

/*  498 */               SerializableState ss = (SerializableState)obj;
/*  499 */               RenderingHints rh = (RenderingHints)ss.getObject();
/*      */
/*  501 */               ri = SerializableRenderableImage.this.source.createScaledRendering(w, h, rh);
/*      */             }
/*      */             SerializableRenderedImage sri;
/*  504 */             if (SerializableRenderableImage.this.useTileCodec)
/*      */               try {
/*  506 */                 sri = new SerializableRenderedImage(ri, true, SerializableRenderableImage.this.registry, SerializableRenderableImage.this.formatName, SerializableRenderableImage.this.encodingParam, SerializableRenderableImage.this.decodingParam);
/*      */               }
/*      */               catch (NotSerializableException nse)
/*      */               {
/*  513 */                 throw new RuntimeException(nse.getMessage());
/*      */               }
/*      */             else {
/*  516 */               sri = new SerializableRenderedImage(ri, true);
/*      */             }
/*      */             try
/*      */             {
/*  520 */               objectOut.writeObject(sri);
/*      */             } catch (Exception e) {
View Full Code Here

TOP

Related Classes of javax.media.jai.remote.SerializableRenderedImage

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.