Package javax.media.jai.util

Examples of javax.media.jai.util.CaselessStringKey


     * mode. If it does not exist but the mode is a valid registry mode
     * then silently create one.
     */
    private FactoryCache getFactoryCache(String modeName) {

  CaselessStringKey key = new CaselessStringKey(modeName);

  FactoryCache fc = (FactoryCache)factories.get(key);

  if (fc == null) {

View Full Code Here


     * mode. If it does not exist but the mode is a valid registry mode
     * then silently create one.
     */
    private DescriptorCache getDescriptorCache(String modeName) {

  CaselessStringKey key = new CaselessStringKey(modeName);

  DescriptorCache dc = (DescriptorCache)descriptors.get(key);

  if (dc == null) {

View Full Code Here

     * @since JAI 1.1
     */
    public void removeRegistryMode(String modeName) {

  if (getDescriptorCache(modeName) != null)
      descriptors.remove(new CaselessStringKey(modeName));

  if (getFactoryCache(modeName) != null)
      factories.remove(new CaselessStringKey(modeName));
    }
View Full Code Here

  Enumeration e = descriptors.keys();
  int size = descriptors.size();
  String names[] = new String[size];

  for (int i = 0; i < size; i++) {
      CaselessStringKey key = (CaselessStringKey)e.nextElement();
      names[i] = key.getName();
  }

  return names;
    }
View Full Code Here

        String[] propertyNames = source.getPropertyNames();
  String propertyName;
        if (propertyNames != null) {
            for (int i = 0; i < propertyNames.length; i++) {
    propertyName = propertyNames[i];
                properties.put(new CaselessStringKey(propertyName),
                               source.getProperty(propertyName));
            }
        }

        // Initialize the host field.
View Full Code Here

    }

    // XXX Should getProperty() request property values over a socket
    // connection also?
    public Object getProperty(String name) {
        Object property = properties.get(new CaselessStringKey(name));
  return property == null ? Image.UndefinedProperty : property;
    }
View Full Code Here

  String[] names = null;
        if (!properties.isEmpty()) {
            names = new String[properties.size()];
            Enumeration keys = properties.keys();
            int index = 0;
      CaselessStringKey key;
            while (keys.hasMoreElements()) {
    key = (CaselessStringKey)keys.nextElement();
                names[index++] = key.getName();
            }
        }
        return names;
    }
View Full Code Here

  // Initialize names to synthetic property names.
  Vector names = new Vector(synthProps);

        // Create a dummy key for later use.
        CaselessStringKey key = new CaselessStringKey("");

        // Get property names managed by WritablePropertySourceImpl.
        // This includes those of thePropertySource.
        String[] localNames = properties.getPropertyNames();
        if(localNames != null) {
            int length = localNames.length;
            for(int i = 0; i < length; i++) {
                key.setName(localNames[i]);

                // Check for duplicates being inserted
                if (!names.contains(key)) {
                    names.add(key.clone());
                }
            }
        }

        // Return an array.
View Full Code Here

    /** Initialize the synthProperties Hashtable if needed. */
    private synchronized void createSynthProperties() {
        if (synthProperties == null) {
            synthProperties = new Hashtable();
            synthProperties.put(new CaselessStringKey("image_width"),
                                new Integer(theImage.getWidth()));
            synthProperties.put(new CaselessStringKey("image_height"),
                                new Integer(theImage.getHeight()));
            synthProperties.put(new CaselessStringKey("image_min_x_coord"),
                                new Integer(theImage.getMinX()));
            synthProperties.put(new CaselessStringKey("image_min_y_coord"),
                                new Integer(theImage.getMinY()));

            if(theImage instanceof OpImage) {
                synthProperties.put(new CaselessStringKey("tile_cache_key"),
                                    theImage);
                Object tileCache = ((OpImage)theImage).getTileCache();
                synthProperties.put(new CaselessStringKey("tile_cache"),
                                    tileCache == null ?
                                    java.awt.Image.UndefinedProperty :
                                    tileCache);
            } else if(theImage instanceof PlanarImageServerProxy) {
                synthProperties.put(new CaselessStringKey("tile_cache_key"),
                                    theImage);
                Object tileCache =
                    ((PlanarImageServerProxy)theImage).getTileCache();
                synthProperties.put(new CaselessStringKey("tile_cache"),
                                    tileCache == null ?
                                    java.awt.Image.UndefinedProperty :
                                    tileCache);
            } else {
                Object tileCacheKey = theImage.getProperty("tile_cache_key");
                synthProperties.put(new CaselessStringKey("tile_cache_key"),
                                    tileCacheKey == null ?
                                    java.awt.Image.UndefinedProperty :
                                    tileCacheKey);
                Object tileCache = theImage.getProperty("tile_cache");
                synthProperties.put(new CaselessStringKey("tile_cache"),
                                    tileCache == null ?
                                    java.awt.Image.UndefinedProperty :
                                    tileCache);
            }
        }
View Full Code Here

        if (name == null)
            throw new IllegalArgumentException(JaiI18N.getString("Generic0"));

        createPropertySource();
        CaselessStringKey key = new CaselessStringKey(name);

        // Attempt to retrieve from synthetic properties.
        // If present, return the value directly.
  if (synthProps.contains(key)) {
            createRendering();
View Full Code Here

TOP

Related Classes of javax.media.jai.util.CaselessStringKey

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.