Search in sources :

Example 1 with ChangeFontSizeHandler

use of org.rstudio.studio.client.application.events.ChangeFontSizeHandler 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);
}
Also used : FontSizeManager(org.rstudio.studio.client.workbench.ui.FontSizeManager) ChangeFontSizeHandler(org.rstudio.studio.client.application.events.ChangeFontSizeHandler) EventBus(org.rstudio.studio.client.application.events.EventBus) ChangeFontSizeEvent(org.rstudio.studio.client.application.events.ChangeFontSizeEvent)

Aggregations

ChangeFontSizeEvent (org.rstudio.studio.client.application.events.ChangeFontSizeEvent)1 ChangeFontSizeHandler (org.rstudio.studio.client.application.events.ChangeFontSizeHandler)1 EventBus (org.rstudio.studio.client.application.events.EventBus)1 FontSizeManager (org.rstudio.studio.client.workbench.ui.FontSizeManager)1