use of org.rstudio.studio.client.common.satellite.events.SatelliteFocusedEvent in project rstudio by rstudio.
the class Satellite method initialize.
public void initialize(String name, CommandWithArg<JavaScriptObject> onReactivated) {
onReactivated_ = onReactivated;
initializeNative(name);
// to notifyRStudioSatelliteClosing
if (!Desktop.isDesktop()) {
Window.addWindowClosingHandler(new ClosingHandler() {
@Override
public void onWindowClosing(ClosingEvent event) {
fireCloseEvent();
}
});
}
// let main window know when we get focus
WindowEx.addFocusHandler(new FocusHandler() {
@Override
public void onFocus(FocusEvent arg0) {
events_.fireEvent(new SatelliteFocusedEvent(getSatelliteName()));
}
});
}
Aggregations