Search in sources :

Example 1 with EnsureVisibleHandler

use of org.rstudio.core.client.events.EnsureVisibleHandler in project rstudio by rstudio.

the class DelayLoadWorkbenchTab method initialize.

protected void initialize(final WorkbenchPane pane, Panel panel) {
    assert !initialized_;
    initialized_ = true;
    pane.ensureWidget();
    panel.add(pane);
    pane.addEnsureVisibleHandler(new EnsureVisibleHandler() {

        public void onEnsureVisible(EnsureVisibleEvent event) {
            ensureVisible(event.getActivate());
        }
    });
    pane.addEnsureHiddenHandler(new EnsureHiddenHandler() {

        @Override
        public void onEnsureHidden(EnsureHiddenEvent event) {
            ensureHidden();
        }
    });
    setInternalCallbacks(new InternalCallbacks() {

        public void onBeforeSelected() {
            pane.onBeforeSelected();
        }

        public void onSelected() {
            pane.onSelected();
        }
    });
    pane.onBeforeSelected();
    pane.onSelected();
}
Also used : EnsureVisibleHandler(org.rstudio.core.client.events.EnsureVisibleHandler) EnsureHiddenEvent(org.rstudio.core.client.events.EnsureHiddenEvent) EnsureVisibleEvent(org.rstudio.core.client.events.EnsureVisibleEvent) EnsureHiddenHandler(org.rstudio.core.client.events.EnsureHiddenHandler)

Aggregations

EnsureHiddenEvent (org.rstudio.core.client.events.EnsureHiddenEvent)1 EnsureHiddenHandler (org.rstudio.core.client.events.EnsureHiddenHandler)1 EnsureVisibleEvent (org.rstudio.core.client.events.EnsureVisibleEvent)1 EnsureVisibleHandler (org.rstudio.core.client.events.EnsureVisibleHandler)1