Пример #1
0
  FvContext switchContext(TextEdit ev, int incval) {
    FvContext newcontext = fvmap.get(vi, ev);
    if (null == newcontext) {
      newcontext = new FvContext(vi, ev);
      fvmap.put(newcontext);
    } else {
      if (newcontext != this) newcontext.wrapInc(incval);
    }

    return newcontext;
  }
Пример #2
0
  public static FvContext getcontext(View viloc, TextEdit te) {
    // trace("fvcontext.getcontext " + e + " and " + viloc);

    FvContext context = fvmap.get(viloc, te);
    if (null == defaultFvc) {
      defaultFvc = new FvContext(viloc, defaultText);
      fvmap.put(defaultFvc);
    }

    if (null == context) {
      context = new FvContext(viloc, te);
      fvmap.put(context);
    }
    return context;
  }