add context menu to stations screen
This commit is contained in:
@@ -189,12 +189,18 @@ public class OffersController {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void addStation() {
|
private void addStation() {
|
||||||
Screeners.showAddStation(getSystem());
|
SystemModel s = getSystem();
|
||||||
|
if (!ModelFabric.isFake(s)){
|
||||||
|
Screeners.showAddStation(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void editStation() {
|
private void editStation() {
|
||||||
Screeners.showEditStation(getStation());
|
StationModel s = getStation();
|
||||||
|
if (!ModelFabric.isFake(s)){
|
||||||
|
Screeners.showEditStation(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,16 @@
|
|||||||
<TextField fx:id="systemText" />
|
<TextField fx:id="systemText" />
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<TitledPane VBox.vgrow="ALWAYS" text="%market.stations" collapsible="false">
|
<TitledPane VBox.vgrow="ALWAYS" text="%market.stations" collapsible="false">
|
||||||
<ListView fx:id="stationsList"/>
|
<ListView fx:id="stationsList">
|
||||||
|
<contextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<items>
|
||||||
|
<MenuItem text="%main.menu.edit.addStation" onAction="#addStation" />
|
||||||
|
<MenuItem text="%main.menu.edit.editStation" onAction="#editStation" />
|
||||||
|
</items>
|
||||||
|
</ContextMenu>
|
||||||
|
</contextMenu>
|
||||||
|
</ListView>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
</VBox>
|
</VBox>
|
||||||
<TitledPane fx:id="stationPane" GridPane.columnIndex="1" maxHeight="60" collapsible="false">
|
<TitledPane fx:id="stationPane" GridPane.columnIndex="1" maxHeight="60" collapsible="false">
|
||||||
|
|||||||
Reference in New Issue
Block a user