altosui: swing hide/show methods are deprecated
authorKeith Packard <keithp@keithp.com>
Sat, 26 Mar 2011 05:04:09 +0000 (22:04 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 26 Mar 2011 05:04:09 +0000 (22:04 -0700)
I don't know why, but they are, so just replace them with
setVisible calls.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosAscent.java
altosui/AltosDescent.java
altosui/AltosLanded.java
altosui/AltosPad.java

index 0fbc5de26f837d3da4fc2ebaf2b856ef3905e8a7..8a4aa58b02de03234e4d070886ceaf208f84dcb6 100644 (file)
@@ -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();
index 594a7a09bb68cc71e9fd025b93134439fb434e94..addd687810e4622352df37c3ad987a70b6791a69 100644 (file)
@@ -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);
index 0717ffe284243f993381ce4f153aadc810027db6..63a2daf602ff091ec46857e4a76090b39f3b40ae 100644 (file)
@@ -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) {
index 2f59e879a38d00e981733b2ab38d6826da8b47ae..2d800e8aae2768ffe64ad2fe11aaa18a55a2566c 100644 (file)
@@ -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() {