Package com.lightcrafts.mediax.jai.util

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


        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

     */
    public void clearPropertyMap() {
        synchronized(properties) {
            Iterator keys = properties.keySet().iterator();
            while(keys.hasNext()) {
                CaselessStringKey key = (CaselessStringKey)keys.next();
                Object oldValue = properties.get(key);
                keys.remove();

                if(manager != null) {
                    Object eventSource =
                        manager.getPropertyChangeEventSource();
                    PropertySourceChangeEvent evt =
                        new PropertySourceChangeEvent(eventSource,
                                                      key.getName(),
                                                      oldValue,
                                                      java.awt.Image.UndefinedProperty);
                    manager.firePropertyChange(evt);
                }
            }
View Full Code Here

     */
    public void clearCachedProperties() {
        synchronized(properties) {
            Iterator names = cachedPropertyNames.iterator();
            while(names.hasNext()) {
                CaselessStringKey name = (CaselessStringKey)names.next();
                Object oldValue = properties.remove(name);
                names.remove(); // remove name from cachedPropertyNames.
                if(manager != null) {
                    Object eventSource =
                        manager.getPropertyChangeEventSource();
                    PropertySourceChangeEvent evt =
                        new PropertySourceChangeEvent(eventSource,
                                                      name.getName(),
                                                      oldValue,
                                                      java.awt.Image.UndefinedProperty);
                    manager.firePropertyChange(evt);
                }
            }
View Full Code Here

      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

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.