Search in sources :

Example 1 with CLASS_FRAME_CHANGED

use of edu.stanford.bmir.protege.web.shared.event.ClassFrameChangedEvent.CLASS_FRAME_CHANGED in project webprotege by protegeproject.

the class OWLEntityDescriptionBrowserPortletPresenter method startPortlet.

@Override
public void startPortlet(PortletUi portletUi, WebProtegeEventBus eventBus) {
    portletUi.setWidget(new ScrollPanel(html));
    eventBus.addProjectEventHandler(getProjectId(), CLASS_FRAME_CHANGED, event -> handleEntityChange(event.getEntity()));
    eventBus.addProjectEventHandler(getProjectId(), ObjectPropertyFrameChangedEvent.TYPE, event -> handleEntityChange(event.getEntity()));
    eventBus.addProjectEventHandler(getProjectId(), DataPropertyFrameChangedEvent.TYPE, (DataPropertyFrameChangedEventHandler) event -> handleEntityChange(event.getEntity()));
    eventBus.addProjectEventHandler(getProjectId(), AnnotationPropertyFrameChangedEvent.TYPE, event -> handleEntityChange(event.getEntity()));
    eventBus.addProjectEventHandler(getProjectId(), NamedIndividualFrameChangedEvent.TYPE, event -> handleEntityChange(event.getEntity()));
    eventBus.addProjectEventHandler(getProjectId(), AnnotationPropertyFrameChangedEvent.TYPE, event -> handleEntityChange(event.getEntity()));
    handleAfterSetEntity(getSelectedEntity());
}
Also used : GetEntityRenderingAction(edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction) CLASS_FRAME_CHANGED(edu.stanford.bmir.protege.web.shared.event.ClassFrameChangedEvent.CLASS_FRAME_CHANGED) EventBus(com.google.web.bindery.event.shared.EventBus) SelectionModel(edu.stanford.bmir.protege.web.shared.selection.SelectionModel) HTML(com.google.gwt.user.client.ui.HTML) Inject(javax.inject.Inject) PortletUi(edu.stanford.bmir.protege.web.client.portlet.PortletUi) ScrollPanel(com.google.gwt.user.client.ui.ScrollPanel) DispatchServiceManager(edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager) edu.stanford.bmir.protege.web.shared.event(edu.stanford.bmir.protege.web.shared.event) OWLEntity(org.semanticweb.owlapi.model.OWLEntity) Optional(java.util.Optional) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) AbstractWebProtegePortletPresenter(edu.stanford.bmir.protege.web.client.portlet.AbstractWebProtegePortletPresenter) Portlet(edu.stanford.webprotege.shared.annotations.Portlet) ScrollPanel(com.google.gwt.user.client.ui.ScrollPanel)

Aggregations

HTML (com.google.gwt.user.client.ui.HTML)1 ScrollPanel (com.google.gwt.user.client.ui.ScrollPanel)1 EventBus (com.google.web.bindery.event.shared.EventBus)1 DispatchServiceManager (edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager)1 AbstractWebProtegePortletPresenter (edu.stanford.bmir.protege.web.client.portlet.AbstractWebProtegePortletPresenter)1 PortletUi (edu.stanford.bmir.protege.web.client.portlet.PortletUi)1 edu.stanford.bmir.protege.web.shared.event (edu.stanford.bmir.protege.web.shared.event)1 CLASS_FRAME_CHANGED (edu.stanford.bmir.protege.web.shared.event.ClassFrameChangedEvent.CLASS_FRAME_CHANGED)1 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)1 GetEntityRenderingAction (edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction)1 SelectionModel (edu.stanford.bmir.protege.web.shared.selection.SelectionModel)1 Portlet (edu.stanford.webprotege.shared.annotations.Portlet)1 Optional (java.util.Optional)1 Inject (javax.inject.Inject)1 OWLEntity (org.semanticweb.owlapi.model.OWLEntity)1