Examples of EditorEvent


Examples of com.extjs.gxt.ui.client.event.EditorEvent

    if (editorListener == null) {
      editorListener = new Listener<DomEvent>() {
        public void handleEvent(DomEvent e) {
          if (e.getType() == Events.Complete) {
            EditorEvent ee = (EditorEvent) e;
            onEditComplete((CellEditor) ee.getEditor(), ee.getValue(), ee.getStartValue());
          } else if (e.getType() == Events.SpecialKey) {
            grid.getSelectionModel().onEditorKey(e);
          } else if (e.getType() == Events.CancelEdit) {
            EditorEvent ee = (EditorEvent) e;
            onEditCancel((CellEditor) ee.getEditor(), ee.getValue(), ee.getStartValue());
          }
        }
      };
    }
View Full Code Here

Examples of com.extjs.gxt.ui.client.event.EditorEvent

      RootPanel.get().add(this);
    }

    ComponentHelper.doAttach(this);

    EditorEvent e = new EditorEvent(this);
    e.setBoundEl(boundEl);
    e.setValue(v);
    if (!fireEvent(Events.BeforeStartEdit, e)) {
      return;
    }

    // since field may be reused, store may be filtered
View Full Code Here

Examples of com.extjs.gxt.ui.client.event.EditorEvent

    field.focus();
  }

  protected void cancelEdit(boolean remainVisible) {
    Object v = field.getValue();
    EditorEvent e = new EditorEvent(this);
    e.setValue(v);
    e.setStartValue(startValue);
    if (editing && fireEvent(Events.BeforeCancelEdit, e)) {
      setValue(startValue);
      if (!remainVisible) {
        hide();
      }
View Full Code Here

Examples of com.extjs.gxt.ui.client.event.EditorEvent

      return;
    }

    field.clearInvalid();

    EditorEvent e = new EditorEvent(this);
    e.setValue(postProcessValue(v));
    e.setStartValue(startValue);

    if (fireEvent(Events.BeforeComplete, e)) {
      editing = false;
      if (updateEl && boundEl != null) {
        boundEl.setInnerHtml(v.toString());
View Full Code Here

Examples of com.extjs.gxt.ui.client.event.EditorEvent

  @Override
  protected void onShow() {
    el().setVisible(true);
    el().updateZIndex(100);
    field.show();
    EditorEvent e = new EditorEvent(this);
    e.setBoundEl(boundEl);
    e.setValue(startValue);
    fireEvent(Events.StartEdit, e);
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.event.EditorEvent

    // TODO(danilatos): clean this mess up.
    boolean hackEditorNeverConsumes = name.equals("contextmenu") || name.equals("click")
        || name.equals("mousedown");

    try {
      EditorEvent event = SignalEventImpl.create(EditorEventImpl.FACTORY,
          rawEvent, !hackEditorNeverConsumes);

      try {
        if (UserAgent.isMac() &&
            rawEvent.getCtrlKey() && rawEvent.getAltKey()
            && rawEvent.getTypeInt() == Event.ONKEYPRESS) {
          // In mac safari, Ctrl+Alt+something often inserts weird invisible
          // characters in the dom!!! Always cancel the event, no matter what
          // (We can still handle it programmatically if we wish)

          // Cancel for FF as well just in case - but if this causes an issue
          // it should be OK to enable for FF. We get keypress events, but
          // no dom munge.

          // Don't cancel it on Windows, because that prevents AltGr combos
          // from working in european languages

          EditorStaticDeps.logger.trace().log("Cancelling dangerous: " + rawEvent.getType());

          rawEvent.preventDefault();
        }
      } catch (JavaScriptException e) {
        // If this fails, swallow it. Seems to cause issues with dom mutation
        // events when setting contentEditable with JUnit tests.
      }

      if (event == null) {
        if (!hackEditorNeverConsumes) {
          try {
            rawEvent.stopPropagation();
          } catch (JavaScriptException e) {
            // If this fails, swallow it. Seems to cause issues with dom mutation
            // events when setting contentEditable with JUnit tests.
          }
        }
        return;
      }

      boolean cancel = false;

      if (!hackEditorNeverConsumes) {
        if (editorRelevantEvent(event)) {
          try {
            event.stopPropagation();
          } catch (JavaScriptException e) {
            // If this fails, swallow it. Seems to cause issues with dom mutation
            // events when setting contentEditable with JUnit tests.
          }
        } else {
          return;
        }
      }

      boolean isMutationEvent = event.isMutationEvent();

      if (!isMutationEvent || !EditorStaticDeps.shouldIgnoreMutations()) {
        EditorStaticDeps.startIgnoreMutations();
        try {
          if (debugDisabled) {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.event.EditorEvent

    // TODO(danilatos): clean this mess up.
    boolean hackEditorNeverConsumes = name.equals("contextmenu") || name.equals("click")
        || name.equals("mousedown");

    try {
      EditorEvent event = SignalEventImpl.create(EditorEventImpl.FACTORY,
          rawEvent, !hackEditorNeverConsumes);

      try {
        if (UserAgent.isMac() &&
            rawEvent.getCtrlKey() && rawEvent.getAltKey()
            && rawEvent.getTypeInt() == Event.ONKEYPRESS) {
          // In mac safari, Ctrl+Alt+something often inserts weird invisible
          // characters in the dom!!! Always cancel the event, no matter what
          // (We can still handle it programmatically if we wish)

          // Cancel for FF as well just in case - but if this causes an issue
          // it should be OK to enable for FF. We get keypress events, but
          // no dom munge.

          // Don't cancel it on Windows, because that prevents AltGr combos
          // from working in european languages

          EditorStaticDeps.logger.trace().log("Cancelling dangerous: " + rawEvent.getType());

          rawEvent.preventDefault();
        }
      } catch (JavaScriptException e) {
        // If this fails, swallow it. Seems to cause issues with dom mutation
        // events when setting contentEditable with JUnit tests.
      }

      if (event == null) {
        if (!hackEditorNeverConsumes) {
          try {
            rawEvent.stopPropagation();
          } catch (JavaScriptException e) {
            // If this fails, swallow it. Seems to cause issues with dom mutation
            // events when setting contentEditable with JUnit tests.
          }
        }
        return;
      }

      boolean cancel = false;

      if (!hackEditorNeverConsumes) {
        if (editorRelevantEvent(event)) {
          try {
            event.stopPropagation();
          } catch (JavaScriptException e) {
            // If this fails, swallow it. Seems to cause issues with dom mutation
            // events when setting contentEditable with JUnit tests.
          }
        } else {
          return;
        }
      }

      boolean isMutationEvent = event.isMutationEvent();

      if (!isMutationEvent || !EditorStaticDeps.shouldIgnoreMutations()) {
        EditorStaticDeps.startIgnoreMutations();
        try {
          if (debugDisabled) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.