Examples of BlipMenuItemView


Examples of org.waveprotocol.wave.client.wavepanel.view.BlipMenuItemView

  @Override
  public boolean onMouseDown(MouseDownEvent event, Element context) {
    if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) {
      return false;
    }
    BlipMenuItemView item = panel.asBlipMenuItem(context);
    switch (item.getOption()) {
      case EDIT:
        actions.startEditing(item.getParent().getParent());
        break;
      case EDIT_DONE:
        actions.stopEditing();
        break;
      case REPLY:
        actions.reply(item.getParent().getParent());
        break;
      case DELETE:
        // We delete the blip without confirmation if shift key is pressed
        if (event.getNativeEvent().getShiftKey() || Window.confirm(messages.confirmDeletion())) {
          actions.delete(item.getParent().getParent());
        }
        break;
      case LINK:
        actions.popupLink(item.getParent().getParent());
        break;
      default:
        throw new AssertionError();
    }
    event.preventDefault();
View Full Code Here

Examples of org.waveprotocol.wave.client.wavepanel.view.BlipMenuItemView

  @Override
  public boolean onClick(ClickEvent event, Element context) {
    if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) {
      return false;
    }
    BlipMenuItemView item = panel.asBlipMenuItem(context);
    switch (item.getOption()) {
      case EDIT:
        if (item.isSelected()) {
          actions.stopEditing();
        } else {
          actions.startEditing(item.getParent().getParent());
        }
        break;
      case REPLY:
        actions.reply(item.getParent().getParent());
        break;
      case DELETE:
        actions.delete(item.getParent().getParent());
        break;
      case LINK:
        actions.popupLink(item.getParent().getParent());
        break;
      default:
        throw new AssertionError();
    }
    event.preventDefault();
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.