Examples of DateField


Examples of org.molgenis.fieldtypes.DateField

  private static void init()
  {
    if (!init)
    {
      addType(new BoolField());
      addType(new DateField());
      addType(new DatetimeField());
      addType(new DecimalField());
      addType(new EnumField());
      addType(new EmailField());
      addType(new FileField());
View Full Code Here

Examples of org.onesocialweb.gwt.client.ui.widget.DateField

    addWidgetRow(generalEdit, uiText.DisplayName(), displaynameF);

    final NameEditField nameF = new NameEditField();
    addWidgetRow(generalEdit, uiText.FullName(), nameF);

    final DateField birthdayF = new DateField();
    addWidgetRow(generalEdit, uiText.Birthday(), birthdayF);

    addWidgetRow(generalEdit, uiText.Gender(), genderF);

    final StyledTextBox bioF = new StyledTextBox("", "", "250px");
    addWidgetRow(generalEdit, uiText.Bio(), bioF);
   
    final StyledTextBox emailF = new StyledTextBox("", "", "250px");
    addWidgetRow(generalEdit, uiText.Email(), emailF);

    final StyledTextBox telF = new StyledTextBox("", "", "250px");
    addWidgetRow(generalEdit, uiText.Telephone(), telF);
   
    final StyledTextBox urlF = new StyledTextBox("", "", "250px");
    addWidgetRow(generalEdit, uiText.Website(), urlF);

    // Text only version of general information
    general = new FlexTable();
    sectionGeneral.add(general);
   
    // make sure the model is not empty when there is no profile available
    if (model != null) {
      if (model.hasField(PhotoField.NAME)) {
        String avatar = model.getPhotoUri();
        // the field
        avatarF.setAvatar(avatar);
        // for display
        avatarD.setUrl(avatar);
        if (avatar != null && avatar.length() > 0)
          addWidgetRow(general, uiText.Avatar(), avatarD);
      }

      if (model.hasField(FullNameField.NAME)) {
        String displayname = model.getFullName();
        displaynameF.setText(displayname);
        if (displayname != null && displayname.length() > 0)
          addHTMLLabelRow(general, uiText.DisplayName(), displayname);
      }
     
      if (model.hasField(NameField.NAME)) {
        // the full string
        String name = model.getName();
       
        // get the separate pieces for editing
        DefaultNameField nameField = new DefaultNameField();
        nameField = (DefaultNameField) model.getField(NameField.NAME);
        nameF.setName(nameField.getGiven(), nameField.getSurname());
       
        if (name != null && name.length() > 0)
          addHTMLLabelRow(general, uiText.FullName(), name);
      }
     
      if (model.hasField(BirthdayField.NAME)) {
        Date birthday = model.getBirthday();
        if (birthday != null) {
          DateTimeFormat dtf = DateTimeFormat.getFormat("d MMMM yyyy");
          String bday = dtf.format(birthday);
          birthdayF.setDate(birthday);
          if (birthday != null ) addHTMLLabelRow(general, uiText.Birthday(), bday);
       
      }

      if (model.hasField(GenderField.NAME)) {
        GenderField.Type gender = model.getGender();
       
        // get the gender value
        DefaultGenderField genderField = new DefaultGenderField();
        genderField = (DefaultGenderField) model.getField(GenderField.NAME);
       
        genderF.setGender(gender);
        if (gender != null)
          addHTMLLabelRow(general, uiText.Gender(), genderF.getGenderText());
      }

      if (model.hasField(NoteField.NAME)) {
        String bio = model.getNote();
        bioF.setText(bio);
        if (bio != null && bio.length() > 0)
          addHTMLLabelRow(general, uiText.Bio(), model.getField("note")
              .getValue());
      }
     
      if (model.hasField(EmailField.NAME)) {
        String email = model.getEmail();
        emailF.setText(email);
        if (email != null && email.length() > 0)
          addHTMLLabelRow(general, uiText.Email(), email);
      }
     
      if (model.hasField(TelField.NAME)) {
        String tel = model.getTel();
        telF.setText(tel);
        if (tel != null && tel.length() > 0)
          addHTMLLabelRow(general, uiText.Telephone(), tel);
      }
     
      if (model.hasField(URLField.NAME)) {
        String url = model.getUrl();
        urlF.setText(url);
        if (url != null && url.length() > 0)
          addHTMLLabelRow(general, uiText.Website(), url);
      }
     
      // if there are no fields
      if (model.getFields().size() == 0) {
        showEditProfile();
      }
     
    }

    StyledFlowPanel confirmG = new StyledFlowPanel("confirm");
    Button buttonSaveG = new Button(uiText.Save());
    Button buttonCancelG = new Button(uiText.Cancel());
    confirmG.add(buttonSaveG);
    confirmG.add(buttonCancelG);

    addWidgetRow(generalEdit, "", confirmG);

    // handlers
    buttonEditG.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        showEditProfile();
      }
    });

    buttonCancelG.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        sectionGeneral.add(general);
        sectionGeneral.remove(generalEdit);
        buttonEditG.setVisible(true);
      }
    });

    buttonSaveG.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {

        final VCard4Factory profileFactory = OswServiceFactory
            .getService().getProfileFactory();
        final Profile profile = profileFactory.profile();

        try {
          // prepare for updating and check for empty values
          if (avatarF.getAvatarUri().length() > 0)
            profile.addField(profileFactory.photo(avatarF.getAvatarUri()));
          if (displaynameF.getText().length() > 0)
            profile.addField(profileFactory.fullname(displaynameF.getText()));
          if (nameF.getFirstName().length() > 0 || nameF.getLastName().length() > 0)
            profile.addField(profileFactory.name(null, nameF.getFirstName(), nameF.getLastName(), null));
          if (birthdayF.getDate() != null)
            profile.addField(profileFactory.birthday(birthdayF.getDate()));
          if (genderF.getGenderText().length() > 0) {
            if (genderF.getGenderValue().equals(GenderField.Type.MALE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.MALE));
            } else if (genderF.getGenderValue().equals(GenderField.Type.FEMALE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.FEMALE));
View Full Code Here

Examples of org.shiftone.jrat.util.io.csv.field.DateField

    return addField(title, DateField.INSTANCE_ISO8601);
  }

  public int addDateFormatField(String title, String dateFormat) {

    return addField(title, new DateField(dateFormat));
  }
View Full Code Here

Examples of org.springframework.roo.classpath.operations.jsr303.DateField

        Validate.notNull(javaTypeDetails,
                "The type specified, '%s', doesn't exist", typeName);

        final String physicalTypeIdentifier = javaTypeDetails
                .getDeclaredByMetadataId();
        final DateField fieldDetails = new DateField(physicalTypeIdentifier,
                fieldType, fieldName);
        fieldDetails.setNotNull(notNull);
        fieldDetails.setNullRequired(nullRequired);
        fieldDetails.setFuture(future);
        fieldDetails.setPast(past);
        if (JdkJavaType.isDateField(fieldType)) {
            fieldDetails
                    .setPersistenceType(persistenceType != null ? persistenceType
                            : DateFieldPersistenceType.JPA_TIMESTAMP);
        }
        if (column != null) {
            fieldDetails.setColumn(column);
        }
        if (comment != null) {
            fieldDetails.setComment(comment);
        }
        if (dateFormat != null) {
            fieldDetails.setDateFormat(dateFormat);
        }
        if (timeFormat != null) {
            fieldDetails.setTimeFormat(timeFormat);
        }
        if (pattern != null) {
            fieldDetails.setPattern(pattern);
        }
        if (value != null) {
            fieldDetails.setValue(value);
        }

        insertField(fieldDetails, permitReservedWords, transientModifier);
    }
View Full Code Here

Examples of org.xBaseJ.micro.fields.DateField

         {
         case 'C':
           tField = new CharField(name, iLength, file);
           break;
         case 'D':
           tField = new DateField(name, file);
           break;
         case 'F':
           tField = new FloatField(name, iLength, decpoint, file);
           break;
         case 'L':
View Full Code Here

Examples of org.ytreza.data.model.modelField.DateField

  }
 
  @Override
  public void initializeFields() {
    fieldString = (StringField) addField(new StringField(FIELD_STRING));
    fieldDate = (DateField) addField(new DateField(FIELD_DATE, null));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.