Package javax.media.jai.remote

Examples of javax.media.jai.remote.SerializableState


/*  219 */     newPB.removeSources();
/*      */
/*  222 */     JAIRMIUtil.checkClientParameters(newPB, serverName);
/*      */     try
/*      */     {
/*  225 */       SerializableState rhs = SerializerFactory.getState(hints, null);
/*  226 */       this.remoteImage.createRenderedOp(this.id, operationName, newPB, rhs);
/*      */     } catch (RemoteException e) {
/*  228 */       String message = JaiI18N.getString("RMIServerProxy5");
/*  229 */       this.listener.errorOccurred(message, new RemoteImagingException(message, e), this, false);
/*      */     }
View Full Code Here


/*      */       } else {
/*  391 */         oldSrc = new SerializableRenderedImage(oldSrcRendering);
/*      */       }
/*      */
/*  394 */       Object srcInvalidRegion = rce.getInvalidRegion();
/*  395 */       SerializableState shapeState = SerializerFactory.getState((Shape)srcInvalidRegion, null);
/*      */
/*  398 */       Long oldRenderingID = null;
/*      */       try {
/*  400 */         oldRenderingID = this.remoteImage.handleEvent(opID, idx, shapeState, oldSrc);
/*      */       }
View Full Code Here

/*  811 */       layout.setTileWidth(this.remoteImage.getTileWidth(this.id));
/*  812 */       layout.setTileHeight(this.remoteImage.getTileHeight(this.id));
/*  813 */       layout.setTileGridXOffset(this.remoteImage.getTileGridXOffset(this.id));
/*  814 */       layout.setTileGridYOffset(this.remoteImage.getTileGridYOffset(this.id));
/*      */
/*  816 */       SerializableState smState = this.remoteImage.getSampleModel(this.id);
/*  817 */       layout.setSampleModel((SampleModel)smState.getObject());
/*  818 */       SerializableState cmState = this.remoteImage.getColorModel(this.id);
/*  819 */       layout.setColorModel((ColorModel)cmState.getObject());
/*  820 */       return layout;
/*      */     } catch (RemoteException re) {
/*  822 */       String message = JaiI18N.getString("RMIServerProxy14");
/*  823 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
/*      */     }
View Full Code Here

