Package com.lightcrafts.mediax.jai.util

Examples of com.lightcrafts.mediax.jai.util.CaselessStringKey


      if (h != null) h.remove(name);
  }
    }

    private void hashNames(String descriptorName) {
  CaselessStringKey key = new CaselessStringKey(descriptorName);

  Vector c = (Vector)properties.get(key);
  Vector s = (Vector)suppressed.get(key)

  Hashtable h = new Hashtable();
  propNames.put(key, h);
   
  if (c != null) {
      PropertyGenerator pg;
      String names[];

      for (Iterator it = c.iterator(); it.hasNext(); ) {
    pg = (PropertyGenerator)it.next();
    names = pg.getPropertyNames();

    for (int i=0; i<names.length; i++) {
        CaselessStringKey name =
          new CaselessStringKey(names[i]);

        // Don't add a property that was suppressed
        if ((s == null) || !s.contains(name)) {
      h.put(name, pg);
        }
    }
      }
  }

  Hashtable htable = (Hashtable)sourceForProp.get(key);

  if (htable != null) {
      for (Enumeration e = htable.keys(); e.hasMoreElements(); ) {
    CaselessStringKey name = (CaselessStringKey)e.nextElement();

    int i = ((Integer)htable.get(name)).intValue();

    PropertyGenerator generator = new
        PropertyGeneratorFromSource(i, name.getName());

    h.put(name, generator);
      }
  }
    }
View Full Code Here


      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache7",
            new Object[] {modeName}));
  }

  CaselessStringKey key = new CaselessStringKey(descriptorName);
 
  Vector v = (Vector)properties.get(key);

  if (v != null) {
      v.removeElement(generator);
View Full Code Here

      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache7",
            new Object[] {modeName}));
  }

  CaselessStringKey key = new CaselessStringKey(descriptorName);
  CaselessStringKey propertyKey = new CaselessStringKey(propertyName);

  // Mark the property name as suppressed. 
  Vector v = (Vector)suppressed.get(key);

  if (v == null) {
View Full Code Here

  // In this method synchronized takes care of the fact that all the
  // operations take place in a sequential fashion, while
  // suppressProperty's writeLock insures that all changes are
  // made by only one thread.
  CaselessStringKey key = new CaselessStringKey(descriptorName);
 
  // Get names of all properties that this descriptorName
  // is associated with
  Vector v = (Vector)properties.get(key);
View Full Code Here

      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache7",
            new Object[] {modeName}));
  }

  CaselessStringKey key = new CaselessStringKey(descriptorName);
  CaselessStringKey propertyKey = new CaselessStringKey(propertyName);

  Hashtable h = (Hashtable)sourceForProp.get(key);

  if (h == null) {
      h = new Hashtable();
View Full Code Here

      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache7",
            new Object[] {modeName}));
  }

  CaselessStringKey key = new CaselessStringKey(descriptorName);

  hashNames(descriptorName);
   
  Hashtable h = (Hashtable)propNames.get(key);

  if(h != null && h.size() > 0) {
      String names[] = new String[h.size()];
      int count = 0;
      for (Enumeration e = h.keys(); e.hasMoreElements(); ) {
    CaselessStringKey str = (CaselessStringKey)e.nextElement();
    names[count++] = str.getName();
      }       
     
      return count > 0 ? names : null;
  }
   
View Full Code Here

      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache7",
            new Object[] {modeName}));
  }

  CaselessStringKey key = new CaselessStringKey(descriptorName);

  Vector pg = (Vector)properties.get(key);
  Vector sp = (Vector)suppressed.get(key);

  Hashtable sfp = (Hashtable)sourceForProp.get(key);
View Full Code Here

      return null;

  CaselessStringKey[] keys = new CaselessStringKey[strings.length];

  for (int i = 0; i < strings.length; i++)
      keys[i] = new CaselessStringKey(strings[i]);
       
  return keys;
    }
View Full Code Here

     *
     * @throws IllegalArgumentException if the key is <code>null or
     *  if the key is not found.
     */
    public int indexOf(String key) {
  return indexOf(new CaselessStringKey(key));
    }
View Full Code Here

     * Tests if this table contains the specified key.
     *
     * @return true if the key is present. false otherwise.
     */
    public boolean contains(String key) {
  return contains(new CaselessStringKey(key));
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.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.