From db4853b51d39a439cc85b478710282749c0b5112 Mon Sep 17 00:00:00 2001 From: Arthur Coolen <coolen@astron.nl> Date: Mon, 17 Dec 2012 09:57:47 +0000 Subject: [PATCH] Task #1771: minor changes --- .../src/nl/astron/lofar/lofarutils/DateTimeChooser.form | 6 +++--- .../src/nl/astron/lofar/lofarutils/DateTimeChooser.java | 4 ++-- .../inputfieldbuilder/test/inputFieldBuilderTest.form | 2 +- .../inputfieldbuilder/test/inputFieldBuilderTest.java | 2 +- .../src/nl/astron/lofar/lofarutils/remoteFile.java | 6 +++--- .../lofar/lofarutils/validation/AbstractValidator.java | 4 ++++ .../astron/lofar/lofarutils/validation/BoolValidator.java | 1 + .../lofar/lofarutils/validation/BoolVectorValidator.java | 1 + 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.form b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.form index db94b612022..da19e9086ca 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.form +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> @@ -20,7 +20,7 @@ <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <Component id="calendar" pref="294" max="32767" attributes="1"/> + <Component id="calendar" pref="365" max="32767" attributes="1"/> <EmptySpace max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> @@ -30,7 +30,7 @@ <Group type="102" alignment="1" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <Component id="jLabel1" pref="52" max="32767" attributes="0"/> + <Component id="jLabel1" pref="120" max="32767" attributes="0"/> <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.java b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.java index d69d39889a4..cb9b61f2e22 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.java +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/DateTimeChooser.java @@ -42,7 +42,7 @@ import javax.swing.event.EventListenerList; * * Minor changes to adepts to LOFAR */ -public class DateTimeChooser +public final class DateTimeChooser extends javax.swing.JPanel { @@ -340,7 +340,7 @@ public class DateTimeChooser try { aD=aDate.parse(aS); } catch (ParseException ex) { - ex.printStackTrace(); + System.out.println(ex.getMessage()); } DateTimeChooser.this.setDate(aD,false); }//GEN-LAST:event_nowActionPerformed diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.form b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.form index a16ee166ecf..6aeb13859b9 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.form +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.java b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.java index 33d1360fffc..4d994b85f6f 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.java +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/inputfieldbuilder/test/inputFieldBuilderTest.java @@ -11,7 +11,6 @@ package nl.astron.lofar.lofarutils.inputfieldbuilder.test; -import javax.swing.JFrame; import javax.swing.JPanel; /** @@ -126,6 +125,7 @@ public class inputFieldBuilderTest extends javax.swing.JFrame { */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { + @Override public void run() { new inputFieldBuilderTest().setVisible(true); } diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/remoteFile.java b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/remoteFile.java index 004cdfd73fe..7c69b46b3c9 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/remoteFile.java +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/remoteFile.java @@ -47,6 +47,7 @@ public class remoteFile implements remoteFileInterface{ itsName=ext; } + @Override public boolean deleteTempFile(String aFileName) throws RemoteException { if (aFileName != null) { try { @@ -60,7 +61,6 @@ public class remoteFile implements remoteFileInterface{ } } catch (Exception ex) { System.out.println("RemoteFileImpl: " + ex.getMessage()); - ex.printStackTrace(); return false; } } else { @@ -69,6 +69,7 @@ public class remoteFile implements remoteFileInterface{ } } + @Override public byte[] downloadFile(String aFileName) throws RemoteException { if (aFileName != null) { try { @@ -81,7 +82,6 @@ public class remoteFile implements remoteFileInterface{ return(buffer); } catch (Exception ex) { System.out.println("RemoteFileImpl: " + ex.getMessage()); - ex.printStackTrace(); return(null); } } else { @@ -90,6 +90,7 @@ public class remoteFile implements remoteFileInterface{ } } + @Override public boolean uploadFile(byte[] buffer,String aFileName) throws RemoteException { boolean succes=false; if (buffer != null && aFileName.length() > 0) { @@ -103,7 +104,6 @@ public class remoteFile implements remoteFileInterface{ return(true); } catch (Exception ex) { System.out.println("RemoteFileAdapter: " + ex.getMessage()); - ex.printStackTrace(); return(succes); } } else { diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/AbstractValidator.java b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/AbstractValidator.java index a1a495d54f6..04fec939e2e 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/AbstractValidator.java +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/AbstractValidator.java @@ -85,6 +85,7 @@ public abstract class AbstractValidator extends InputVerifier implements KeyList * validationCriteria() instead. */ + @Override public boolean verify(JComponent c) { // System.out.println("AbstractValidator-entered verify. Component-"+ c.getName()+" popup.visible: "+popup.isVisible()); popup.setVisible(false); @@ -129,6 +130,7 @@ public abstract class AbstractValidator extends InputVerifier implements KeyList * @see KeyListener */ + @Override public void keyPressed(KeyEvent e) { checkPopup(); } @@ -137,12 +139,14 @@ public abstract class AbstractValidator extends InputVerifier implements KeyList * @see KeyListener */ + @Override public void keyTyped(KeyEvent e) {} /** * @see KeyListener */ + @Override public void keyReleased(KeyEvent e) {} public boolean isVisible() { diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolValidator.java b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolValidator.java index 19db4313e3b..aeedcefa400 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolValidator.java +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolValidator.java @@ -22,6 +22,7 @@ public class BoolValidator extends AbstractValidator { super(parent, c, message); } + @Override protected boolean validationCriteria(JComponent c) { String input = ((JTextField)c).getText(); diff --git a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolVectorValidator.java b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolVectorValidator.java index 24ae5ec05f0..b873e8ded47 100644 --- a/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolVectorValidator.java +++ b/JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/BoolVectorValidator.java @@ -21,6 +21,7 @@ public class BoolVectorValidator extends AbstractValidator { super(parent, c, ""); } + @Override protected boolean validationCriteria(JComponent c) { String input = ((JTextField)c).getText(); -- GitLab