Package javax.media.jai.util

Examples of javax.media.jai.util.CaselessStringKey


    // Return only those names which exist in thisNames but not in otherNames
    private Vector removeAll(Hashtable thisHash, Hashtable otherHash) {

  Vector v = new Vector();
  CaselessStringKey thisNameKey;
  for (Enumeration i=thisHash.keys(); i.hasMoreElements(); ) {
      thisNameKey = (CaselessStringKey)i.nextElement();
      if (otherHash.containsKey(thisNameKey))
    continue;
      else
    v.add(thisNameKey.toString());
  }

  return v;
    }
View Full Code Here


  return v;
    }

    private int getIndex(Hashtable h, String s) {
  return ((Integer)h.get(new CaselessStringKey(s))).intValue();
    }
View Full Code Here

    private Vector commonElements(Hashtable thisHash,
          Hashtable otherHash) {

  Vector v = new Vector();
  CaselessStringKey thisNameKey;
  for (Enumeration i=thisHash.keys(); i.hasMoreElements(); ) {
      thisNameKey = (CaselessStringKey)i.nextElement();
      if (otherHash.containsKey(thisNameKey))
    v.add(thisNameKey.toString());
  }

  return v;
    }
View Full Code Here

    private Hashtable hashNames(String paramNames[]) {

  Hashtable h = new Hashtable();
        if (paramNames != null) {
      for (int i=0; i<paramNames.length; i++) {
          h.put(new CaselessStringKey(paramNames[i]), new Integer(i));
      }
        }

        return h;
    }
View Full Code Here

    private Hashtable hashNames(Vector paramNames) {

  Hashtable h = new Hashtable();
        if (paramNames != null) {
      for (int i=0; i<paramNames.size(); i++) {
          h.put(new CaselessStringKey((String)(paramNames.elementAt(i))),
          new Integer(i));
      }
        }

        return h;
View Full Code Here

                    HashSet wpsNameSet = null;
                    String[] wpsNames = wps.getPropertyNames();
                    if(wpsNames != null) {
                        wpsNameSet = new HashSet();
                        for(int j = 0; j < wpsNames.length; j++) {
                            wpsNameSet.add(new CaselessStringKey(wpsNames[j]));
                        }
                    }

                    // Copy any properties not already defined by the rendering.
                    for(int j = 0; j < propertyNames.length; j++) {
                        String name = propertyNames[j];
                        if(wpsNameSet == null ||
                           !wpsNameSet.contains(new CaselessStringKey(name))) {
                            Object value = getProperty(name);
                            if(value != null &&
                               value != java.awt.Image.UndefinedProperty) {
                                wps.setProperty(name, value);
                            }
View Full Code Here

        }

        synchronized(properties) {
            // Check whether a value mapping exists.
            boolean isMapped =
                properties.containsKey(new CaselessStringKey(propertyName));

            // Retrieve the value.
            Object value = super.getProperty(propertyName);

            // Fire an event if necessary, i.e., if there is an event manager
View Full Code Here

        if(propertyName == null || propertyValue == null) {
            throw new IllegalArgumentException(JaiI18N.getString("Generic0"));
        }

        synchronized(properties) {
            CaselessStringKey key = new CaselessStringKey(propertyName);

            // Set the entry in the name-value mapping.
            Object oldValue = properties.put(key, propertyValue);
            if(oldValue == null) {
                oldValue = java.awt.Image.UndefinedProperty;
View Full Code Here

        if(propertyName == null) {
            throw new IllegalArgumentException(JaiI18N.getString("Generic0"));
        }

        synchronized(properties) {
            CaselessStringKey key = new CaselessStringKey(propertyName);

            // Remove the entry from the name-value mapping and save its value.
            Object oldValue = properties.remove(key);

            // Remove the entry from the name-PropertySource mapping and from
View Full Code Here

            synchronized(properties) {
                String[] names = propertySource.getPropertyNames();
                if(names != null) {
                    int length = names.length;
                    for(int i = 0; i < length; i++) {
                        propertySources.put(new CaselessStringKey(names[i]),
                                            propertySource);
                    }
                }
            }
        }
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.