Package br.com.visualmidia.ui.validator

Examples of br.com.visualmidia.ui.validator.RequiredWhenLostFocus


        data.top = new FormAttachment(passwordLabel, 1);
        data.right = new FormAttachment(30, 0);
        data.left = new FormAttachment(0, 0);
        passwordText.setLayoutData(data);
       
        passwordText.addFocusListener(new RequiredWhenLostFocus(passwordText, RequiredWhenLostFocus.ERROR_REQUIRED_PASSWORD, screenMessageLabel));
    }
View Full Code Here


        data.top = new FormAttachment(usernameLabel, 1);
        data.right = new FormAttachment(30, 0);
        data.left = new FormAttachment(0, 0);
        usernameText.setLayoutData(data);
       
        usernameText.addFocusListener(new RequiredWhenLostFocus(usernameText, RequiredWhenLostFocus.ERROR_REQUIRED_USERNAME, screenMessageLabel));
    }
View Full Code Here

        positionLabel.setLayoutData(data);
    }

    private void createPositionPersistentCombo() {
        positionPersistenceCombo = new Combo(mainComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        positionPersistenceCombo.addFocusListener(new RequiredWhenLostFocus(positionPersistenceCombo, RequiredWhenLostFocus.ERROR_REQUIRED_POSITION, screenMessageLabel));
       
        updatePositionCombo();

        positionPersistenceCombo.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
View Full Code Here

        beginDateLabel.setLayoutData(data);
    }

    private void createBeginDateText() {
        beginDateText = new DateText(mainComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        beginDateText.addFocusListener(new RequiredWhenLostFocus(beginDateText, RequiredWhenLostFocus.ERROR_REQUIRED_BEGINDATE, screenMessageLabel));

        FormData data = new FormData();
        data.top = new FormAttachment(beginDateLabel, 1);
        data.left = new FormAttachment(registerDateText, 5);
        data.right = new FormAttachment(72, 0);
View Full Code Here

        responsableNameText = new Text(mainComposite, SWT.SINGLE | SWT.BORDER);
        responsableNameText.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent event) {
                if ((studentRegisterScreen == null ? !employeeRegisterScreen.getBirthdate().equals("") : !studentRegisterScreen.getBirthdate().equals(""))) {
                  String birthDateperson = (studentRegisterScreen == null ? employeeRegisterScreen.getBirthdate() : studentRegisterScreen.getBirthdate());
                    RequiredWhenLostFocus requiredField = new RequiredWhenLostFocus(responsableNameText, RequiredWhenLostFocus.ERROR_REQUIRED_RESPONSABLENAME, screenMessageLabel);
//                    if ((responsableNameText.getText().equals("")) || (ResponsableValidator.checkStudentUnderAge((studentRegisterScreen == null ? employeeRegisterScreen.getBirthdate() : studentRegisterScreen.getBirthdate())))) {
                    if ( (ResponsableValidator.checkStudentUnderAge(Validator.isDate(birthDateperson) ? birthDateperson : new GDDate().getFormatedDate()) && responsableNameText.getText().trim().equals("") ) ){                   
                        responsableNameText.setBackground(RequiredWhenLostFocus.backgroundProblem);
                        requiredField.addScreenMessage(RequiredWhenLostFocus.ERROR_REQUIRED_RESPONSABLENAME);
                    } else {
                        responsableNameText.setBackground(RequiredWhenLostFocus.backgroundOk);
                        requiredField.removeScreenMessage(RequiredWhenLostFocus.ERROR_REQUIRED_RESPONSABLENAME);
                    }
                }
            }
        });
       
View Full Code Here

        nameText.setLayoutData(data);

        nameText.setFocus();

        new PersonTableCompletation(nameText, area.getComponentsComposite(), this);
        nameText.addFocusListener(new RequiredWhenLostFocus(nameText, RequiredWhenLostFocus.ERROR_REQUIRED_NAME, screenMessageLabel));
    }
View Full Code Here

  private void createNameText() {
    nameText = new Text(mainPanel, SWT.SINGLE | SWT.BORDER);
    nameText.setFocus();

    new StudentTableCompletation(nameText, mainPanel, this);
    nameText.addFocusListener(new RequiredWhenLostFocus(nameText, RequiredWhenLostFocus.ERROR_REQUIRED_NAME, screenMessageLabel));

    FormData data = new FormData();
    data.top = new FormAttachment(nameLabel, 1);
    data.left = new FormAttachment(idText, 5);
    data.right = new FormAttachment(openRegisterButton, -25);
View Full Code Here

        data.right = new FormAttachment(100, -10);
        searchText.setLayoutData(data);
       
        searchText.setFocus();
       
        searchText.addFocusListener(new RequiredWhenLostFocus(searchText, RequiredWhenLostFocus.ERROR_REQUIRED_SEARCH, screenMessageLabel));
        searchText.addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent event) {
                if (event.keyCode == 13) {
                    searchButton.notifyListeners(SWT.MouseUp, new Event());
                }
View Full Code Here

    nameText.setLayoutData(data);

    nameText.setFocus();

    new PersonTableCompletation(nameText, area.getComponentsComposite(), this);
    nameText.addFocusListener(new RequiredWhenLostFocus(nameText, RequiredWhenLostFocus.ERROR_REQUIRED_NAME, screenMessageLabel));
  }
View Full Code Here

TOP

Related Classes of br.com.visualmidia.ui.validator.RequiredWhenLostFocus

Copyright © 2018 www.massapicom. 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.