summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-25 22:04:09 -0700
committerKeith Packard <keithp@keithp.com>2011-03-25 22:04:09 -0700
commit2c121f1ef495e8af3eb39210baa40e212b691894 (patch)
tree1ee10f8b02e1c3a676d5155dcda4a2e5cfdcdaf7
parentb155647472ddfacb07c5ffa832e4d1f4a13ad342 (diff)
altosui: swing hide/show methods are deprecated
I don't know why, but they are, so just replace them with setVisible calls. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosui/AltosAscent.java8
-rw-r--r--altosui/AltosDescent.java32
-rw-r--r--altosui/AltosLanded.java8
-rw-r--r--altosui/AltosPad.java20
4 files changed, 34 insertions, 34 deletions
diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java
index 0fbc5de2..8a4aa58b 100644
--- a/altosui/AltosAscent.java
+++ b/altosui/AltosAscent.java
@@ -89,13 +89,13 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay {
}
void show() {
- label.show();
- value.show();
+ label.setVisible(true);
+ value.setVisible(true);
}
void hide() {
- label.hide();
- value.hide();
+ label.setVisible(false);
+ value.setVisible(false);
}
public AscentValue (GridBagLayout layout, int y, String text) {
GridBagConstraints c = new GridBagConstraints();
diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java
index 594a7a09..addd6878 100644
--- a/altosui/AltosDescent.java
+++ b/altosui/AltosDescent.java
@@ -39,15 +39,15 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay {
abstract void show(AltosState state, int crc_errors);
void show() {
- label.show();
- value.show();
- lights.show();
+ label.setVisible(true);
+ value.setVisible(true);
+ lights.setVisible(true);
}
void hide() {
- label.hide();
- value.hide();
- lights.hide();
+ label.setVisible(false);
+ value.setVisible(false);
+ lights.setVisible(false);
}
void reset() {
@@ -104,13 +104,13 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay {
abstract void show(AltosState state, int crc_errors);
void show() {
- label.show();
- value.show();
+ label.setVisible(true);
+ value.setVisible(true);
}
void hide() {
- label.hide();
- value.hide();
+ label.setVisible(false);
+ value.setVisible(false);
}
void show(String format, double v) {
@@ -158,15 +158,15 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay {
}
void show() {
- label.show();
- value1.show();
- value2.show();
+ label.setVisible(true);
+ value1.setVisible(true);
+ value2.setVisible(true);
}
void hide() {
- label.hide();
- value1.hide();
- value2.hide();
+ label.setVisible(false);
+ value1.setVisible(false);
+ value2.setVisible(false);
}
abstract void show(AltosState state, int crc_errors);
diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java
index 0717ffe2..63a2daf6 100644
--- a/altosui/AltosLanded.java
+++ b/altosui/AltosLanded.java
@@ -43,13 +43,13 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay {
}
void show() {
- label.show();
- value.show();
+ label.setVisible(true);
+ value.setVisible(true);
}
void hide() {
- label.hide();
- value.hide();
+ label.setVisible(false);
+ value.setVisible(false);
}
void show(String format, double v) {
diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java
index 2f59e879..2d800e8a 100644
--- a/altosui/AltosPad.java
+++ b/altosui/AltosPad.java
@@ -43,15 +43,15 @@ public class AltosPad extends JComponent implements AltosFlightDisplay {
}
public void show() {
- label.show();
- value.show();
- lights.show();
+ label.setVisible(true);
+ value.setVisible(true);
+ lights.setVisible(true);
}
public void hide() {
- label.hide();
- value.hide();
- lights.hide();
+ label.setVisible(false);
+ value.setVisible(false);
+ lights.setVisible(false);
}
public LaunchStatus (GridBagLayout layout, int y, String text) {
@@ -96,13 +96,13 @@ public class AltosPad extends JComponent implements AltosFlightDisplay {
void show(AltosState state, int crc_errors) {}
void show() {
- label.show();
- value.show();
+ label.setVisible(true);
+ value.setVisible(true);
}
void hide() {
- label.hide();
- value.hide();
+ label.setVisible(false);
+ value.setVisible(false);
}
void reset() {