use of org.rstudio.studio.client.application.events.EventBus in project rstudio by rstudio.
the class SatelliteWindow method show.
// show the satellite window (subclasses shouldn't override this method,
// rather they should override the abstract onInitialize method)
public void show(JavaScriptObject params) {
// react to font size changes
EventBus eventBus = pEventBus_.get();
eventBus.addHandler(ChangeFontSizeEvent.TYPE, new ChangeFontSizeHandler() {
public void onChangeFontSize(ChangeFontSizeEvent event) {
FontSizer.setNormalFontSize(Document.get(), event.getFontSize());
}
});
FontSizeManager fontSizeManager = pFontSizeManager_.get();
FontSizer.setNormalFontSize(Document.get(), fontSizeManager.getSize());
// disable no handler assertions
AppCommand.disableNoHandlerAssertions();
// allow subclasses to initialize
onInitialize(mainPanel_, params);
}
use of org.rstudio.studio.client.application.events.EventBus in project rstudio by rstudio.
the class ClientStateValue method finishInit.
protected void finishInit(ClientInitState state) {
JsObject grp = state.peek(group_);
T obj = doGet(grp, name_);
valueTracker_ = new ValueChangeTracker<T>(obj);
onInit(obj);
EventBus evt = RStudioGinjector.INSTANCE.getEventBus();
evt.addHandler(SaveClientStateEvent.TYPE, this);
}
use of org.rstudio.studio.client.application.events.EventBus in project rstudio by rstudio.
the class ChunkOutputWidget method unregisterConsoleEvents.
private void unregisterConsoleEvents() {
EventBus events = RStudioGinjector.INSTANCE.getEventBus();
events.removeHandler(ConsoleWriteOutputEvent.TYPE, this);
events.removeHandler(ConsoleWriteErrorEvent.TYPE, this);
}
use of org.rstudio.studio.client.application.events.EventBus in project rstudio by rstudio.
the class ChunkOutputWidget method registerConsoleEvents.
private void registerConsoleEvents() {
EventBus events = RStudioGinjector.INSTANCE.getEventBus();
events.addHandler(ConsoleWriteOutputEvent.TYPE, this);
events.addHandler(ConsoleWriteErrorEvent.TYPE, this);
}
Aggregations