Examples of GDDate


Examples of br.com.visualmidia.business.GDDate

    Label nextPaymentDatelabel = new Label(components, SWT.NONE);
    nextPaymentDatelabel.setText("Pr�xima data de pagamento:");
    nextPaymentDatelabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));

    nextPaymentDateText = new DateText(components, SWT.BORDER | SWT.READ_ONLY);
    nextPaymentDateText.setValue(new GDDate().getDate());
    nextPaymentDateText.setEditable(false);

    GridData data = new GridData();
    data.horizontalSpan = 2;
    data.widthHint = 100;
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

  void fillDescription(String description) {
    descriptionText.setText(description);
  }

  void fillNextDate(String date) {
    nextPaymentDateText.setValue(new GDDate(date).getDate());
  }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

                Person person = (Person) system.query(new GetPerson(registration.getIdPerson()));
                int numberOfParcel = 1;
               
                for (Parcel parcel : registration.getParcels()) {
                        if(parcel.isPayed()) {
                            parcelPayDate = new GDDate(parcel.getPayDate());
                            if (parcelPayDate.afterOrEqualsDay(startDate) && parcelPayDate.beforeOrEqualsDay(finishDate)) {
                                createParcelsMap(person, parcel, index , numberOfParcel, registration.isActive(), registration.getIdRegistration());
                                index++;
                            }
                        }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

                   
                    page.addElement(createText(adressStyle, student.getId() + " - " + student.getName(), posX+5, posY+30, widthLabel-10, 15));
                   
                } else {
                    String textToWrite = "";
                    final GDDate birthDate = new GDDate(student.getBirthDate());
                    if(ResponsableValidator.checkStudentUnderAge(birthDate.getFormatedDate()) && printResponsable){
                        textToWrite = ((Student) student.getPersonType("student")).getResponsableName();
                    }else{
                        textToWrite = student.getName();
                    }
                    page.addElement(createText(nameStyle, textToWrite, posX+5, posY+10, widthLabel-10, 15));
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    }

    public boolean isValidPID() {
      GD gd = GD.getInstance();

        actualOpenedPID = new GDDate().getTimeInMillis();
     // Descomentar quando tiver problema de data de abertura
     //   long lastOpenedPID = new GDDate().getTimeInMillis();
     // Comentar o c�digo abaixo
        //long lastOpenedPID = (Long) (gd.get("lastOpenPID") != null ? gd.get("lastOpenPID") : 0L);
        //if (actualOpenedPID >= lastOpenedPID) {
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

       // return false;
    }

  public long getActualOpenedPID() {
    if(actualOpenedPID == 0){
      actualOpenedPID = new GDDate().getTimeInMillis();
    }
    return actualOpenedPID;
  }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        periodLabel = new Label(composite, SWT.NULL);
        periodLabel.setText("Per�odo:");
        periodLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        periodLabel.setEnabled(true);

        final GDDate today = new GDDate();
        startPeriodText = new DateText(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        startPeriodText.setValue(today.getDate());
        data = new GridData();
        data.widthHint = 80;
        startPeriodText.setLayoutData(data);
       
        final Label atLabel = new Label(composite, SWT.NULL);
        atLabel.setText("    �    ");
        atLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        atLabel.setEnabled(true);

        endPeriodText = new DateText(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        endPeriodText.setValue(today.getDate());
        endPeriodText.setEnabled(true);
        data = new GridData();
        data.widthHint = 80;
        endPeriodText.setLayoutData(data);

        combo.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                setPeriod(combo.getSelectionIndex());
                if (combo.getSelectionIndex() == 0) {
                    periodLabel.setEnabled(true);
                    atLabel.setEnabled(true);
                    startPeriodText.setEnabled(true);
                    endPeriodText.setEnabled(true);
                } else {
                    periodLabel.setEnabled(false);
                    atLabel.setEnabled(false);
                    startPeriodText.setEnabled(false);
                    endPeriodText.setEnabled(false);
                }
            }
        });
       
        filter = new Button(composite, SWT.FLAT);
        filter.setText("Filtrar");
        filter.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                if(new GDDate(endPeriodText.getText()).beforeDay(new GDDate(startPeriodText.getText()))){
                  cashFlowControlCenter.setErrorMessage("A data inicial deve ser menor que a data final.");
                  startPeriodText.setFocus();
                }else if ((new GDDate(startPeriodText.getText()).beforeDay(new GDDate()))){
                     cashFlowControlCenter.setErrorMessage("A data inicial deve ser maior ou igual a data atual.");
                  startPeriodText.setFocus();             
                else {
                  updateFilters();
                }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        filter.setLayoutData(data);
       
    }

    protected void setPeriod(int option) {
        GDDate start = new GDDate();
        GDDate end = new GDDate();
       
        if (option == 1) {
            end.setLastDayOfMonth();
        } else if (option == 2) {
            start.addMonth(1);
            end.addMonth(1);
        } else if (option == 3) {
          start.addMonth(1);
            end.addMonth(2);
        } else if (option == 4) {
          start.addMonth(1);
            end.addMonth(3);
        } else if (option == 5) {
          start.addMonth(1);
            end.addMonth(6);
        } else if (option == 6) {
          start.addMonth(1);
            end.addMonth(12);
        } /*else if (option == 7) {
            start.addMonth(-1);
            end.addMonth(-1);
        } else if (option == 8) {
            start.addMonth(-2);
            end.addMonth(-1);
        } else if (option == 9) {
            start.addMonth(-3);
            end.addMonth(-1);
        } else if (option == 10) {
            start.addMonth(-6);
            end.addMonth(-1);
        } else if (option == 11) {
            start.addMonth(-12);
            end.addMonth(-1);
        }*/

        if ( (option != 0) && (option != 1) ) {
            start.setDayOfMonth(1);
            end.setLastDayOfMonth();
        }
        startPeriodText.setValue(start.getDate());
        endPeriodText.setValue(end.getDate());

    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    protected void updateFilters() {
        if ((startPeriodText.getText().equals("")) || (endPeriodText.getText().equals(""))) {
            cashFlowControlCenter.setErrorMessage("Per�odo Incorreto.");
        } else {
            GDDate startDate = new GDDate(startPeriodText.getText());
            GDDate endDate = new GDDate(endPeriodText.getText());
           
            if (endDate.beforeDay(startDate)) {
                cashFlowControlCenter.setErrorMessage("Per�odo Incorreto.");
            } else {
                cashFlowControlCenter.setErrorMessage("");
//                if (!unconsiderToPayText.getText().equals(""))
//                    cashFlowControlCenter.ignoreOverDueDebit(unconsiderToPayText.getText());
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        Label periodLabel = new Label(filterGroup, SWT.NONE);
        periodLabel.setText("Per�odo: ");
        periodLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
       
        initialDateText = new DateText(filterGroup, SWT.BORDER | SWT.READ_ONLY);
        initialDateText.setValue(new GDDate().getDate());
       
        Label middleLabel = new Label(filterGroup, SWT.NONE);
        middleLabel.setText(" � ");
        middleLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
       
        finishDateText = new DateText(filterGroup, SWT.BORDER | SWT.READ_ONLY);
        finishDateText.setValue(new GDDate().getDate());
       
    Button filterButton = new Button(filterGroup, SWT.NONE);
    filterButton.setText("Filtrar");
   
    filterButton.addListener(SWT.Selection, new Listener(){
      public void handleEvent(Event arg0) {
        if(new GDDate(initialDateText.getText()).afterDay(new GDDate(finishDateText.getText()))){
          setErrorMessage("A data inicial deve ser menor que a data final.");
        } else {
          updateTable();
        }
      }
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.