本文整理汇总了Java中org.waveprotocol.wave.client.wavepanel.view.BlipView.insertConversationBefore方法的典型用法代码示例。如果您正苦于以下问题:Java BlipView.insertConversationBefore方法的具体用法?Java BlipView.insertConversationBefore怎么用?Java BlipView.insertConversationBefore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.waveprotocol.wave.client.wavepanel.view.BlipView
的用法示例。
在下文中一共展示了BlipView.insertConversationBefore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
}
}
示例2: onConversationAdded
import org.waveprotocol.wave.client.wavepanel.view.BlipView; //导入方法依赖的package包/类
@Override
public void onConversationAdded(ObservableConversation conversation) {
BlipView container = viewOf(conversation.getAnchor().getBlip());
if (container != null) {
ConversationView conversationUi = container.insertConversationBefore(null, conversation);
}
observe(conversation);
}