← Back to team overview

dhis-mobile-devs team mailing list archive

[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 193: remove unuse code

 

------------------------------------------------------------
revno: 193
committer: Hong Em <em.hispvietnam@xxxxxxxxx>
branch nick: lwuit-tracking
timestamp: Tue 2014-01-14 16:48:15 +0700
message:
  remove unuse code
modified:
  src/org/hisp/dhis/mobile/view/PersonRegistrationView.java


--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking

Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'src/org/hisp/dhis/mobile/view/PersonRegistrationView.java'
--- src/org/hisp/dhis/mobile/view/PersonRegistrationView.java	2014-01-08 09:59:33 +0000
+++ src/org/hisp/dhis/mobile/view/PersonRegistrationView.java	2014-01-14 09:48:15 +0000
@@ -7,7 +7,6 @@
 import org.hisp.dhis.mobile.connection.ConnectionManager;
 import org.hisp.dhis.mobile.midlet.DHISMIDlet;
 import org.hisp.dhis.mobile.midlet.NameBasedMIDlet;
-import org.hisp.dhis.mobile.model.LinkButton;
 import org.hisp.dhis.mobile.model.Patient;
 import org.hisp.dhis.mobile.model.PatientAttribute;
 import org.hisp.dhis.mobile.model.PatientIdentifier;
@@ -19,10 +18,8 @@
 import com.sun.lwuit.ComboBox;
 import com.sun.lwuit.Command;
 import com.sun.lwuit.Component;
-import com.sun.lwuit.Dialog;
 import com.sun.lwuit.Form;
 import com.sun.lwuit.Label;
-import com.sun.lwuit.TextArea;
 import com.sun.lwuit.TextField;
 import com.sun.lwuit.animations.CommonTransitions;
 import com.sun.lwuit.events.ActionEvent;
@@ -39,12 +36,6 @@
 
     private Label fullNameLabel;
 
-    // private Label genderLabel;
-
-    // private Label dateOfBirthLabel;
-
-    // private Label phoneNumberLabel;
-
     private Label patientIdentifierLabel;
 
     private Label patientAttributeLabel;
@@ -55,14 +46,6 @@
 
     private TextField fullNameTextField;
 
-    // private ComboBox genderComboBox;
-
-    // private ComboBox dateOfBirthComboBox;
-
-    // private TextField dateOfBirthTextFiled;
-
-    // private TextField phoneNumberTextField;
-
     private TextField patientIdentifierTextField;
 
     private TextField patientAttributeTextField;
@@ -77,18 +60,6 @@
 
     private NameBasedMIDlet nameBasedMIDlet;
 
-    // private static Character APPROXIMATED = new Character( 'A' );
-    //
-    // private static Character DECLARED = new Character( 'D' );
-    //
-    // private static Character VERIFIED = new Character( 'V' );
-    //
-    // private static String MALE = new String( "M" );
-    //
-    // private static String FEMALE = new String( "F" );
-    //
-    // private static String TRANSGENDER = new String( "T" );
-
     private Vector patientIdentifierValueVector = new Vector();
 
     private Vector patientAttributeValueVector = new Vector();
@@ -137,41 +108,8 @@
         System.gc();
 
         fullNameLabel = new Label( "Fullname(*)" );
-        // genderLabel = new Label( Text.GENDER() );
-        // dateOfBirthLabel = new Label( Text.DATE_OF_BIRTH() + " (*)" );
-        // phoneNumberLabel = new Label( Text.PHONE_NUMBER() );
-
-        // String genders[] = { "Female", "Male", "Transgender" };
-        // String dateofBirths[] = { "Approximated", "Declared", "Verified" };
 
         fullNameTextField = new TextField();
-        // genderComboBox = new ComboBox( genders );
-        // dateOfBirthComboBox = new ComboBox( dateofBirths );
-        // dateOfBirthTextFiled = new TextField();
-        // phoneNumberTextField = new TextField();
-        // phoneNumberTextField.setConstraint( TextField.NUMERIC );
-        // phoneNumberTextField.setInputModeOrder( new String[] { "123" } );
-
-        // LinkButton dobTypeDefinitionLink = new LinkButton(
-        // Text.DOBTYPE_DEFINITION() );
-        // dobTypeDefinitionLink.addActionListener( new ActionListener()
-        // {
-        // public void actionPerformed( ActionEvent arg0 )
-        // {
-        // Dialog dobDialog = new Dialog( Text.DOBTYPE_DEFINITION() );
-        // dobDialog.setScrollable( false );
-        // Command closeCommand = new Command( Text.CLOSE() );
-        // TextArea definitionTextArea = new TextArea(
-        // Text.DATE_OF_BIRTH_TYPE_DEFINITION() );
-        // definitionTextArea.setFocusable( false );
-        // dobDialog.addComponent( definitionTextArea );
-        // dobDialog.addCommand( closeCommand );
-        // dobDialog.show();
-        // }
-        // } );
-
-        // Hide full name text field in Uganda case
-        // mainForm.addComponent( getRequiredLabel() );
         mainForm.addComponent( fullNameLabel );
         mainForm.addComponent( getFullNameTextField() );
         fullNameTextField.requestFocus();
@@ -219,13 +157,6 @@
             e.printStackTrace();
         }
 
