本文整理匯總了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);
}