-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 87 - Display standard networks in powsybl-dev-tools #92
Issue 87 - Display standard networks in powsybl-dev-tools #92
Conversation
0eda12c
to
2887ce2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice feature I wanted to add for ages! just the way to get the network should be done differently.
diagram-viewer/src/main/java/com/powsybl/diagram/viewer/MainViewController.java
Show resolved
Hide resolved
Signed-off-by: Thomas ADAM <[email protected]>
Signed-off-by: Thomas ADAM <[email protected]>
Signed-off-by: Thomas ADAM <[email protected]>
Signed-off-by: Thomas ADAM <[email protected]>
2887ce2
to
dda21b9
Compare
Signed-off-by: Thomas ADAM <[email protected]>
71455a0
to
d89b49e
Compare
diagram-viewer/src/main/java/com/powsybl/diagram/viewer/MainViewController.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Thomas ADAM <[email protected]>
@@ -152,6 +156,37 @@ public TreeItem<Container<?>> fromString(String string) { | |||
sldViewController.addListener((observable, oldValue, newValue) -> updateSldDiagrams()); | |||
} | |||
|
|||
private void initializeNetworkFactories() { | |||
Map<String, Supplier<Network>> suppliers = new HashMap<>(); | |||
suppliers.put("BatteryNetwork", com.powsybl.iidm.network.test.BatteryNetworkFactory::create); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add import com.powsybl.iidm.network.test.*;
so that these lines are more compact?
@@ -14,6 +14,7 @@ | |||
<Button fx:id="loadingStatus" minWidth="28" style="-fx-background-color: red"/> | |||
<TextField fx:id="filePath" prefWidth="900" HBox.hgrow="ALWAYS" maxWidth="Infinity"/> | |||
<Button onMouseClicked="#onClickLoadFile" text="..."/> | |||
<MenuButton fx:id="networkFactoryMenuButton" text="Networks" minWidth="100"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe just rename "Networks"
into something like "Sample networks"
?
Signed-off-by: Thomas ADAM <[email protected]>
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
'Fixes #87'