Package javax.media.jai.util

Examples of javax.media.jai.util.CaselessStringKey


  String modeNames[] = RegistryMode.getModeNames();

  for (int i = 0; i < modeNames.length; i++)
      localNamesTable.put(
    new CaselessStringKey(modeNames[i]), new Hashtable());
    }
View Full Code Here


     * be used to directly set preferences later.
     */
    private void mapLocalNameToObject(String modeName, String localName, Object factory) {

  Hashtable modeTable = (Hashtable)
      localNamesTable.get(new CaselessStringKey(modeName));

  modeTable.put(new CaselessStringKey(localName), factory);
    }
View Full Code Here

     * Get object registered under the local name for under the mode.
     */
    private Object getObjectFromLocalName(String modeName, String localName) {

  Hashtable modeTable = (Hashtable)
      localNamesTable.get(new CaselessStringKey(modeName));

  Object obj = modeTable.get(new CaselessStringKey(localName));

  if (obj == null)
      registryFileError(localName + ": " +
        JaiI18N.getString("RegistryFileParser8"));

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

        return h;
    }

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

    }

    // A case insensitive containsAll for Hashtables containing Strings
    private boolean containsAll(Hashtable thisHash, Hashtable otherHash) {

        CaselessStringKey thisNameKey;
        for (Enumeration i=thisHash.keys(); i.hasMoreElements(); ) {
            thisNameKey = (CaselessStringKey)i.nextElement();
            if (otherHash.containsKey(thisNameKey) == false)
                return false;
        }
View Full Code Here

     *         by JAI or because the mode was not previously add.
     *         returns true otherwise.
     */
    public synchronized static boolean removeMode(String name) {

  CaselessStringKey key = new CaselessStringKey(name);

  if (immutableNames.contains(key))
      return false;

  return registryModes.remove(key) != null;
View Full Code Here

  String names[] = new String[registryModes.size()];

  int i = 0;

        for (Enumeration e = registryModes.keys(); e.hasMoreElements();) {
            CaselessStringKey key = (CaselessStringKey)e.nextElement();

      names[i++] = key.getName();
  }

  if (i <= 0)
      return null;
View Full Code Here

    /**
     * Get the registry mode corresponding to this name.
     */
    public static RegistryMode getMode(String name) {

  CaselessStringKey key = new CaselessStringKey(name);

  return (RegistryMode)registryModes.get(key);
    }
View Full Code Here

         Class productClass,
                           Method factoryMethod,
         boolean arePreferencesSupported,
                           boolean arePropertiesSupported) {

  this.name = new CaselessStringKey(name);
  this.descriptorClass = descriptorClass;
  this.productClass = productClass;
  this.factoryMethod = factoryMethod;
  this.arePreferencesSupported = arePreferencesSupported;
  this.arePropertiesSupported = arePropertiesSupported;
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.