Package javax.media.jai.util

Examples of javax.media.jai.util.CaselessStringKey


     */
    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

        }

  String descriptorName = rdesc.getName();

  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);

  // If the key has already been added bail out ...
  if (descriptorNames.containsKey(key) == true) {
      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache0",
        new Object[] {descriptorName, modeName}));
  }

  // Store the RegistryElementDescriptor hashed by its global name
  descriptorNames.put(key, rdesc);

  // Store the ProductOperationGraph hashed by the caseless
  // descriptor name
  if (arePreferencesSupported)
      products.put(key, new ProductOperationGraph());

  // if properties arent supported by this descriptor we are done.
  if (rdesc.arePropertiesSupported() == false)
      return true;

  // Store the Property Generators associated with this descriptor
  // for the specified mode.
  PropertyGenerator props[] = rdesc.getPropertyGenerators(modeName);

  if (props != null) {
      for (int i=0; i<props.length; i++) {

    Vector v = (Vector)properties.get(key);
    if (v == null) {
        v = new Vector();
        v.addElement(props[i]);
        properties.put(key, v);
    } else {
        v.addElement(props[i]);
    }
   
    v = (Vector)suppressed.get(key);
    Hashtable h = (Hashtable)sourceForProp.get(key);
    String names[] = props[i].getPropertyNames();
   
    for (int j=0; j<names.length; j++) {
        CaselessStringKey name = new CaselessStringKey(names[j]);

        if (v != null) v.remove(name);
        if (h != null) h.remove(name);
    }
      }
View Full Code Here

     *         <code>RegistryElementDescriptor</code> to be removed is null.
     */
    boolean removeDescriptor(String descriptorName) {

  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);

  // If it is not present in the cache already, then return false.
  if (descriptorNames.containsKey(key) == false) {
      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache1",
View Full Code Here

     *
     * @throws IllegalArgumentException if descriptorName is null
     */
    RegistryElementDescriptor getDescriptor(String descriptorName) {
  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);

  return (RegistryElementDescriptor)descriptorNames.get(key);
    }
View Full Code Here

  Enumeration e = descriptorNames.keys();
  int size = descriptorNames.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

     * @throws IllegalArgumentException if descriptorName is null
     */
    OperationGraph addProduct(String descriptorName,
            String productName) {
  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);

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

  ProductOperationGraph pog =
View Full Code Here

     *
     * @throws IllegalArgumentException if descriptorName is null
     */
    boolean removeProduct(String descriptorName, String productName) {
  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);

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

  ProductOperationGraph pog =
View Full Code Here

     * @throws IllegalArgumentException if descriptorName is null
     */
    OperationGraph lookupProduct(String descriptorName,
         String productName) {
  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);

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

  ProductOperationGraph pog =
View Full Code Here

  if (preferredProductName.equalsIgnoreCase(otherProductName)) {
      return false;
  }
 
  // Use a caseless version of the key.
  CaselessStringKey key = new CaselessStringKey(descriptorName);
 
  if (descriptorNames.containsKey(key) == false) {
      throw new IllegalArgumentException(
    JaiI18N.formatMsg("DescriptorCache1",
        new Object[] {descriptorName, modeName}));
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.