Package java.awt

Examples of java.awt.RenderingHints$KeyImpl


  Shape shape = null;
  Object aoi = in.readBoolean() ?
            (Object)in.readObject() : null;
  RenderingHintsProxy rhp = (RenderingHintsProxy)in.readObject();
 
  RenderingHints hints = rhp.getRenderingHints();
 
  // Restore the transient RenderContext.
  if (aoi != null){
      if (aoi instanceof ROIShape){
    shape = ((ROIShape)aoi).getAsShape();
      }else {
    shape = (Shape)aoi;
      }
  }
 
  if(aoi == null && hints.isEmpty()) {
      renderContext = new RenderContext(usr2dev);
  } else if(aoi == null) {
      renderContext = new RenderContext(usr2dev, hints);
  } else if(hints.isEmpty()) {
      renderContext = new RenderContext(usr2dev, shape);
  } else {
      renderContext = new RenderContext(usr2dev, shape, hints);
  }
    }
View Full Code Here


    private static Map configHelper(Map configuration) {

  Map config;

  if (configuration == null) {
      config = new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,
          Boolean.FALSE);
  } else {
     
      config = configuration;

      if (!(config.containsKey(JAI.KEY_REPLACE_INDEX_COLOR_MODEL))) {
    RenderingHints hints = (RenderingHints)configuration;
    config = (RenderingHints)hints.clone();
    config.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE);
      }
  }

  return config;
View Full Code Here

            if(layout.getColorModel(src) == src.getColorModel()) {
                // Nothing changed: return the source directly.
                return src;
            } else {
                // Remove TileCache hint from RenderingHints if present.
                RenderingHints hints = renderHints;
                if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {
                    hints = new RenderingHints((Map)renderHints);
                    hints.remove(JAI.KEY_TILE_CACHE);
                }

                // Only the ColorModel is changing.
                return new NullOpImage(src, layout, hints,
                                       OpImage.OP_IO_BOUND);
            }
        }

  if (isDataTypeChange == true) {

      // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints
      if (renderHints == null) {
    renderHints =
        new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,
               Boolean.TRUE);
   
      } else if (!renderHints.containsKey(
          JAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {
    // If the user specified a value for this hint, we don't
View Full Code Here

     */
    public void setRenderingHints(RenderingHints hints) {
        if(equals(this.hints, hints)) {
            return;
        }
        RenderingHints oldHints = this.hints;
        this.hints = hints;
        fireEvent("RenderingHints", oldHints, hints);
        resetPropertyEnvironment(false);
    }
View Full Code Here

                }
                if (parameter instanceof Raster) {
                    pbClone.set(SerializerFactory.getState(parameter, null), index);
                } else if (parameter instanceof RenderedImage) {
                    RenderedImage ri = (RenderedImage)parameter;
                    RenderingHints hints = new RenderingHints(null);
                    hints.put(JAI.KEY_SERIALIZE_DEEP_COPY, new Boolean(true));
                    pbClone.set(SerializerFactory.getState(ri, hints),
                                index);
                } else {
                    throw new RuntimeException(parameter.getClass().getName() +
                        JaiI18N.getString("OperationNodeSupport1"));
View Full Code Here

 
  Map config;

  if (configuration == null) {

      config = new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,
          Boolean.FALSE);

  } else {
     
      config = configuration;

      if (!(config.containsKey(JAI.KEY_REPLACE_INDEX_COLOR_MODEL))) {
    RenderingHints hints = (RenderingHints)configuration;
    config = (RenderingHints)hints.clone();
    config.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE);
      }
  }

  return config;
View Full Code Here

  if (tileCache != null) {
      this.cache = tileCache;
  }

  this.renderingHints = new RenderingHints(null);
        this.renderingHints.put(JAI.KEY_OPERATION_REGISTRY, operationRegistry);
  this.renderingHints.put(JAI.KEY_TILE_CACHE, cache);
  this.renderingHints.put(JAI.KEY_RETRY_INTERVAL,
        new Integer(retryInterval));
        this.renderingHints.put(JAI.KEY_NUM_RETRIES, new Integer(numRetries));
View Full Code Here

    /**
     * Clears the <code>RenderingHints</code> associated with this
     * <code>RemoteJAI</code> instance.
     */
    public void clearRenderingHints() {
        this.renderingHints = new RenderingHints(null);
    }
View Full Code Here

        if (!odesc.validateArguments("rendered", args, msg)) {
            throw new IllegalArgumentException(msg.toString());
        }

  // Merge rendering hints.  Hints passed in take precedence.
        RenderingHints mergedHints;
        if (hints == null) {
            mergedHints = renderingHints;
        } else if (renderingHints.isEmpty()) {
            mergedHints = hints;
        } else {
            mergedHints = new RenderingHints((Map)renderingHints);
            mergedHints.add(hints);
        }

  RemoteRenderedOp op = new RemoteRenderedOp(operationRegistry,
               protocolName,
               serverName,
View Full Code Here

        if (instance == null) {
            throw new ImagingException(JaiI18N.getString("RemoteRenderedOp2"));
        }

  // Save the state of the node.
  RenderingHints rh = nodeSupport.getRenderingHints();
        oldHints = rh == null ? null : (RenderingHints)rh.clone();

  // Ensure that the rendering is a PlanarImage.
        return PlanarImage.wrapRenderedImage(instance);
    }
View Full Code Here

TOP

Related Classes of java.awt.RenderingHints$KeyImpl

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.