Moved Balance to separate window
This commit is contained in:
68
src/main/resources/assets/jfx/balance.fxml
Normal file
68
src/main/resources/assets/jfx/balance.fxml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.chart.LineChart?>
|
||||
<?import javafx.scene.chart.NumberAxis?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<TabPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" tabClosingPolicy="UNAVAILABLE" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/9.0.1">
|
||||
<tabs>
|
||||
<Tab text="%game.balance.history">
|
||||
<content>
|
||||
<TableView fx:id="balanceHistoryTable" prefHeight="200.0" prefWidth="200.0">
|
||||
<columns>
|
||||
<TableColumn prefWidth="50.666626400416135" styleClass="align-right" text="%game.balance.history.index" />
|
||||
<TableColumn editable="false" maxWidth="500.0" prefWidth="100.0" styleClass="align-right" text="%game.balance.history.change" />
|
||||
<TableColumn maxWidth="1.7976931348623157E308" prefWidth="300.0" text="%game.balance.history.type" />
|
||||
</columns>
|
||||
<placeholder>
|
||||
<Label text="%game.balance.history.no-data" />
|
||||
</placeholder>
|
||||
</TableView>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab fx:id="chartTab" text="%game.balance.chart">
|
||||
<content>
|
||||
<VBox>
|
||||
<children>
|
||||
<HBox fillHeight="false" maxWidth="1.7976931348623157E308" styleClass="tab-info-bar">
|
||||
<children>
|
||||
<Label fx:id="totalIncomeLabel" styleClass="green" text="Label">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
<HBox.margin>
|
||||
<Insets right="20.0" />
|
||||
</HBox.margin>
|
||||
</Label>
|
||||
<Label fx:id="totalLossLabel" styleClass="red" text="Label">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="20.0" right="20.0" top="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<LineChart fx:id="budgetChart" verticalGridLinesVisible="false">
|
||||
<xAxis>
|
||||
<NumberAxis minorTickVisible="false" side="BOTTOM" tickLabelsVisible="false" tickMarkVisible="false" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</LineChart>
|
||||
</children>
|
||||
</VBox>
|
||||
</content>
|
||||
</Tab>
|
||||
</tabs>
|
||||
</TabPane>
|
||||
@@ -1,22 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.chart.LineChart?>
|
||||
<?import javafx.scene.chart.NumberAxis?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.ToolBar?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
@@ -27,6 +20,7 @@
|
||||
<children>
|
||||
<ToolBar maxWidth="1.7976931348623157E308" prefHeight="40.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
|
||||
<items>
|
||||
<Button fx:id="balanceButton" mnemonicParsing="false" text="%game.balance" />
|
||||
<Label fx:id="budgetLabel" text="%game.budget">
|
||||
<font>
|
||||
<Font size="19.0" />
|
||||
@@ -40,7 +34,7 @@
|
||||
<Button alignment="CENTER" mnemonicParsing="false" onMouseClicked="#scheduleStop" styleClass="red" text="%game.quit" textFill="WHITE" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="7.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<SplitPane dividerPositions="0.3659147869674185" maxHeight="1.7976931348623157E308" VBox.vgrow="ALWAYS">
|
||||
<SplitPane dividerPositions="0.3140277777777778" maxHeight="1.7976931348623157E308" VBox.vgrow="ALWAYS">
|
||||
<items>
|
||||
<GridPane minWidth="250.0" styleClass="side-pane">
|
||||
<columnConstraints>
|
||||
@@ -89,61 +83,7 @@
|
||||
</Button>
|
||||
</children>
|
||||
</GridPane>
|
||||
<TabPane minWidth="450.0" tabClosingPolicy="UNAVAILABLE" tabMaxHeight="Infinity" tabMaxWidth="Infinity">
|
||||
<tabs>
|
||||
<Tab fx:id="storageTab" text="%game.storage" />
|
||||
<Tab text="%game.balance.history">
|
||||
<content>
|
||||
<TableView fx:id="balanceHistoryTable" prefHeight="200.0" prefWidth="200.0">
|
||||
<columns>
|
||||
<TableColumn prefWidth="50.666626400416135" styleClass="align-right" text="%game.balance.history.index" />
|
||||
<TableColumn editable="false" maxWidth="500.0" prefWidth="100.0" styleClass="align-right" text="%game.balance.history.change" />
|
||||
<TableColumn maxWidth="1.7976931348623157E308" prefWidth="300.0" text="%game.balance.history.type" />
|
||||
</columns>
|
||||
<placeholder>
|
||||
<Label text="%game.balance.history.no-data" />
|
||||
</placeholder>
|
||||
</TableView>
|
||||
</content>
|
||||
</Tab>
|
||||
<Tab fx:id="chartTab" onSelectionChanged="#onChartTabSelected" text="%game.balance.chart">
|
||||
<content>
|
||||
<VBox>
|
||||
<children>
|
||||
<HBox fillHeight="false" maxWidth="1.7976931348623157E308" styleClass="tab-info-bar">
|
||||
<children>
|
||||
<Label fx:id="totalIncomeLabel" styleClass="green" text="Label">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
<HBox.margin>
|
||||
<Insets right="20.0" />
|
||||
</HBox.margin>
|
||||
</Label>
|
||||
<Label fx:id="totalLossLabel" styleClass="red" text="Label">
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="20.0" right="20.0" top="5.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<LineChart fx:id="budgetChart" verticalGridLinesVisible="false">
|
||||
<xAxis>
|
||||
<NumberAxis minorTickVisible="false" side="BOTTOM" tickLabelsVisible="false" tickMarkVisible="false" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis side="LEFT" />
|
||||
</yAxis>
|
||||
</LineChart>
|
||||
</children>
|
||||
</VBox>
|
||||
</content>
|
||||
</Tab>
|
||||
</tabs>
|
||||
</TabPane>
|
||||
<AnchorPane fx:id="storagePane" />
|
||||
</items>
|
||||
</SplitPane>
|
||||
</children>
|
||||
|
||||
@@ -9,6 +9,7 @@ game.trash = Recycle Bin
|
||||
game.trash.hover = Destroy\n%d$
|
||||
game.storage = Storage
|
||||
game.storage.empty = Empty
|
||||
game.balance = Balance
|
||||
game.balance.history = Transactions
|
||||
game.balance.history.no-data = No transactions yet
|
||||
game.balance.history.index =
|
||||
|
||||
Reference in New Issue
Block a user