-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1895b9e
commit c0defa8
Showing
29 changed files
with
2,003 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
...rc/main/java/edu/stanford/bmir/protege/web/client/logicaldefinition/LogicalDefinition.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
.superClassTable { | ||
overflow: hidden; | ||
margin-top: 15px; | ||
border-collapse: collapse; | ||
padding: 3px; | ||
width: 50%; | ||
} | ||
|
||
.tableText { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
vertical-align: middle; | ||
} | ||
|
||
.definitionsEmptyState { | ||
height: 300px; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
|
||
.tableText > div { | ||
display: flex; | ||
justify-content: start; | ||
align-content: center; | ||
text-align: left; | ||
max-width: 350px; | ||
margin: 8px; | ||
|
||
} | ||
|
||
.logicalDefinitionDropdown { | ||
background-color: white; | ||
margin: 5px; | ||
padding: 3px; | ||
} | ||
|
||
.superClassTableHeader .tableText > div { | ||
font-size: 14px; | ||
font-weight: bold; | ||
} | ||
|
||
.customRowStyle { | ||
|
||
border-bottom: 1px solid #f2f2f2; | ||
} | ||
|
||
.removeButtonCell { | ||
width: 20px; | ||
height: 20px; | ||
align-self: center; | ||
} | ||
|
||
.removeButtonCell > div { | ||
margin-top: 2px; | ||
margin-bottom: 2px; | ||
} | ||
|
||
|
||
.superClassTableHeader { | ||
font-size: 18px; | ||
color: #fff; | ||
line-height: 1.4; | ||
background-color: #186cd4; | ||
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; | ||
} | ||
|
||
.dropDownMandatory{ | ||
color: red; | ||
margin: 2px; | ||
font-size: bold; | ||
} | ||
|
||
.dropDownAllowed { | ||
color: green; | ||
margin: 2px; | ||
font-size: bold; | ||
} | ||
|
||
.dropDownNotSet{ | ||
margin: 2px; | ||
} | ||
|
||
.superClassName { | ||
font-size: 12px; | ||
font-weight: bold; | ||
} |
64 changes: 64 additions & 0 deletions
64
...stanford/bmir/protege/web/client/logicaldefinition/LogicalDefinitionPortletPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package edu.stanford.bmir.protege.web.client.logicaldefinition; | ||
|
||
import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager; | ||
import edu.stanford.bmir.protege.web.client.lang.DisplayNameRenderer; | ||
import edu.stanford.bmir.protege.web.client.portlet.AbstractWebProtegePortletPresenter; | ||
import edu.stanford.bmir.protege.web.client.portlet.PortletUi; | ||
import edu.stanford.bmir.protege.web.client.selection.SelectionModel; | ||
import edu.stanford.bmir.protege.web.shared.event.WebProtegeEventBus; | ||
import edu.stanford.bmir.protege.web.shared.project.ProjectId; | ||
import edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction; | ||
import edu.stanford.webprotege.shared.annotations.Portlet; | ||
import org.semanticweb.owlapi.model.OWLEntity; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.inject.Inject; | ||
import java.util.Optional; | ||
|
||
@Portlet(id = "portlets.LogicalDefinition", | ||
title = "iCat-X Logical Definition", | ||
tooltip = "Displays the existing logical definitions on the current entity.") | ||
public class LogicalDefinitionPortletPresenter extends AbstractWebProtegePortletPresenter { | ||
|
||
|
||
private LogicalDefinitionPortletView view; | ||
|
||
private DispatchServiceManager dispatch; | ||
|
||
@Inject | ||
public LogicalDefinitionPortletPresenter(@Nonnull SelectionModel selectionModel, | ||
@Nonnull ProjectId projectId, | ||
@Nonnull DisplayNameRenderer displayNameRenderer, | ||
@Nonnull DispatchServiceManager dispatch, | ||
@Nonnull LogicalDefinitionPortletView view) { | ||
super(selectionModel, projectId, displayNameRenderer, dispatch); | ||
this.view = view; | ||
this.dispatch = dispatch; | ||
} | ||
|
||
@Override | ||
public void startPortlet(PortletUi portletUi, | ||
WebProtegeEventBus eventBus) { | ||
setDisplaySelectedEntityNameAsSubtitle(true); | ||
portletUi.setWidget(view.asWidget()); | ||
|
||
} | ||
|
||
@Override | ||
protected void handleReloadRequest() { | ||
|
||
} | ||
|
||
@Override | ||
protected void handleAfterSetEntity(Optional<OWLEntity> entityData) { | ||
if(!entityData.isPresent()) { | ||
setNothingSelectedVisible(true); | ||
setDisplayedEntity(Optional.empty()); | ||
} else { | ||
setNothingSelectedVisible(false); | ||
dispatch.execute(GetEntityRenderingAction.create(getProjectId(), entityData.get()), | ||
(result) -> setDisplayedEntity(Optional.of(result.getEntityData()))); | ||
view.setEntity(entityData.get(), getProjectId()); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
.../edu/stanford/bmir/protege/web/client/logicaldefinition/LogicalDefinitionPortletView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package edu.stanford.bmir.protege.web.client.logicaldefinition; | ||
|
||
import com.google.gwt.user.client.ui.AcceptsOneWidget; | ||
import com.google.gwt.user.client.ui.IsWidget; | ||
import edu.stanford.bmir.protege.web.shared.HasDispose; | ||
import edu.stanford.bmir.protege.web.shared.project.ProjectId; | ||
import org.semanticweb.owlapi.model.OWLEntity; | ||
|
||
public interface LogicalDefinitionPortletView extends AcceptsOneWidget, IsWidget, HasDispose { | ||
|
||
void setEntity(OWLEntity owlEntity, ProjectId projectId); | ||
} |
Oops, something went wrong.