当前位置: 首页>>代码示例>>Java>>正文


Java BlipView类代码示例

本文整理汇总了Java中org.waveprotocol.wave.client.wavepanel.view.BlipView的典型用法代码示例。如果您正苦于以下问题:Java BlipView类的具体用法?Java BlipView怎么用?Java BlipView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BlipView类属于org.waveprotocol.wave.client.wavepanel.view包,在下文中一共展示了BlipView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showButtons

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
private void showButtons() {
  // hide line, show buttons
  line.setClassName(css.line() + " " + css.lineInvisible());
  String visibleButtonClass = css.button() + " " + css.buttonVisible();
  addButton.setClassName(visibleButtonClass);
  replyButton.setClassName(visibleButtonClass);

  Element metaElement = blipContinuationBar.getParentElement();
  Element blipElement = metaElement.getParentElement();
  BlipView blipView = domAsViewProvider.asBlip(blipElement);
  ConversationBlip blip = modelAsViewProvider.getBlip(blipView);
  Element addButtonText = DomUtil.findFirstChildElement(addButton, Type.CONTINUATION_TEXT);
  addButtonText.setInnerText(
      blip != null && navigator.isBlipLastInParentThread(blip) ? messages.add() : messages.insert());

  buttonsShown = true;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:18,代码来源:ContinuationIndicatorController.java

示例2: initBlip

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
protected void initBlip(ConversationBlip blip, Element blipElement, boolean upper) {
  if (((QuasiConversationBlip) blip).isQuasiDeleted()) {
    makeBlipVoid(blip);
  }

  super.initBlip(blip, blipElement, upper);

  // Render blip's meta according to the model.
  BlipView blipView = modelAsViewProvider.getBlipView(blip);
  BlipMetaView metaView = modelAsViewProvider.getBlipMetaView(blip);
  if (blipView != null && metaView != null) {
    shallowBlipRenderer.render(blip, blipView, metaView);
  }

  // Listen to the contributors on the blip.
  for (ParticipantId contributor : blip.getContributorIds()) {
    profileRenderer.monitorContribution(blip, contributor);
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:21,代码来源:DynamicDomRenderer.java

示例3: terminateBlip

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
protected void terminateBlip(ConversationBlip blip) {
  Preconditions.checkArgument(isRendered(blip), "not rendered blip");
  
  for (ParticipantId contributor : blip.getContributorIds()) {
    profileRenderer.unmonitorContribution(blip, contributor);
  }    

  // Deals with focus and editing.
  BlipView blipView = modelAsViewProvider.getBlipView(blip);
  if (blipView != null) {
    // TODO(user): Hide parent thread if it becomes empty.
    if (blipView.isFocused()) {
      if (!blipView.isBeingEdited() && blip.hasContent()) {
        InteractiveDocument doc = blip.getContent();
        doc.clearDiffs(true);
      }
    }
    blipView.remove();
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:22,代码来源:DynamicDomRenderer.java

示例4: onAnchorAddedBefore

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void onAnchorAddedBefore(ConversationBlip blip, ReplyDoodad ref, ReplyDoodad dood) {
  BlipView blipUi = views.getBlipView(blip);
  BlipMetaView metaUi = blipUi != null ? blipUi.getMeta() : null;
  if (metaUi != null) {
    AnchorView inlineUi = dood.getAnchor();
    metaUi.insertInlineAnchorBefore(ref != null ? ref.getAnchor() : null, inlineUi);

    // Move reply if it exists.
    ConversationThread reply = blip.getReplyThread(dood.getId());
    AnchorView defaultUi = reply != null ? views.getDefaultAnchor(reply) : null;
    InlineThreadView replyUi = defaultUi != null ? defaultUi.getThread() : null;
    if (replyUi != null) {
      defaultUi.detach(replyUi);
      inlineUi.attach(replyUi);
    }
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:19,代码来源:ReplyManager.java

示例5: scrollToBlip

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void scrollToBlip(ConversationBlip blip) {
  blipToScroll = null;
  positionToScroll = null;    
  if (blip != null) {
    if (renderer.isBlipReady(blip)) {
      BlipView blipView = modelAsViewProvider.getBlipView(blip);
      if (blipView != null) {
        smartScroller.moveTo(blipView);
      }        
    } else {
      blipToScroll = blip;
      renderer.dynamicRendering(blip);        
    }
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:17,代码来源:ScreenPositionDomScroller.java

示例6: create

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
public static LiveProfileRenderer create(ProfileManager profiles,
    final ModelAsViewProvider views, final ShallowBlipRenderer blipRenderer) {
  final TimerService timer = SchedulerInstance.getLowPriorityTimer();
  QueueProcessor<ConversationBlip> contributorUpdater =
      new QueueProcessor<ConversationBlip>(timer) {
        
    @Override
    public void process(ConversationBlip blip) {
      BlipView blipUi = blip != null ? views.getBlipView(blip) : null;
      BlipMetaView metaUi = blipUi != null ? blipUi.getMeta() : null;
      if (metaUi != null) {
        blipRenderer.renderContributors(blip, metaUi);
      }
    }
  };
  return new LiveProfileRenderer(profiles, views, contributorUpdater);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:18,代码来源:LiveProfileRenderer.java

示例7: popupLink

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void popupLink(ConversationBlip blip) {
  //hide previous
  if (blipLinkPopupView != null) {
    blipLinkPopupView.hide();
  }

  focusFrame.focus(blip);
  WaveRef waveRef = WaveRef.of(blip.getWavelet().getWaveId(), blip.getWavelet().getId(), blip.getId());
  String waveRefStringValue = WaveRefConstants.WAVE_URI_PREFIX +
      GwtWaverefEncoder.encodeToUriPathSegment(waveRef);

  BlipView blipView = views.getBlipView(blip);
  blipLinkPopupView = blipView.createLinkPopup();
  blipLinkPopupView.setLinkInfo(waveRefStringValue);
  blipLinkPopupView.show();
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:18,代码来源:ActionsImpl.java

示例8: onMouseDown

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public boolean onMouseDown(MouseDownEvent event, Element context) {
  Element metaElement = context.getParentElement();
  Element blipElement = metaElement.getParentElement();
  BlipView blipView = viewProvider.asBlip(blipElement);
  ConversationBlip blip = modelProvider.getBlip(blipView);
  reader.read(blip);
  
  event.stopPropagation();
  return true;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:12,代码来源:BlipIndicatorController.java

示例9: onMouseDown

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public boolean onMouseDown(MouseDownEvent event, Element source) {
  if (event.getNativeButton() != NativeEvent.BUTTON_LEFT) {
    return false;
  }
  BlipView blipView = panel.asBlip(source);
  ConversationBlip blip = modelAsViewProvider.getBlip(blipView);
  focus.focus(blip);    
  return true;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:11,代码来源:FocusFrameController.java

示例10: onAnchorRemoved

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void onAnchorRemoved(ConversationBlip blip, ReplyDoodad dood) {
  BlipView blipUi = views.getBlipView(blip);
  BlipMetaView metaUi = blip != null ? blipUi.getMeta() : null;
  if (metaUi != null) {
    AnchorView inlineUi = dood.getAnchor();

    // Move reply if there is one.
    ConversationThread reply = blip.getReplyThread(dood.getId());
    AnchorView defaultUi = reply != null ? views.getDefaultAnchor(reply) : null;
    InlineThreadView replyUi = inlineUi.getThread();
    if (replyUi != null) {
      inlineUi.detach(replyUi);
      defaultUi.attach(replyUi);
    }

    dood.getAnchor().remove();
  }
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:20,代码来源:ReplyManager.java

示例11: testEditModeStartsAndStopsDiffSuppression

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
public void testEditModeStartsAndStopsDiffSuppression() {
  target.install();

  Editor e = mock(Editor.class);
  MockDoc doc = mock(MockDoc.class);
  ConversationBlip blip = mock(ConversationBlip.class);
  BlipView blipUi = mock(BlipView.class);
  when(models.getBlip(blipUi)).thenReturn(blip);
  when(documents.get(blip)).thenReturn(doc);

  target.onSessionStart(e, blipUi);
  target.onSessionEnd(e, blipUi);

  verify(doc).startDiffSuppression();
  verify(doc).stopDiffSuppression();
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:17,代码来源:DiffControllerTest.java

示例12: onAnchorChanged

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void onAnchorChanged(Anchor oldAnchor, Anchor newAnchor) {
  // Since anchors are application-level immutable, this is a rare case, so
  // the gain in simplicity of implementing it as removal then addition
  // outweighs the efficiency gain from implementing a
  // conversation-view-move mechanism.
  if (oldAnchor != null) {
    // Remove old view.
    ConversationView oldUi = viewOf(conversation);
    if (oldUi != null) {
      oldUi.remove();
    }
  }
  if (newAnchor != null) {
    // Insert new view.
    BlipView containerUi = viewOf(newAnchor.getBlip());
    if (containerUi != null) {
      ConversationView convUi = containerUi.insertConversationBefore(null, conversation);
    }
  }
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:22,代码来源:LiveConversationViewRenderer.java

示例13: delete

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void delete(BlipView blipUi) {
  // If focus is on the blip that is being deleted, move focus somewhere else.
  // If focus is on a blip inside the blip being deleted, don't worry about it
  // (checking could get too expensive).
  if (blipUi.equals(focus.getFocusedBlip())) {
    // Move to next blip in thread if there is one, otherwise previous blip in
    // thread, otherwise previous blip in traversal order.
    ThreadView parentUi = blipUi.getParent();
    BlipView nextUi = parentUi.getBlipAfter(blipUi);
    if (nextUi == null) {
      nextUi = parentUi.getBlipBefore(blipUi);
    }
    if (nextUi != null) {
      focus.focus(nextUi);
    } else {
      focus.moveUp();
    }
  }

  views.getBlip(blipUi).delete();
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:23,代码来源:ActionsImpl.java

示例14: popupLink

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
@Override
public void popupLink(BlipView blipUi) {
  ConversationBlip blip = views.getBlip(blipUi);
  // TODO(Yuri Z.) Change to use the conversation model when the Conversation
  // exposes a reference to its ConversationView.
  WaveId waveId = blip.hackGetRaw().getWavelet().getWaveId();
  WaveletId waveletId;
  try {
    waveletId = DualIdSerialiser.MODERN.deserialiseWaveletId(blip.getConversation().getId());
  } catch (InvalidIdException e) {
    Window.alert(messages.invalidWaveletId(blip.getConversation().getId()));
    return;
  }
  WaveRef waveRef = WaveRef.of(waveId, waveletId, blip.getId());
  final String waveRefStringValue =
      WaveRefConstants.WAVE_URI_PREFIX + GwtWaverefEncoder.encodeToUriPathSegment(waveRef);
  BlipLinkPopupView blipLinkPopupView = blipUi.createLinkPopup();
  blipLinkPopupView.setLinkInfo(waveRefStringValue);
  blipLinkPopupView.show();
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:21,代码来源:ActionsImpl.java

示例15: endSession

import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入依赖的package包/类
/**
 * Stops editing if there is currently an edit session.
 */
private void endSession() {
  if (isEditing()) {
    selectionExtractor.stop(editor);
    container.doOrphan(editor.getWidget());
    editor.blur();
    editor.setEditing(false);
    blipEditStatusListener.setEditing(false);
    // "removeContent" just means detach the editor from the document.
    editor.removeContent();
    editor.reset();
    // TODO(user): this does not work if the view has been deleted and
    // detached.
    editing.getMeta().deselect(MenuOption.EDIT_DONE);
    editing.getMeta().enable(BlipMetaViewBuilder.DISABLED_WHILE_EDITING_MENU_OPTIONS_SET);
    editing.getMeta().disable(BlipMetaViewBuilder.ENABLED_WHILE_EDITING_MENU_OPTIONS_SET);
    Editor oldEditor = editor;
    BlipView oldEditing = editing;
    editor = null;
    editing = null;
    fireOnSessionEnd(oldEditor, oldEditing);
  }
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:26,代码来源:EditSession.java


注:本文中的org.waveprotocol.wave.client.wavepanel.view.BlipView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。