mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-23 07:50: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";
|
||||
|
||||
@FXML
|
||||
private TabPane coreTabPane;
|
||||
@FXML
|
||||
private Tab calculateTab;
|
||||
@FXML
|
||||
private Tab settingsTab;
|
||||
@FXML
|
||||
private TableView<HistoryModel> historyTable;
|
||||
@FXML
|
||||
|
@ -143,6 +149,9 @@ public class AbacusController implements PluginListener {
|
|||
parsedColumn.setCellValueFactory(cell -> cell.getValue().parsedProperty());
|
||||
outputColumn.setCellFactory(cellFactory);
|
||||
outputColumn.setCellValueFactory(cell -> cell.getValue().outputProperty());
|
||||
coreTabPane.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if(oldValue.equals(settingsTab)) alertIfApplyNeeded(true);
|
||||
});
|
||||
|
||||
abacus = new Abacus();
|
||||
abacus.getPluginManager().addListener(this);
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="org.nwapw.abacus.fx.AbacusController">
|
||||
<center>
|
||||
<TabPane>
|
||||
<Tab text="Calculator" closable="false">
|
||||
<TabPane fx:id="coreTabPane">
|
||||
<Tab fx:id="calculateTab" text="Calculator" closable="false">
|
||||
<BorderPane>
|
||||
<center>
|
||||
<TableView fx:id="historyTable">
|
||||
|
@ -41,7 +41,7 @@
|
|||
</bottom>
|
||||
</BorderPane>
|
||||
</Tab>
|
||||
<Tab text="Settings" closable="false">
|
||||
<Tab fx:id="settingsTab" text="Settings" closable="false">
|
||||
<GridPane hgap="10" vgap="10">
|
||||
<padding><Insets left="10" right="10" top="10" bottom="10"/></padding>
|
||||
<Label text="Number Implementation" GridPane.columnIndex="0" GridPane.rowIndex="0"/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user