Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
ralambotianamio committed Oct 29, 2018
1 parent 4682891 commit 75f2870
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private static TreeItem<Object> createItem(Contingency contingency) {
return contingencyItem;
}

private ContingencyElement createElement(EquipmentInfo equipmentInfo) {
private static ContingencyElement createElement(EquipmentInfo equipmentInfo) {
switch (equipmentInfo.getType()) {
case "BUSBAR_SECTION":
return new BusbarSectionContingency(equipmentInfo.getIdAndName().getId());
Expand All @@ -131,6 +131,8 @@ private ContingencyElement createElement(EquipmentInfo equipmentInfo) {

case "LINE":
case "TWO_WINDINGS_TRANSFORMER":
return new BranchContingency(equipmentInfo.getIdAndName().getId());

case "BRANCH":
return new BranchContingency(equipmentInfo.getIdAndName().getId());

Expand All @@ -139,7 +141,7 @@ private ContingencyElement createElement(EquipmentInfo equipmentInfo) {
}
}

private EquipmentInfo createEquipmentInfo(ContingencyElement contingencyElement) {
private static EquipmentInfo createEquipmentInfo(ContingencyElement contingencyElement) {
ContingencyElementType type = contingencyElement.getType();
if (type.equals(ContingencyElementType.BUSBAR_SECTION)) {
return new EquipmentInfo(new IdAndName(contingencyElement.getId(), contingencyElement.getId()), "BUSBAR_SECTION");
Expand Down Expand Up @@ -171,6 +173,7 @@ public ContingencyStoreEditor(ContingencyStore store) {

contingencyTree.setCellFactory(param -> new ContingencyTreeCell());
contingencyTree.setShowRoot(false);

contingencyTree.setOnDragOver(event -> {
Dragboard db = event.getDragboard();
if (db.hasContent(EquipmentInfo.DATA_FORMAT)) {
Expand Down

0 comments on commit 75f2870

Please sign in to comment.