Package javax.media.jai.util

Examples of javax.media.jai.util.CaselessStringKey


      v.add(factoryInstance.getClass().getName());
      v.add(productName);
      v.add(descriptorName);

      CaselessStringKey fileName =
        new CaselessStringKey(modeName + count);

      instancesByName.put(factoryInstance, fileName);
      instances.put(fileName, v);
      count++;

  } else
      instances.put(
    new CaselessStringKey(descriptorName), factoryInstance);
    }
View Full Code Here


  if (arePreferencesSupported) {

      // Update structures to reflect the removal of
      // this factoryInstance.
      CaselessStringKey fileName =
    (CaselessStringKey)instancesByName.get(factoryInstance);

      instancesByName.remove(factoryInstance);
      instances.remove(fileName);
      count--;
  } else {
      instances.remove(new CaselessStringKey(descriptorName));
  }
    }
View Full Code Here

      return;

  checkInstance(preferredOp);
  checkInstance(otherOp);

  CaselessStringKey dn = new CaselessStringKey(descriptorName);
  CaselessStringKey pn = new CaselessStringKey(productName);

  Hashtable dht = (Hashtable)prefs.get(dn);

  if (dht == null) {
      prefs.put(dn, dht = new Hashtable());
View Full Code Here

  checkInstance(preferredOp);
  checkInstance(otherOp);

  // Update structures to reflect removal of this pref.
  Hashtable dht = (Hashtable)prefs.get(
      new CaselessStringKey(descriptorName));

  boolean found = false;

  if (dht != null) {

      Vector pv = (Vector)dht.get(
      new CaselessStringKey(productName));

      if (pv != null) {
    Iterator it = pv.iterator();

    while(it.hasNext()) {
View Full Code Here

  if ((descriptorName == null) || (productName == null))
      throw new IllegalArgumentException(JaiI18N.getString("Generic0"));

  // Update structures to reflect removal of this pref.
  Hashtable dht = (Hashtable)prefs.get(
      new CaselessStringKey(descriptorName));

  if (dht != null) {

      Vector pv = (Vector)dht.get(
      new CaselessStringKey(productName));

      if (pv != null) {
    return (Object[][])pv.toArray(new Object[0][]);
      }
  }
View Full Code Here

        new Object[] {modeName}));
  }

  // Update structures to reflect removal of this pref.
  Hashtable dht = (Hashtable)prefs.get(
      new CaselessStringKey(descriptorName));

  if (dht != null)
      dht.remove(new CaselessStringKey(productName));
    }
View Full Code Here

      Enumeration keys = instancesByName.keys();

      while (keys.hasMoreElements()) {
    Object instance = keys.nextElement();
    CaselessStringKey fileName =
        (CaselessStringKey)instancesByName.get(instance);

    Vector v = (Vector)instances.get(fileName);

    String dn = (String)v.get(2);
    String pn = (String)v.get(1);

    if (descriptorName.equalsIgnoreCase(dn) &&
           productName.equalsIgnoreCase(pn))
        list.add(instance);
      }

      return list;

  } else {
      Object obj =
    instances.get(new CaselessStringKey(descriptorName));
     
      ArrayList list = new ArrayList(1);

      list.add(obj);
      return list;
View Full Code Here

    /**
     * Get the local name of a factoryInstance
     */
    String getLocalName(Object factoryInstance) {
  CaselessStringKey fileName =
      (CaselessStringKey)instancesByName.get(factoryInstance);

  if (fileName != null)
      return fileName.getName();

  return null;
    }
View Full Code Here

      if (productName == null)
    throw new IllegalArgumentException(
        "productName : " + JaiI18N.getString("Generic0"));

      CaselessStringKey fileName =
    (CaselessStringKey)instancesByName.get(factoryInstance);

      if (fileName != null) {

    Vector v = (Vector)instances.get(fileName);

    String pn = (String)v.get(1);
    String dn = (String)v.get(2);

    if ((dn != null) && dn.equalsIgnoreCase(descriptorName) &&
        (pn != null) && pn.equalsIgnoreCase(productName)) {
        return;
    }
      }

      throw new IllegalArgumentException(
    JaiI18N.formatMsg("FactoryCache3",
        new Object[] { factoryInstance.getClass().getName(),
           descriptorName, productName}));
  } else {

      CaselessStringKey key = new CaselessStringKey(descriptorName);

      if (factoryInstance != instances.get(key)) {
    throw new IllegalArgumentException(
        JaiI18N.formatMsg("FactoryCache4",
      new Object[] { factoryInstance.getClass().getName(),
View Full Code Here

     * <p> The returned <code>List</code> does not contain any
     * duplicates.
     */
    public List getCategories() {

  CaselessStringKey key;
  Vector v = new Vector();
  for (Enumeration e = categories.keys(); e.hasMoreElements(); ) {
      key = (CaselessStringKey)e.nextElement();
      v.add(key.toString());
  }
 
  return (List)v;
    }
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.