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