Package br.com.visualmidia.ui.validator

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


    private void createBirthdateText() {
        birthdateText = new FormattedText(mainComposite, SWT.SINGLE | SWT.BORDER);
        DateFormatter dateFormatter = new DateFormatter("dd/MM/yyyy");
        birthdateText.setFormatter(dateFormatter);
        birthdateText.getControl().addFocusListener(new RequiredWhenLostFocus(birthdateText, RequiredWhenLostFocus.ERROR_REQUIRED_BIRTHDATE, screenMessageLabel));
        birthdateText.getControl().setText("");
       
        birthdateText.getControl().addFocusListener(new FocusListener(){
      public void focusLost(FocusEvent arg0) {
        if (birthdateText.getControl().getText().contains(" ")) {
View Full Code Here


    }

    private void createCityCombo() {
        cityCombo = new Combo(mainComposite, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
       
        cityCombo.addFocusListener(new RequiredWhenLostFocus(cityCombo, RequiredWhenLostFocus.ERROR_REQUIRED_CITY, screenMessageLabel));
       
        FormData data = new FormData();
        data.top = new FormAttachment(stateLabel, 1);
        data.left = new FormAttachment(stateCombo, 5);
        data.right = new FormAttachment(100, 0);
View Full Code Here

        cityLabel.setLayoutData(data);
    }

    private void createCEPText() {
        cepText = new Text(mainComposite, SWT.SINGLE | SWT.BORDER);
        cepText.addFocusListener(new RequiredWhenLostFocus(cepText, RequiredWhenLostFocus.ERROR_REQUIRED_CEP, screenMessageLabel));
       
        cepText.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent arg0) {
                if(!cepText.getText().equals("")){
                    if(!Validator.isValidCEP(cepText.getText())){
View Full Code Here

        neighborhoodLabel.setLayoutData(data);
    }

    private void createStreetNumberText() {
        streetNumberText = new Text(mainComposite, SWT.SINGLE | SWT.BORDER);
        streetNumberText.addFocusListener(new RequiredWhenLostFocus(streetNumberText, RequiredWhenLostFocus.ERROR_REQUIRED_STREETNUMBER, screenMessageLabel));
       
        streetNumberText.addKeyListener(new KeyAdapter(){
          public void keyPressed(KeyEvent e) {
            String keyPress = String.valueOf(e.character);
               if ( keyPress.matches("^[0-9]") || isSpecialKey(e.keyCode)) {
View Full Code Here

        streetNumberLabel.setLayoutData(data);
    }

    private void createStreetText() {
        streetText = new Text(mainComposite, SWT.SINGLE | SWT.BORDER);
        streetText.addFocusListener(new RequiredWhenLostFocus(streetText, RequiredWhenLostFocus.ERROR_REQUIRED_STREET, screenMessageLabel));

        FormData data = new FormData();
        data.top = new FormAttachment(streetLabel, 1);
        data.left = new FormAttachment(0, 0);
        data.right = new FormAttachment(65, 0);
View Full Code Here

    }

    @SuppressWarnings("unchecked")
  private void createAttendanceResponsableCombo() {
        attendanceResponsableCombo = new Combo(mainComposite, SWT.DROP_DOWN | SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        attendanceResponsableCombo.addFocusListener(new RequiredWhenLostFocus(attendanceResponsableCombo, RequiredWhenLostFocus.ERROR_REQUIRED_ATTENDANCENAME, screenMessageLabel));
        attendanceResponsableCombo.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                if (attendanceResponsableCombo.getSelectionIndex() == -1)
                    controlCenter.setFocusOnTabItem(StudentControlCenter.ATTENDANCE_DATA_TITLE);
            }
View Full Code Here

    label.setText("Descri��o:");
    label.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));

    descriptionText = new Text(components, SWT.BORDER);
    new FirstUpperCaseMask(descriptionText);
    descriptionText.addFocusListener(new RequiredWhenLostFocus(descriptionText, RequiredWhenLostFocus.ERROR_REQUIRED_ACCOUNT_TO_PAY_DESCRIPTION,
        screenMessageLabel));

    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    descriptionText.setLayoutData(data);
View Full Code Here

    label.setText("N�mero de ocorr�ncias:");
    label.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));

    numberOfOcurrenciesText = new Text(components, SWT.BORDER);
    br.com.visualmidia.tools.Validator.validateNumbers(numberOfOcurrenciesText);
    numberOfOcurrenciesText.addFocusListener(new RequiredWhenLostFocus(numberOfOcurrenciesText,
        RequiredWhenLostFocus.ERROR_REQUIRED_ACCOUNT_NEXT_PAYMENT_DATE, screenMessageLabel));
    numberOfOcurrenciesText.setText("0");

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

    }


    private void createHowDoYouKnowVisualMidiaCombo() {
        howDoYouKnowVisualMidiaCombo = new Combo(mainComposite, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
        howDoYouKnowVisualMidiaCombo.addFocusListener(new RequiredWhenLostFocus(howDoYouKnowVisualMidiaCombo, RequiredWhenLostFocus.ERROR_REQUIRED_HOW_DO_YOU_KNOW_VISUAL_MIDIA, screenMessageLabel));
        addValuesToHowDoYouNowVisualMidia();

        FormData data = new FormData();
        data.top = new FormAttachment(howDoYouKnowVisualMidiaLabel, 1);
        data.left = new FormAttachment(0, 0);
View Full Code Here

        data.top = new FormAttachment(confirmPasswordLabel, 1);
        data.right = new FormAttachment(30, 0);
        data.left = new FormAttachment(0, 0);
        confirmPasswordText.setLayoutData(data);
       
        confirmPasswordText.addFocusListener(new RequiredWhenLostFocus(confirmPasswordText, RequiredWhenLostFocus.ERROR_REQUIRED_PASSWORD_CONFIRMATION, 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.