summaryrefslogtreecommitdiff
path: root/src/com/delwink/icebox/swing/MainWindow.java
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2016-11-24 14:53:34 -0600
committerDavid McMackins II <contact@mcmackins.org>2016-11-24 14:53:34 -0600
commit682547a6507d8004325f828411439b322b646034 (patch)
tree1f61bc5c6dcf1cf8c785286585f46488d2101e49 /src/com/delwink/icebox/swing/MainWindow.java
parentb7591486530967a54b0c71a1577591767bfbe23e (diff)
Add quantity update interface
Diffstat (limited to 'src/com/delwink/icebox/swing/MainWindow.java')
-rw-r--r--src/com/delwink/icebox/swing/MainWindow.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/delwink/icebox/swing/MainWindow.java b/src/com/delwink/icebox/swing/MainWindow.java
index d5dd8ee..b74d57a 100644
--- a/src/com/delwink/icebox/swing/MainWindow.java
+++ b/src/com/delwink/icebox/swing/MainWindow.java
@@ -162,7 +162,17 @@ public class MainWindow extends JFrame {
UPDATE_BUTTON.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
- throw new UnsupportedOperationException("Not supported yet.");
+ QuantityUpdateDialog dialog = new QuantityUpdateDialog(MainWindow.this, INVENTORY);
+
+ dialog.addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosed(WindowEvent e) {
+ INVENTORY.refreshQuantities();
+ INVENTORY_TABLE.setModel(new MainWindowTableModel(INVENTORY, REORDER_ONLY.isSelected()));
+ }
+ });
+
+ dialog.setVisible(true);
}
});