mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-23 16:00:09 -08:00
Add the apply warnings when switching tabs.
This commit is contained in:
parent
963871d7b6
commit
5ff494605e
|
@ -46,6 +46,12 @@ public class AbacusController implements PluginListener {
|
||||||
*/
|
*/
|
||||||
private static final String ERR_EVAL = "Evaluation Error";
|
private static final String ERR_EVAL = "Evaluation Error";
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TabPane coreTabPane;
|
||||||
|
@FXML
|
||||||
|
private Tab calculateTab;
|
||||||
|
@FXML
|
||||||
|
private Tab settingsTab;
|
||||||
@FXML
|
@FXML
|
||||||
private TableView<HistoryModel> historyTable;
|
private TableView<HistoryModel> historyTable;
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -143,6 +149,9 @@ public class AbacusController implements PluginListener {
|
||||||
parsedColumn.setCellValueFactory(cell -> cell.getValue().parsedProperty());
|
parsedColumn.setCellValueFactory(cell -> cell.getValue().parsedProperty());
|
||||||
outputColumn.setCellFactory(cellFactory);
|
outputColumn.setCellFactory(cellFactory);
|
||||||
outputColumn.setCellValueFactory(cell -> cell.getValue().outputProperty());
|
outputColumn.setCellValueFactory(cell -> cell.getValue().outputProperty());
|
||||||
|
coreTabPane.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
if(oldValue.equals(settingsTab)) alertIfApplyNeeded(true);
|
||||||
|
});
|
||||||
|
|
||||||
abacus = new Abacus();
|
abacus = new Abacus();
|
||||||
abacus.getPluginManager().addListener(this);
|
abacus.getPluginManager().addListener(this);
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml"
|
||||||
fx:controller="org.nwapw.abacus.fx.AbacusController">
|
fx:controller="org.nwapw.abacus.fx.AbacusController">
|
||||||
<center>
|
<center>
|
||||||
<TabPane>
|
<TabPane fx:id="coreTabPane">
|
||||||
<Tab text="Calculator" closable="false">
|
<Tab fx:id="calculateTab" text="Calculator" closable="false">
|
||||||
<BorderPane>
|
<BorderPane>
|
||||||
<center>
|
<center>
|
||||||
<TableView fx:id="historyTable">
|
<TableView fx:id="historyTable">
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
</bottom>
|
</bottom>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab text="Settings" closable="false">
|
<Tab fx:id="settingsTab" text="Settings" closable="false">
|
||||||
<GridPane hgap="10" vgap="10">
|
<GridPane hgap="10" vgap="10">
|
||||||
<padding><Insets left="10" right="10" top="10" bottom="10"/></padding>
|
<padding><Insets left="10" right="10" top="10" bottom="10"/></padding>
|
||||||
<Label text="Number Implementation" GridPane.columnIndex="0" GridPane.rowIndex="0"/>
|
<Label text="Number Implementation" GridPane.columnIndex="0" GridPane.rowIndex="0"/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user