/*     */   {
/*  93 */     RenderContext renderContext = null;
/*     */
/*  96 */     AffineTransform usr2dev = (AffineTransform)in.readObject();
/*     */
/*  98 */     SerializableState aoi = (SerializableState)in.readObject();
/*  99 */     Shape shape = (Shape)aoi.getObject();
/*     */
/* 101 */     SerializableState rhs = (SerializableState)in.readObject();
/* 102 */     RenderingHints hints = (RenderingHints)rhs.getObject();
/*     */
/* 105 */     renderContext = new RenderContext(usr2dev, shape, hints);
/* 106 */     this.theObject = renderContext;
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   public RenderedImage createScaledRendering(int w, int h, RenderingHints hints)
/*     */     throws RemoteImagingException
/*     */   {
/* 291 */     SerializableState ss = SerializerFactory.getState(hints, null);
/*     */     try
/*     */     {
/* 294 */       return this.imageServer.createScaledRendering(this.id, w, h, ss);
/*     */     } catch (RemoteException re) {
/* 296 */       String message = JaiI18N.getString("RMIServerProxy10");
View Full Code Here

/*     */   }
/*     */
/*     */   public RenderedImage createRendering(RenderContext renderContext)
/*     */     throws RemoteImagingException
/*     */   {
/* 347 */     SerializableState ss = SerializerFactory.getState(renderContext, null);
/*     */     try {
/* 349 */       return this.imageServer.createRendering(this.id, ss);
/*     */     } catch (RemoteException re) {
/* 351 */       String message = JaiI18N.getString("RMIServerProxy10");
/* 352 */       this.listener.errorOccurred(message, new RemoteImagingException(message, re), this, false);
View Full Code Here

/*     */     throws RemoteImagingException
/*     */   {
/*  98 */     RemoteRenderableOp rrop = (RemoteRenderableOp)image;
/*  99 */     RenderableRMIServerProxy rmisp = createProxy(rrop);
/*     */
/* 101 */     SerializableState rcs = SerializerFactory.getState(renderContext, null);
/*     */     try
/*     */     {
/* 106 */       rcpOut = rmisp.getImageServer(serverName).mapRenderContext(i, rmisp.getRMIID(), operationName, rcs);
/*     */     }
/*     */     catch (RemoteException re)
/*     */     {
/*     */       SerializableState rcpOut;
/* 113 */       String message = JaiI18N.getString("JAIRMICRIF5");
/* 114 */       sendExceptionToListener(renderContext, message, re);
/*     */     }
/*     */
/* 118 */     return (RenderContext)rcs.getObject();
View Full Code Here

/*     */   }
/*     */
/*     */   public Rectangle2D getBounds2D(String serverName, String operationName, ParameterBlock paramBlock)
/*     */     throws RemoteImagingException
/*     */   {
/* 142 */     SerializableState bounds = null;
/*     */
/* 145 */     RemoteRenderableOp original = new RemoteRenderableOp("jairmi", serverName, operationName, paramBlock);
/*     */
/* 152 */     RenderableRMIServerProxy rmisp = createProxy(original);
/*     */     try
/*     */     {
/* 155 */       bounds = rmisp.getImageServer(serverName).getBounds2D(rmisp.getRMIID(), operationName);
/*     */     }
/*     */     catch (RemoteException e)
/*     */     {
/* 159 */       String message = JaiI18N.getString("JAIRMICRIF6");
/* 160 */       sendExceptionToListener(null, message, e);
/*     */     }
/*     */
/* 164 */     return (Rectangle2D.Float)bounds.getObject();
/*     */   }
View Full Code Here

/*  462 */                 obj = objectIn.readObject();
/*      */               } catch (Exception e) {
/*  464 */                 throw new RuntimeException(e.getMessage());
/*      */               }
/*      */
/*  467 */               SerializableState ss = (SerializableState)obj;
/*  468 */               RenderContext rc = (RenderContext)ss.getObject();
/*      */
/*  470 */               ri = SerializableRenderableImage.this.source.createRendering(rc);
/*      */             }
/*  472 */             else if (str.equals("createScaledRendering"))
/*      */             {
/*  475 */               obj = null;
/*      */               try {
/*  477 */                 obj = objectIn.readObject();
/*      */               } catch (Exception e) {
/*  479 */                 throw new RuntimeException(e.getMessage());
/*      */               }
/*      */
/*  482 */               int w = ((Integer)obj).intValue();
/*      */               try
/*      */               {
/*  485 */                 obj = objectIn.readObject();
/*      */               } catch (Exception e) {
/*  487 */                 throw new RuntimeException(e.getMessage());
/*      */               }
/*      */
/*  490 */               int h = ((Integer)obj).intValue();
/*      */               try
/*      */               {
/*  493 */                 obj = objectIn.readObject();
/*      */               } catch (Exception e) {
/*  495 */                 throw new RuntimeException(e.getMessage());
/*      */               }
/*      */
/*  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)
View Full Code Here

/*     */
/* 121 */     int numInterfaces = interfaces.length;
/* 122 */     this.interfaceMap = new Hashtable(numInterfaces);
/* 123 */     for (int i = 0; i < numInterfaces; i++) {
/* 124 */       Class iface = interfaces[i];
/* 125 */       SerializableState state = implementations[i];
/*     */
/* 127 */       if (!iface.isAssignableFrom(state.getObjectClass())) {
/* 128 */         throw new RuntimeException(JaiI18N.getString("InterfaceHandler1"));
/*     */       }
/*     */
/* 131 */       Object impl = state.getObject();
/* 132 */       this.interfaceMap.put(iface, impl);
/*     */     }
/*     */   }
View Full Code Here

TOP

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

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.