Пример #1
0
  /**
   * Set Environment
   *
   * @param prop
   * @param WindowNo included Window variables
   */
  public void setEnvironment(Ctx prop, int WindowNo) {
    if (prop == null) prop = Env.getCtx();

    m_ctx = new HashMap<String, Object>();
    //  Convert properties to HashMap
    Iterator<String> it = prop.keySet().iterator();
    while (it.hasNext()) {
      String key = it.next();
      //  filter
      if (key == null
          || key.length() == 0
          || key.startsWith("P") //  Preferences
          || (key.indexOf("|") != -1
              && !key.startsWith(String.valueOf(WindowNo))) //  other Window Settings
      ) continue;

      String value = prop.getContext(key);
      setEnvironment(key, value);
    }
  } //  setEnvironment