-        // mainForm.addComponent( genderLabel );
-        // mainForm.addComponent( genderComboBox );
-
-        // mainForm.addComponent( dateOfBirthLabel );
-        // mainForm.addComponent( dobTypeDefinitionLink );
-        // mainForm.addComponent( dateOfBirthComboBox );
-        // mainForm.addComponent( dateOfBirthTextFiled );
         mainForm.addComponent( getDobWrongFortmatLabel() );
 
         if ( enrollProgramId != null )
@@ -235,8 +166,6 @@
             mainForm.addComponent( getTxtIncidentDate() );
             mainForm.addComponent( getRequiredLabel() );
         }
-        // mainForm.addComponent( phoneNumberLabel );
-        // mainForm.addComponent( phoneNumberTextField );
 
         // add attribute
         try
@@ -337,14 +266,10 @@
     {
         if ( ae.getCommand().getCommandName().equals( Text.SEND() ) )
         {
-            // String dobType = (String)
-            // getDateOfBirthComboBox().getSelectedItem();
-            // String dateOfBirth = getDateOfBirthTextFiled().getText();
+
             String incidentDate = getTxtIncidentDate().getText();
             isValid = true;
-            // Validate Date of Birth
-            // validateDOB( dobType, dateOfBirth );
-            // Validate Incident Date
+
             validateIncidentDate( incidentDate );
 
             if ( isValid == false )
@@ -440,18 +365,11 @@
             patientAttributeVector = null;
             patientIdentifierVector = null;
             fullNameLabel = null;
-            // genderLabel = null;
-            // dateOfBirthLabel = null;
-            // phoneNumberLabel = null;
             patientIdentifierLabel = null;
             patientAttributeLabel = null;
             requiredLabel = null;
             dobWrongFortmatLabel = null;
             fullNameTextField = null;
-            // genderComboBox = null;
-            // dateOfBirthComboBox = null;
-            // dateOfBirthTextFiled = null;
-            // phoneNumberTextField = null;
             patientIdentifierTextField = null;
             patientAttributeTextField = null;
             txtIncidentDate = null;
@@ -475,73 +393,13 @@
 
         String fullName = this.getFullNameTextField().getText().trim();
         isValid = true;
-        // String gender = (String) getGenderComboBox().getSelectedItem();
-        // String dobType = (String) getDateOfBirthComboBox().getSelectedItem();
-        // String dateOfBirth = getDateOfBirthTextFiled().getText();
-        // String phoneNumber = getPhoneNumberTextField().getText().trim();
-
-        // Character dateOfBirthType = null;
-        // if ( dobType.equalsIgnoreCase( "Approximated" ) )
-        // {
-        // dateOfBirthType = APPROXIMATED;
-        // }
-        // if ( dobType.equalsIgnoreCase( "Declared" ) )
-        // {
-        // dateOfBirthType = DECLARED;
-        // }
-        // if ( dobType.equalsIgnoreCase( "Verified" ) )
-        // {
-        // dateOfBirthType = VERIFIED;
-        // }
-
-        // String genderChar = null;
-        // if ( gender.equalsIgnoreCase( "male" ) )
-        // {
-        // genderChar = MALE;
-        // }
-        // if ( gender.equalsIgnoreCase( "female" ) )
-        // {
-        // genderChar = FEMALE;
-        // }
-        // if ( gender.equalsIgnoreCase( "transgender" ) )
-        // {
-        // genderChar = TRANSGENDER;
-        // }
-
-        // int currentYear = java.util.Calendar.getInstance().get(
-        // java.util.Calendar.YEAR );
-        // int currentDate = java.util.Calendar.getInstance().get(
-        // java.util.Calendar.DATE );
-        // int currentMonth = java.util.Calendar.getInstance().get(
-        // java.util.Calendar.MONTH ) + 1;
-
-        // int birthYear;
-
-        // if ( dobType.equalsIgnoreCase( "Approximated" ) && (dateOfBirth !=
-        // null && !"".equals( dateOfBirth )) )
-        // {
-        //
-        // try
-        // {
-        // birthYear = currentYear - Integer.parseInt( dateOfBirth );
-        // dateOfBirth = birthYear + "-" + currentMonth + "-" + currentDate;
-        // }
-        // catch ( Exception e )
-        // {
-        // e.printStackTrace();
-        // }
-        //
-        // }
 
         Patient patient = new Patient();
         Vector attributeVector = new Vector();
         Vector identiferVector = new Vector();
 
         patient.setName( fullName );
-        // patient.setGender( genderChar );
-        // patient.setDobType( dateOfBirthType );
-        // patient.setPhoneNumber( phoneNumber );
-        // patient.setBirthDate( dateOfBirth );
+
         if ( enrollProgramId != null )
         {
             String incidentDate = getTxtIncidentDate().getText();
@@ -736,21 +594,6 @@
         return fullNameLabel;
     }
 
-    // public Label getGenderLabel()
-    // {
-    // return genderLabel;
-    // }
-    //
-    // public Label getDateOfBirthLabel()
-    // {
-    // return dateOfBirthLabel;
-    // }
-    //
-    // public Label getPhoneNumberLabel()
-    // {
-    // return phoneNumberLabel;
-    // }
-
     public TextField getFullNameTextField()
     {
         if ( fullNameTextField == null )
@@ -760,27 +603,6 @@
         return fullNameTextField;
     }
 
-    // public ComboBox getGenderComboBox()
-    // {
-    // return genderComboBox;
-    // }
-    //
-    // public ComboBox getDateOfBirthComboBox()
-    // {
-    // return dateOfBirthComboBox;
-    // }
-
-    // public TextField getPhoneNumberTextField()
-    // {
-    // if ( phoneNumberTextField == null )
-    // {
-    // phoneNumberTextField = new TextField();
-    // phoneNumberTextField.setConstraint( TextField.NUMERIC );
-    // phoneNumberTextField.setInputModeOrder( new String[] { "123" } );
-    // }
-    // return phoneNumberTextField;
-    // }
-
     public Command getPersonRegistrationBackCommand()
     {
         if ( personRegistrationBackCommand == null )
@@ -808,11 +630,6 @@
         return personRegistrationSaveCommand;
     }
 
-    // public TextField getDateOfBirthTextFiled()
-    // {
-    // return dateOfBirthTextFiled;
-    // }
-
     public Label getPatientIdentifierLabel()
     {
         return patientIdentifierLabel;