Пример #1
0
  @Override
  public final void onStart() {
    //		differTodo.executeJS(hcj2seScript);

    //		differTodo.loadJS("msg = \"hello'  abc   \\'world\";");

    // 必须置于上两段初始代码传送之后
    final boolean rtl = LangUtil.isRTL(UserThreadResourceUtil.getMobileLocaleFrom(coreSS));
    if (rtl) {
      differTodo.setLTR(!rtl);
    }

    final ProjResponser projResponser = ServerUIAPIAgent.getProjResponserMaybeNull(projectContext);
    if (projResponser != null) {
      // AddHar下可能为null
      final String dftStyles = (String) projResponser.map.get(HCjar.PROJ_STYLES);
      final String defaultStyles = (dftStyles == null ? "" : dftStyles.trim()); // AddHAR可能出现null
      if (defaultStyles.length() > 0) {
        final String replaceVariable =
            StyleManager.replaceVariable(coreSS, defaultStyles, mlet, projectContext);
        //				L.V = L.O ? false : LogManager.log(replaceVariable);
        differTodo.loadStyles(replaceVariable);
      }
    }

    ServerUIAPIAgent.setDiffTodo(mlet, differTodo);
    //		printComp(scrolPanel, 0);

    // 必须置于notifyInitDone之前,因为有可能增加Mlet级样式和用户setStylesJComponentXX
    ScreenServer.onStartForMlet(coreSS, projectContext, mlet);
  }
Пример #2
0
  @Override
  public void onExit(final boolean isAutoReleaseAfterGo) {
    synchronized (this) {
      if (isExitProcced) {
        return;
      } else {
        isExitProcced = true;
      }
    }

    if (L.isInWorkshop) {
      L.V = L.O ? false : LogManager.log("onExit MletHtmlCanvas : " + mlet.getTarget());
    }

    ScreenServer.onExitForMlet(coreSS, projectContext, mlet, isAutoReleaseAfterGo);
    MultiUsingManager.exit(
        coreSS, ServerUIAPIAgent.buildScreenID(projectContext.getProjectID(), mlet.getTarget()));
    frame.dispose();
  }
Пример #3
0
 @Override
 public final void onResume() {
   ScreenServer.onResumeForMlet(coreSS, projectContext, mlet);
 }