corefx - moved mobility player to bottom, added mobility configuration to emane nodes
This commit is contained in:
parent
bee94456e0
commit
ac81b7c81a
4 changed files with 13 additions and 8 deletions
|
@ -46,6 +46,8 @@ public class Controller implements Initializable {
|
|||
private static final Logger logger = LogManager.getLogger();
|
||||
@FXML private StackPane stackPane;
|
||||
@FXML private BorderPane borderPane;
|
||||
@FXML private VBox top;
|
||||
@FXML private VBox bottom;
|
||||
@FXML private SwingNode swingNode;
|
||||
@FXML private MenuItem saveXmlMenuItem;
|
||||
@FXML private JFXProgressBar progressBar;
|
||||
|
@ -103,21 +105,19 @@ public class Controller implements Initializable {
|
|||
|
||||
public void sessionStarted() {
|
||||
// configure and add mobility player
|
||||
VBox vBox = (VBox) borderPane.getTop();
|
||||
CoreNode node = mobilityDialog.getNode();
|
||||
if (node != null) {
|
||||
MobilityConfig mobilityConfig = mobilityDialog.getMobilityScripts().get(node.getId());
|
||||
if (mobilityConfig != null) {
|
||||
mobilityPlayer.show(node, mobilityConfig);
|
||||
vBox.getChildren().add(mobilityPlayer);
|
||||
bottom.getChildren().add(mobilityPlayer);
|
||||
}
|
||||
}
|
||||
saveXmlMenuItem.setDisable(false);
|
||||
}
|
||||
|
||||
public void sessionStopped() {
|
||||
VBox vBox = (VBox) borderPane.getTop();
|
||||
vBox.getChildren().remove(mobilityPlayer);
|
||||
bottom.getChildren().remove(mobilityPlayer);
|
||||
saveXmlMenuItem.setDisable(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,8 @@ public class CorePopupGraphMousePlugin<V, E> extends EditingPopupGraphMousePlugi
|
|||
case NodeType.EMANE:
|
||||
menuItems.add(createMenuItem("EMANE Settings",
|
||||
event -> controller.getNodeEmaneDialog().showDialog(node)));
|
||||
menuItems.add(createMenuItem("Mobility",
|
||||
event -> controller.getMobilityDialog().showDialog(node)));
|
||||
menuItems.add(createMenuItem("Link MDRs",
|
||||
event -> networkGraph.linkMdrs(node)));
|
||||
break;
|
||||
|
|
|
@ -81,7 +81,7 @@ public class GraphToolbar extends VBox {
|
|||
pickingButton.setTooltip(new Tooltip("Pick/Move Nodes"));
|
||||
pickingButton.setOnAction(event -> {
|
||||
controller.getNetworkGraph().setMode(ModalGraphMouse.Mode.PICKING);
|
||||
controller.getBorderPane().setBottom(null);
|
||||
controller.getBottom().getChildren().remove(controller.getAnnotationToolbar());
|
||||
controller.getBorderPane().setRight(null);
|
||||
setSelected(true, pickingButton);
|
||||
setSelected(false, editingButton, drawingButton, selectedEditButton);
|
||||
|
@ -96,7 +96,7 @@ public class GraphToolbar extends VBox {
|
|||
editingButton.setTooltip(new Tooltip("Edit Graph"));
|
||||
editingButton.setOnAction(event -> {
|
||||
controller.getNetworkGraph().setMode(ModalGraphMouse.Mode.EDITING);
|
||||
controller.getBorderPane().setBottom(null);
|
||||
controller.getBottom().getChildren().remove(controller.getAnnotationToolbar());
|
||||
controller.getBorderPane().setRight(null);
|
||||
setSelected(true, editingButton, selectedEditButton);
|
||||
setSelected(false, drawingButton, pickingButton);
|
||||
|
@ -111,7 +111,7 @@ public class GraphToolbar extends VBox {
|
|||
drawingButton.setTooltip(new Tooltip("Annotate Graph"));
|
||||
drawingButton.setOnAction(event -> {
|
||||
controller.getNetworkGraph().setMode(ModalGraphMouse.Mode.ANNOTATING);
|
||||
controller.getBorderPane().setBottom(controller.getAnnotationToolbar());
|
||||
controller.getBottom().getChildren().add(controller.getAnnotationToolbar());
|
||||
controller.getBorderPane().setRight(null);
|
||||
setSelected(true, drawingButton);
|
||||
setSelected(false, editingButton, pickingButton, selectedEditButton);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<children>
|
||||
<BorderPane fx:id="borderPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0">
|
||||
<top>
|
||||
<VBox BorderPane.alignment="CENTER">
|
||||
<VBox fx:id="top" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<MenuBar>
|
||||
<menus>
|
||||
|
@ -70,6 +70,9 @@
|
|||
</children>
|
||||
</AnchorPane>
|
||||
</center>
|
||||
<bottom>
|
||||
<VBox fx:id="bottom" spacing="5.0" BorderPane.alignment="CENTER" />
|
||||
</bottom>
|
||||
</BorderPane>
|
||||
</children>
|
||||
</StackPane>
|
||||
|
|
Loading…
Reference in a new issue