Пример #1
0
  /** @see com.google.gwt.user.client.ui.FocusWidget#onAttach() */
  @Override
  protected void onAttach() {

    super.onAttach();
    if (!m_hasBeenAttached) {
      m_hasBeenAttached = true;
      Scheduler.get()
          .scheduleDeferred(
              new ScheduledCommand() {

                public void execute() {

                  if (isAttached()) {
                    m_editorHeight = calculateEditorHeight();
                    m_id = ensureId(getMainElement());
                    m_width = getElement().getOffsetWidth() - 2;
                    checkLibraries();
                    initNative();
                    if (!m_active) {
                      getElement().addClassName(I_LayoutBundle.INSTANCE.form().inActive());
                    }
                  } else {
                    resetAtachedFlag();
                  }
                }
              });
    }
  }
Пример #2
0
  /** @see com.google.gwt.user.client.ui.Widget#onDetach() */
  @Override
  protected void onDetach() {

    detachEditor();
    if (m_toolbarContainer != null) {
      m_toolbarContainer.removeFromParent();
      m_toolbarContainer = null;
    }
    super.onDetach();
  }