Package javax.media.jai.remote

Examples of javax.media.jai.remote.SerializableState


  // Check to see whether any of the parameters are images
  JAIRMIUtil.checkClientParameters(newPB, serverName);

  try {
      SerializableState rhs = SerializerFactory.getState(hints, null);
      remoteImage.createRenderedOp(id, operationName, newPB, rhs);
  } catch (RemoteException e) {
            String message = JaiI18N.getString("RMIServerProxy5");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, e),
View Full Code Here


      } else {
    oldSrc = new SerializableRenderedImage(oldSrcRendering);
      }

      Object srcInvalidRegion = rce.getInvalidRegion();
      SerializableState shapeState =
    SerializerFactory.getState((Shape)srcInvalidRegion, null);

      Long oldRenderingID = null;
      try {
    oldRenderingID =
View Full Code Here

      layout.setTileWidth(remoteImage.getTileWidth(id));
      layout.setTileHeight(remoteImage.getTileHeight(id));
      layout.setTileGridXOffset(remoteImage.getTileGridXOffset(id));
      layout.setTileGridYOffset(remoteImage.getTileGridYOffset(id));

      SerializableState smState = remoteImage.getSampleModel(id);
      layout.setSampleModel((SampleModel)(smState.getObject()));
      SerializableState cmState = remoteImage.getColorModel(id);
      layout.setColorModel((ColorModel)(cmState.getObject()));
            return layout;
  } catch (RemoteException re) {
            String message = JaiI18N.getString("RMIServerProxy14");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, re),
View Full Code Here

    } catch (java.io.IOException ioe) {
        throw new RemoteImagingException(ImageUtil.getStackTraceString(ioe));
    }
      } else {
    // Ask for uncompressed tiles.
    SerializableState rp = remoteImage.getTile(id, tileX, tileY);
    return (Raster)(rp.getObject());
      }
  } catch (RemoteException e) {
            String message = JaiI18N.getString("RMIServerProxy15");
            listener.errorOccurred(message,
                                   new RemoteImagingException(message, e),
View Full Code Here

        RenderContext renderContext = null;

        // Read serialized form from the stream.
        AffineTransform usr2dev = (AffineTransform)in.readObject();
 
  SerializableState aoi = (SerializableState)in.readObject();
  Shape shape = (Shape)aoi.getObject();

  SerializableState rhs = (SerializableState)in.readObject();
        RenderingHints hints = (RenderingHints)rhs.getObject();

        // Restore the transient RenderContext.
  renderContext = new RenderContext(usr2dev, shape, hints);
        theObject = renderContext;
    }
View Full Code Here

        Enumeration keys = table.keys();

        // Loop over the table keys.
        while (keys.hasMoreElements()) {
            // Get the next key element.
            SerializableState keyElement = (SerializableState)keys.nextElement();

            // Get the key object corresponding to this key element.
            Object key = keyElement.getObject();

            // Get the value element.
            HintElement valueElement = (HintElement)table.get(keyElement);

            // Get the value object corresponding to this value element.
View Full Code Here

        if(isValid(SAMPLE_MODEL_MASK)) {
            Object object = in.readObject();
            if (!(object instanceof SerializableState))
                sampleModel = null;

            SerializableState ss = (SerializableState)object;
            Class c = ss.getObjectClass();
            if (SampleModel.class.isAssignableFrom(c))
                sampleModel = (SampleModel)ss.getObject();
            else
                sampleModel = null;
        }

        // Read the serializable form of the ColorModel.
        if(isValid(COLOR_MODEL_MASK)) {
            Object object = in.readObject();
            if (!(object instanceof SerializableState))
                colorModel = null;

            SerializableState ss = (SerializableState)object;
            Class c = ss.getObjectClass();
            if (ColorModel.class.isAssignableFrom(c))
                colorModel = (ColorModel)ss.getObject();
            else
                colorModel = null;
        }
    }
View Full Code Here

    /** Deserialize a <code>Raster</code> from its serialized version */
    public static Raster deserializeRaster(Object object) {
        if (!(object instanceof SerializableState))
            return null;

  SerializableState ss = (SerializableState)object;
  Class c = ss.getObjectClass();
  if (Raster.class.isAssignableFrom(c)) {
      return (Raster)ss.getObject();
  }
  return null;
    }
View Full Code Here

    /** Deserialize a <code>SampleModel</code> from its serialized version */
    public static SampleModel deserializeSampleModel(Object object) {
  if (!(object instanceof SerializableState))
      return null;

  SerializableState ss = (SerializableState)object;
        Class c = ss.getObjectClass();
        if (SampleModel.class.isAssignableFrom(c)) {
            return (SampleModel)ss.getObject();
        }
        return null;
    }
View Full Code Here

        Object[] source = (Object[])in.readObject();
        numSources = source.length;
        renderedSource = new RenderedImage[numSources];
        for (int i = 0; i < numSources; i++) {
            if (source[i] instanceof SerializableState) {
                SerializableState ss = (SerializableState)source[i];
                renderedSource[i] = (RenderedImage)ss.getObject();
            } else renderedSource[i] = (RenderedImage)source[i];
        }
    }
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.