Changeset 3793


Ignore:
Timestamp:
Aug 25, 2010, 9:49:16 AM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Refactored LoginForm? making fields final, also removed deprecated methods in Fieldset related to setting and getting the Legend string.

Location:
trunk/client/servlet/src/org/proteios/gui/form
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/gui/form/Fieldset.java

    r3608 r3793  
    8787
    8888
    89   /**
    90    * @deprecated Use getLegendTitle().getTitle()
    91    */
    92   public String getLegend()
    93   {
    94     return legend;
    95   }
    96 
    97 
    98   /**
    99    * @deprecated Use getLegendTitle().setTitle(String title)
    100    */
    101   public void setLegend(String legend)
    102   {
    103     this.legend = legend;
    104     // Code making the string set with setLegend(...) appear
    105     // in fieldset legend after the method has been deprecated.
    106     getLegendTitle().setTitle(legend);
    107   }
    108 
    109 
    11089  public List<GUIElement> getFields()
    11190  {
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3791 r3793  
    721721
    722722
     723
    723724  public Form getMyProfilePropertiesForm(User user)
    724725  {
     
    773774  }
    774775
    775 
     776 // Cleaning up from here
    776777  public Form getMyProfilePasswordForm(User user)
    777778  {
  • trunk/client/servlet/src/org/proteios/gui/form/LoginForm.java

    r3408 r3793  
    3333 This form contains a username and password field.
    3434
    35  @author Gregory Vincic
     35 @author gregory
    3636*/
    3737public final class LoginForm
     
    3939{
    4040
    41  public Fieldset fs;
    42  public TextField<String> usernameF;
    43  public PasswordField passwordF;
    44  public Title title;
     41 public final Fieldset fs;
     42 public final TextField<String> usernameF;
     43 public final PasswordField passwordF;
    4544
    4645 public LoginForm()
    4746 {
    48   this.fs = new Fieldset();
    49   this.usernameF = new UsernameField();
    50   this.passwordF = new PasswordField(PasswordField.VPWD1);
    51   this.title = new Title("Login");
    52   this.setId("loginForm");
    53   this.fs.setLegendTitle(title); 
    54   this.fs.add(this.usernameF);
    55   this.passwordF.setLabel("Password");
    56   this.fs.add(this.passwordF);
    57   this.addFieldset(this.fs);
     47  Title title;
     48
     49  fs = new Fieldset();
     50  usernameF = new UsernameField();
     51  passwordF = new PasswordField(PasswordField.VPWD1);
     52  passwordF.setLabel("Password");
     53  title = new Title("Login");
     54
     55  setId("loginForm");
     56  fs.setLegendTitle(title);
     57  fs.add(usernameF);
     58  fs.add(passwordF);
     59  addFieldset(fs);
    5860 }   
    5961}
Note: See TracChangeset for help on using the changeset viewer.