Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.GDDate


  private Incoming getRelatedIncoming(String bankOperationNumber, String description, String value, GDDate date) {
      try {
        Map<String, Incoming> incomings = (Map<String, Incoming>) system.query(new GetIncoming());
       
        for (Incoming incoming : incomings.values()) {
          GDDate incomingDate = new GDDate(incoming.getNextPaymentDate());
          incomingDate.addDays(-3);
         
          GDDate endDate = new GDDate(incoming.getNextPaymentDate());
          endDate.addDays(3);
         
        if((date.afterDay(incomingDate) && date.beforeDay(endDate))
            && new Money(incoming.getValue()).equals(new Money(value)))
        {
          return incoming;
View Full Code Here


    try {
      Map<String, Operation> operationMap = (Map<String, Operation>) system.query(new GetOperation());

      for (Operation operation : operationMap.values()) {
        if(operation.getAccount().isBankAccount()) {
          if((new GDDate(operation.getDateTime()).equals(date)
              && new Money(operation.getValue()).equals(new Money(value)) )
              || operation.getBankOperationNumber().equals(bankOperationNumber))
          {
            return operation;
                  }
View Full Code Here

        inicialDateLabel.setLayoutData(data);
    }
   
    private void createInitialDateText() {
        initialDateText = new DateText(registrationComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        initialDateText.setValue(new GDDate().getDate());
       
        FormData data = new FormData();
        data.top = new FormAttachment(inicialDateLabel, 1);
        data.left = new FormAttachment(0, 0);
        data.right = new FormAttachment(25, 0);
View Full Code Here

        endDateLabel.setLayoutData(data);
    }
   
    private void createEndDateText() {
        endDateText = new DateText(registrationComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        endDateText.setValue(new GDDate().getDate());
       
        FormData data = new FormData();
        data.top = new FormAttachment(endDateLabel, 1);
        data.left = new FormAttachment(initialDateText, 5);
        data.right = new FormAttachment(50, 0);
View Full Code Here

        Button print = new Button(buttons, SWT.PUSH);
        print.setText("Visualizar");
        print.addListener(SWT.MouseDown, new Listener() {
            public void handleEvent(Event arg0) {
                if(new GDDate(initialDateText.getText()).afterDay(new GDDate(endDateText.getText()))) {
                  setErrorMessage("A data inicial deve ser menor que a data final.");
                  initialDateText.setFocus();
                } else {
                  setScreenMessage("");
                  if(thisWeekSelectionRadio.getSelection()){
View Full Code Here

          table.setHeaderVisible(true);
          table.addListener(SWT.MouseDoubleClick, new Listener() {
        public void handleEvent(Event arg0) {
          String item = table.getSelection()[0].getText(0);
          String hourTab = tabFolder.getSelection()[0].getText().split(":00")[0];
          GDDate date = new GDDate(item);
          date.setHourOfDay(Integer.parseInt(hourTab));
         
          new RegisteredStudentsOnThatDayDialog(getShell(), getMySelf(), date).open();
        }
          });
          table.addListener(SWT.Resize, new Listener() {
                public void handleEvent(Event arg0) {
                    TableLayout layout = new TableLayout();
                    layout.addColumnData(new ColumnWeightData(30, 30, true));
                    layout.addColumnData(new ColumnWeightData(100, 70, true));
                    table.setLayout(layout);
                }
            });
         
          TableColumn columnDate = new TableColumn(table, SWT.NONE);
          columnDate.setText("Data");
          TableColumn columnExceedents = new TableColumn(table, SWT.NONE);
          columnExceedents.setText("N� de alunos excedentes");
         
          for (String date : _mapExceedent.keySet()) {
            if(hour.equals(date.split("-")[1])) {
              TableItem item = new TableItem(table, SWT.NONE);
              item.setText(0, date.split("-")[0]);
              item.setText(1, _mapExceedent.get(date));
            }
      }
      tablesMap.put(hour, table);
    }
View Full Code Here

    private void createNextUpdateFields() {
        Label separator = new Label(group, SWT.NONE);
        separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        Label label = new Label(group, SWT.LEFT);
        label.setText("Proxima verifica��o de atualiza��o: "+ new GDDate((GDDate) gd.get("nextUpdateDate")).getFormatedDate());
       
        GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
        gridData.heightHint = 25;
        gridData.horizontalSpan = 3;
        label.setLayoutData(gridData);
View Full Code Here

               
                for (Registration registration : registrations) {
                    for (RegistrationAppointment registrationAppointment : registration.getRegistrationAppointment()) {
                        if(!registrationAppointment.isReplacement()) {
                            for (Presence presence : registrationAppointment.getPresence()) {
                              GDDate presenceDate = new GDDate(presence.getDate());
                              if(presenceDate.afterOrEqualsDay(startDate) && presenceDate.beforeOrEqualsDay(endDate)) {
                                  presences.add(presence);
                             
                            }
                        } else {
                            for (Presence presence : registrationAppointment.getPresence()) {
                                GDDate presenceDate = new GDDate(presence.getDate());
                                if(presenceDate.afterOrEqualsDay(startDate) && presenceDate.beforeOrEqualsDay(endDate)) {
                                    presences.add(presence);
                                }
                            }
                        }
                    }
                }
                if(presences.size() > 0) {
                    MergeSortAlgorithm sortAlgorithm = new MergeSortAlgorithm();
                    sortAlgorithm.sortPresencesByDate(presences);
                }
                int numberOfPresences = 0;
                int numberOfMisses = 0;
               
                String statusText = "";
                for (Presence presence : presences) {
                    if(presence.isPresent()) {
                        numberOfPresences++;
                        statusText = "Presente";
                        if(presence.getRegistrationAppointment().isReplacement()) {
                            if(presence.getRegistrationAppointment().getReplacementOfPresence() != null) {
                                statusText += " - Referente ao dia: " + new GDDate(presence.getRegistrationAppointment().getReplacementOfPresence().getDate()).getFormatedDate()+ " as "+presence.getRegistrationAppointment().getReplacementOfPresence().getDate().getHourOfDay() + ":00";
                            } else {
                                statusText += " - Aula extra";
                            }
                        }
                    } else {
                        numberOfMisses++;
                        statusText = "Ausente";
                        if(presence.alreadyReplaced()) {
                            statusText += " - Reposi��o marcada para: " + new GDDate(presence.getReplacement().getAppointmentDate()).getFormatedDate() + " as " + presence.getReplacement().getAppointmentDate().getHourOfDay() + ":00";
                        } else if(!presence.getRegistrationAppointment().isReplacement()) {
                            statusText += " - N�o marcada reposi��o";
                        }
                    }
       
                    page.addElement(drawRectangle(posX, posY, 535, 15, 0));
                    page.addElement(insertText(bodyStyle, new GDDate(presence.getDate()).getFormatedDate(), posX+5, 80));
                    page.addElement(divLine(posX+85));
                    int hour = presence.getDate().getHourOfDay();
                    page.addElement(insertText(bodyStyle, (hour <= 9 ? "0"+hour : hour) + ":00", posX+90, 50));
                    page.addElement(divLine(posX+140));
                    page.addElement(insertText(bodyStyle, statusText, posX+145, 390));
View Full Code Here

        initialDateLabel.setLayoutData(data);
    }
   
    private void createInitialDateText() {
      initialDateText = new DateText(filterComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
      initialDateText.setValue(new GDDate().getDate());
       
        FormData data = new FormData();
        data.top = new FormAttachment(0, 0);
        data.left = new FormAttachment(initialDateLabel, 5);
        data.width = 85;
View Full Code Here

        initialDateText.setLayoutData(data);
    }
   
    private void createFinalDateText() {
        finalDateText = new DateText(filterComposite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        finalDateText.setValue(new GDDate().getDate());
       
        FormData data = new FormData();
        data.top = new FormAttachment(0, 0);
        data.left = new FormAttachment(middleDateLabel, 5);
        data.width = 85;
View Full Code Here

TOP

Related Classes of br.com.visualmidia.business.GDDate

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.