本文整理汇总了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;
}
示例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);
}
}
示例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();
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
示例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();
}
示例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;
}
示例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;
}
示例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();
}
}
示例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();
}
示例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);
}
}
}
示例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();
}
示例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();
}
示例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);
}
}