summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2017-02-09 11:50:31 -0500
committerbculkin2442 <bjculkin@mix.wvu.edu>2017-02-09 11:50:31 -0500
commitd2af58b0f68ebfbba2be7e7679efec6c8c0af12f (patch)
tree2b16fbf014db350126e8c1b5f081312276f85f62 /BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java
parent187e1815488e3c1ed22e7592f304e632cffefb82 (diff)
Update
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java b/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java
index 128dbfc..f7f2c26 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java
@@ -15,7 +15,8 @@ import bjc.utils.gui.layout.HLayout;
*/
public class HolderOutputPanel extends JPanel {
private static final long serialVersionUID = 166573313903782080L;
- private Timer updateTimer;
+
+ private Timer updater;
private JLabel value;
private int nDelay;
private IHolder<String> val;
@@ -40,7 +41,7 @@ public class HolderOutputPanel extends JPanel {
JLabel label = new JLabel(lab);
value = new JLabel("(stopped)");
- updateTimer = new Timer(nDelay, (event) -> {
+ updater = new Timer(nDelay, (event) -> {
value.setText(valueHolder.getValue());
});
@@ -56,7 +57,7 @@ public class HolderOutputPanel extends JPanel {
value.setText("(stopped)");
- updateTimer = new Timer(nDelay, (event) -> {
+ updater = new Timer(nDelay, (event) -> {
value.setText(val.getValue());
});
}
@@ -65,14 +66,14 @@ public class HolderOutputPanel extends JPanel {
* Start updating the contents of the field from the holder
*/
public void startUpdating() {
- updateTimer.start();
+ updater.start();
}
/**
* Stop updating the contents of the field from the holder
*/
public void stopUpdating() {
- updateTimer.stop();
+ updater.stop();
value.setText(value.getText() + " (stopped)");
}