本文整理汇总了Java中org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession类的典型用法代码示例。如果您正苦于以下问题:Java EditSession类的具体用法?Java EditSession怎么用?Java EditSession使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EditSession类属于org.waveprotocol.wave.client.wavepanel.impl.edit包,在下文中一共展示了EditSession类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Creates the third stage.
*/
@Override
public void create(Accessor<StageThree> whenReady) {
if (Flags.get().enableUndercurrentEditing()) {
install();
}
whenReady.use(new StageThree() {
@Override
public Actions getEditActions() {
return StageThreeProvider.this.getEditActions();
}
@Override
public EditSession getEditSession() {
return StageThreeProvider.this.getEditSession();
}
@Override
public ScreenController getScreenController() {
return StageThreeProvider.this.getScreenController();
}
});
}
示例2: create
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
@Override
protected final void create(Accessor<StageThree> whenReady) {
install();
whenReady.use(new StageThree() {
@Override
public Actions getEditActions() {
throw new UnsupportedOperationException();
}
@Override
public EditSession getEditSession() {
throw new UnsupportedOperationException();
}
@Override
public ScreenController getScreenController() {
throw new UnsupportedOperationException();
}
});
}
示例3: install
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Installs this feature.
*/
public static void install(final EditSession edit, EditToolbar toolbar) {
toolbar.addClickButton(Resources.css.icon(), new EditToolbar.ClickHandler() {
@Override
public void onClicked(EditorContext context) {
UploadFormPopup prompt = new UploadFormPopup();
prompt.setListener(new UploadToolbarAction(edit));
prompt.show();
}
});
}
示例4: closeAndOpenWave
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Completion of the current wave, starting check for the end of the message processing
* and opening the new wave.
* @param openWaveData - data for opening the new wave
*/
private void closeAndOpenWave(final OpenWaveData openWaveData) {
final Command openWave = new Command() {
@Override
public void execute() {
openWave(openWaveData);
}
};
if (wave != null) {
StageThree three = wave.getStageThree();
if (three != null) {
final EditSession session = three.getEditSession();
if (session.isDraftModified()) {
final EditSession.Finisher finisher = session.getFinisher();
finisher.onWaveCompletion(new Command() {
@Override
public void execute() {
if (finisher.isExitAllowed()) {
session.leaveDraftMode(finisher.shouldDraftBeSaved());
closeWave(openWave);
} else {
searchPresenter.onRestoreSelection();
}
}
});
return;
}
}
}
closeWave(openWave);
}
示例5: createEditSession
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
private EditSession createEditSession() {
EditSession session = EditSession.create(getStageOne().getFocusFrame(),
getStageOne().getWavePanel(), getSelectionExtractor());
stageTwo.getStageOne().getFocusFrame().upgrade(session);
session.addListener(stageOne.getDynamicRenderer().getEditSessionListener());
return session;
}
示例6: DraftModeController
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
protected DraftModeController(Actions actions, LogicalPanel container, DomAsViewProvider domAsViewProvider,
ModelAsViewProvider modelAsViewProvider, EditSession editSession) {
this.actions = actions;
this.container = container;
this.domAsViewProvider = domAsViewProvider;
this.modelAsViewProvider = modelAsViewProvider;
this.editSession = editSession;
messages = WavePanelResourceLoader.getBlipMessages();
}
示例7: install
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
public static WaveTitleHandler install(ConversationNavigator navigator, EditSession editSession,
ObservableQuasiConversationView conversationView) {
WaveTitleHandler waveTitleHandler = new WaveTitleHandler(navigator, conversationView);
editSession.addListener(waveTitleHandler.getEditSessionListener());
conversationView.addListener(waveTitleHandler.getConversationViewListener());
return waveTitleHandler;
}
示例8: ToolbarSwitcher
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
private ToolbarSwitcher(WavePanel panel, EditSession editSession, ViewToolbar viewToolbar,
ParticipantId signedInUser, IdGenerator idGenerator, WaveId waveId) {
this.panel = panel;
this.editSession = editSession;
this.viewToolbar = viewToolbar;
this.signedInUser = signedInUser;
this.idGenerator = idGenerator;
this.waveId = waveId;
}
示例9: install
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Creates a new {@link ToolbarSwitcher} and initialises it.
*/
public static ToolbarSwitcher install(WavePanel panel, EditSession editSession,
ViewToolbar viewToolbar, ParticipantId signedInUser, IdGenerator idGenerator, WaveId waveId) {
ToolbarSwitcher switcher = new ToolbarSwitcher(panel, editSession, viewToolbar,
signedInUser, idGenerator, waveId);
switcher.init();
return switcher;
}
示例10: createEditActions
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
protected Actions createEditActions() {
StageOne stageOne = stageTwo.getStageOne();
WavePanelImpl panel = stageOne.getWavePanel();
FocusFramePresenter focus = stageOne.getFocusFrame();
ModelAsViewProvider views = stageTwo.getModelAsViewProvider();
WaveDocuments<? extends InteractiveDocument> docs = stageTwo.getDocumentRegistry();
BlipQueueRenderer blipQueue = stageTwo.getBlipQueue();
EditSession edit = getEditSession();
return ActionsImpl.create(views, docs, blipQueue, focus, edit);
}
示例11: createEditSession
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
protected EditSession createEditSession() {
StageOne stageOne = stageTwo.getStageOne();
WavePanelImpl panel = stageOne.getWavePanel();
FocusFramePresenter focus = stageOne.getFocusFrame();
ModelAsViewProvider views = stageTwo.getModelAsViewProvider();
DocumentRegistry<? extends InteractiveDocument> documents = stageTwo.getDocumentRegistry();
String address = stageTwo.getSignedInUser().getAddress();
TimerService clock = SchedulerInstance.getLowPriorityTimer();
String sessionId = stageTwo.getSessionId();
SelectionExtractor selectionExtractor = new SelectionExtractor(clock, address, sessionId);
return EditSession.install(views, documents, selectionExtractor, focus, panel);
}
示例12: install
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Installs parts of stage three that have dependencies.
* <p>
* This method is only called once all asynchronously loaded components of
* stage three are ready.
* <p>
* Subclasses may override this to change the set of installed features.
*/
protected void install() {
EditorStaticDeps.setPopupProvider(PopupFactory.getProvider());
EditorStaticDeps.setPopupChromeProvider(PopupChromeFactory.getProvider());
// Eagerly install some features.
WavePanelImpl panel = stageTwo.getStageOne().getWavePanel();
FocusFramePresenter focus = stageTwo.getStageOne().getFocusFrame();
ParticipantId user = stageTwo.getSignedInUser();
ModelAsViewProvider models = stageTwo.getModelAsViewProvider();
ProfileManager profiles = stageTwo.getProfileManager();
MenuMessages menuMessages = GWT.create(MenuMessages.class);
ParticipantMessages participantMessages = GWT.create(ParticipantMessages.class);
Actions actions = getEditActions();
EditSession edit = getEditSession();
MenuController.install(actions, panel, menuMessages);
ToolbarSwitcher.install(stageTwo.getStageOne().getWavePanel(), getEditSession(),
getViewToolbar(), getEditToolbar());
WaveTitleHandler.install(edit, models);
ReplyIndicatorController.install(actions, edit, panel);
EditController.install(focus, actions, panel);
ParticipantController.install(panel, models, profiles, getLocalDomain(), user, participantMessages);
KeepFocusInView.install(edit, panel);
stageTwo.getDiffController().upgrade(edit);
}
示例13: ReplyIndicatorController
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Creates a reply indicator handler.
*
* @param actions
* @param panel
*/
private ReplyIndicatorController(Actions actions, EditSession editSession,
DomAsViewProvider panel) {
this.actions = actions;
this.panel = panel;
this.editSession = editSession;
this.editSession.addListener(this);
}
示例14: install
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
/**
* Installs the reply indicator feature in a wave panel.
*/
public static void install(Actions handler, EditSession editSession, WavePanel panel) {
ReplyIndicatorController controller = new ReplyIndicatorController(handler, editSession,
panel.getViewProvider());
panel.getHandlers().registerMouseDownHandler(TypeCodes.kind(Type.REPLY_BOX),
controller);
panel.getHandlers().registerMouseDownHandler(TypeCodes.kind(Type.CONTINUATION_INDICATOR),
controller);
}
示例15: ToolbarSwitcher
import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession; //导入依赖的package包/类
private ToolbarSwitcher(WavePanel panel, EditSession editSession,
ViewToolbar viewToolbar, EditToolbar editToolbar) {
this.panel = panel;
this.editSession = editSession;
this.viewToolbar = viewToolbar;
this.editToolbar = editToolbar;
}