Skip to content
Snippets Groups Projects
Commit 9e493022 authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Added context menu and menu items for edit and delete

parent a639a4e5
No related branches found
No related tags found
1 merge request!43Merging frontend-testing into master
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<?import javafx.scene.chart.PieChart?> <?import javafx.scene.chart.PieChart?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?> <?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.ContextMenu?>
<?import javafx.scene.control.DatePicker?> <?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.MenuButton?> <?import javafx.scene.control.MenuButton?>
...@@ -71,6 +72,14 @@ ...@@ -71,6 +72,14 @@
<columnResizePolicy> <columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy> </columnResizePolicy>
<contextMenu>
<ContextMenu>
<items>
<MenuItem fx:id="editIncomeMenu" mnemonicParsing="false" onAction="#handleEditBtn" text="Edit" />
<MenuItem fx:id="deleteIncomeMenu" mnemonicParsing="false" onAction="#handleDeleteBtn" text="Delete" />
</items>
</ContextMenu>
</contextMenu>
</TableView> </TableView>
<Rectangle arcHeight="5.0" arcWidth="5.0" disable="true" fill="LIME" height="234.0" opacity="0.1" stroke="#d9cccc" strokeType="INSIDE" translateY="13.0" width="300.0" /> <Rectangle arcHeight="5.0" arcWidth="5.0" disable="true" fill="LIME" height="234.0" opacity="0.1" stroke="#d9cccc" strokeType="INSIDE" translateY="13.0" width="300.0" />
<PieChart fx:id="incomePieChart" disable="true" opacity="0.0" prefHeight="1.0" prefWidth="1.0" visible="false" /> <PieChart fx:id="incomePieChart" disable="true" opacity="0.0" prefHeight="1.0" prefWidth="1.0" visible="false" />
...@@ -115,6 +124,14 @@ ...@@ -115,6 +124,14 @@
<columnResizePolicy> <columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy> </columnResizePolicy>
<contextMenu>
<ContextMenu>
<items>
<MenuItem fx:id="editExpenseMenu" mnemonicParsing="false" onAction="#handleEditBtn" text="Edit" />
<MenuItem fx:id="deleteExpenseMenu" mnemonicParsing="false" onAction="#handleDeleteBtn" text="Delete" />
</items>
</ContextMenu>
</contextMenu>
</TableView> </TableView>
<Rectangle arcHeight="5.0" arcWidth="5.0" disable="true" fill="RED" height="234.0" opacity="0.1" stroke="RED" strokeType="INSIDE" translateY="13.0" width="300.0" /> <Rectangle arcHeight="5.0" arcWidth="5.0" disable="true" fill="RED" height="234.0" opacity="0.1" stroke="RED" strokeType="INSIDE" translateY="13.0" width="300.0" />
<PieChart fx:id="expensePieChart" disable="true" opacity="0.0" prefHeight="1.0" prefWidth="1.0" visible="false" /> <PieChart fx:id="expensePieChart" disable="true" opacity="0.0" prefHeight="1.0" prefWidth="1.0" visible="false" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment