protected void reloadFoglioOre() {

      setHeight(480);
      setWidth(680);

      dtfldGiorno.setValue(giornoRiferimento.getValue());

      cmbxDipendente.setFieldLabel("Dipendente");
      cmbxDipendente.setEnabled(true);
      cmbxDipendente.setEmptyText("Selezionare il dipendente..");
      cmbxDipendente.setEditable(false);
      cmbxDipendente.setVisible(true);
      cmbxDipendente.setTriggerAction(TriggerAction.ALL);
      cmbxDipendente.setAllowBlank(false);
      cmbxDipendente.setDisplayField("nomeCompleto");
      cmbxDipendente.addListener(
          Events.OnClick,
          new Listener<BaseEvent>() {
            @Override
            public void handleEvent(BaseEvent be) {
              getAllDipendenti();
            }
          });

      ButtonBar buttonBarTop = new ButtonBar();
      buttonBarTop.setAlignment(HorizontalAlignment.CENTER);
      buttonBarTop.setStyleAttribute("padding-bottom", "5px");
      buttonBarTop.setBorders(false);
      buttonBarTop.setWidth(570);
      buttonBarTop.setItemId("buttonBar");

      buttonBarTop.add(giornoRiferimento);
      buttonBarTop.add(cmbxDipendente);
      buttonBarTop.add(btnSend);

      ButtonBar btnBarOperazioni = new ButtonBar();
      btnBarOperazioni.setAlignment(HorizontalAlignment.LEFT);
      btnBarOperazioni.setBorders(false);
      btnBarOperazioni.add(btnRiepilogoCommesse);
      btnBarOperazioni.add(btnInviaCommenti);
      btnBarOperazioni.add(btnConferma);

      left.removeAll();
      right.removeAll();

      left.add(btnBarOperazioni);
      left.add(buttonBarTop);
      // left.add(new FldsetIntervalliIU());
      left.add(new FldsetIntervalliCommesse());

      // right.add(new FldsetGiustificativi());
      // right.add(new FldsetRiepilogo());

      main.removeAll();
      main.add(left);
      main.add(right);
      main.layout(true);

      frm.layout(true);
    }
コード例 #2
0
ファイル: ProfileView.java プロジェクト: openhie/os-cr
  private void initUI() {
    long time = new java.util.Date().getTime();
    GWT.log("Initializing the UI ", null);

    permissions = Registry.get(Constants.LOGIN_USER_PERMISSIONS);

    //		container = new LayoutContainer();
    container = new ContentPanel();
    container.setLayout(new BorderLayout());
    container.setHeading("User Profile");

    formButtonContainer = new LayoutContainer();
    formButtonContainer.setScrollMode(Scroll.AUTO);

    TableLayout identlayout = new TableLayout(2);
    identlayout.setWidth("100%");
    identlayout.setCellSpacing(5);
    identlayout.setCellVerticalAlign(VerticalAlignment.TOP);

    TableLayout formlayout = new TableLayout(2);
    formlayout.setWidth("100%");
    formlayout.setCellSpacing(5);
    formlayout.setCellVerticalAlign(VerticalAlignment.TOP);

    formContainer = new LayoutContainer();
    //			formContainer.setBorders(true);
    formContainer.setLayout(formlayout);
    leftFormPanel = setupUserLeftForm("", 1);
    rightFormPanel = setupUserRightForm("", 8);

    formContainer.add(leftFormPanel);
    formContainer.add(rightFormPanel);
    buttonPanel = setupButtonPanel(17);

    formButtonContainer.add(formContainer);
    formButtonContainer.add(buttonPanel);

    // check permissions
    checkPermissins();

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
    data.setMargins(new Margins(4, 2, 4, 2));
    container.add(formButtonContainer, data);

    LayoutContainer wrapper = (LayoutContainer) Registry.get(Constants.CENTER_PANEL);
    wrapper.removeAll();
    wrapper.add(container);
    wrapper.layout();
    GWT.log("Done Initializing the UI in " + (new java.util.Date().getTime() - time), null);
  }
コード例 #3
0
ファイル: AnnoSouth.java プロジェクト: giovannilt/AzzeroCO2
 public void setTextRigth(String right_t, OrdineModel riepilogo) {
   if (riepilogo != null
       && riepilogo.getPagamentoModel() != null
       && riepilogo.getPagamentoModel().getEsito() != null
       && riepilogo.getPagamentoModel().getEsito().equalsIgnoreCase(Esito.PAGATO.toString())) {
     right.setVisible(false);
     rigthText.setVisible(false);
   } else {
     if (right_t.length() == 0) {
       right.setEnabled(false);
       right.setVisible(false);
       rigthText.setVisible(false);
     } else {
       right.setEnabled(true);
       right.setVisible(true);
       rigthText.setVisible(true);
     }
     rigthText.setText(right_t);
   }
   c.layout(true);
 }
コード例 #4
0
ファイル: AnnoSouth.java プロジェクト: giovannilt/AzzeroCO2
  public void setTextLeft(String left_t, OrdineModel riepilogo) {
    if (riepilogo.getPagamentoModel() != null
        && riepilogo.getPagamentoModel().getEsito() != null
        && riepilogo.getPagamentoModel().getEsito().equalsIgnoreCase(Esito.PAGATO.toString())) {
      left.setVisible(false);
      leftText.setVisible(false);

    } else {
      if (left_t.length() == 0 || left_t.equalsIgnoreCase(".")) {
        left.setEnabled(false);
        left.setVisible(false);
        leftText.setVisible(false);
      } else {
        left.setEnabled(true);
        left.setVisible(true);
        leftText.setVisible(true);
      }
      leftText.setText(left_t);
    }
    c.layout(true);
  }
コード例 #5
0
  private void initUI() {
    long time = new java.util.Date().getTime();
    GWT.log("Initializing the UI ", null);

    container = new LayoutContainer();
    container.setLayout(new CenterLayout());

    // Rpc Proxy setup
    pagingToolBar = setupRpcProxy();

    // Audit event grid setup
    grid = setupGrid();

    // Panel
    ContentPanel cp = new ContentPanel();
    cp.setHeading("Entity Event Viewer");
    cp.setFrame(true);
    cp.setIcon(IconHelper.create("images/search_icon_16x16.png"));
    cp.setLayout(new FormLayout());
    cp.setSize(1100, 630);

    // Search Container
    ContentPanel searchContainer = new ContentPanel();
    searchContainer.setHeaderVisible(false);
    FormLayout searchFormLayout = new FormLayout();
    searchFormLayout.setLabelWidth(130);
    searchFormLayout.setDefaultWidth(770);

    searchContainer.setLayout(searchFormLayout);

    selectedEvenyTypes = new TextField<String>();
    selectedEvenyTypes.setFieldLabel("Selected Event Types");
    selectedEvenyTypes.setReadOnly(true);

    evenyTypes = new ListView<AuditEventTypeWeb>();
    evenyTypes.setDisplayProperty("auditEventTypeName");
    evenyTypes.setWidth(220);
    evenyTypes.setHeight(110);
    evenyTypes.setStore(eventTypesStore);
    evenyTypes
        .getSelectionModel()
        .addListener(
            Events.SelectionChange,
            new Listener<SelectionChangedEvent<AuditEventTypeWeb>>() {

              public void handleEvent(SelectionChangedEvent<AuditEventTypeWeb> be) {
                List<AuditEventTypeWeb> selections = be.getSelection();
                String selectedTypes = "";
                for (AuditEventTypeWeb type : selections) {
                  if (selectedTypes.isEmpty()) {
                    selectedTypes = type.getAuditEventTypeName();
                  } else {
                    selectedTypes = selectedTypes + ", " + type.getAuditEventTypeName();
                  }
                }
                selectedEvenyTypes.setValue(selectedTypes);

                if (selectedTypes.isEmpty()) {
                  searchButton.disable();
                } else {
                  searchButton.enable();
                }
              }
            });

    DateTimePropertyEditor dateFormat = new DateTimePropertyEditor("yyyy-MM-dd HH:mm");
    startDate = new DateField();
    startDate.setFieldLabel("Start Date Time");
    startDate.setToolTip("yyyy-MM-dd HH:mm");
    startDate.setPropertyEditor(dateFormat);

    endDate = new DateField();
    endDate.setFieldLabel("End Date Time");
    endDate.setToolTip("yyyy-MM-dd HH:mm");
    endDate.setPropertyEditor(dateFormat);

    LayoutContainer main = new LayoutContainer();
    main.setLayout(new ColumnLayout());

    LayoutContainer left = new LayoutContainer();
    left.setStyleAttribute("paddingRight", "10px");
    FormLayout layout = new FormLayout();
    layout.setLabelWidth(130);
    layout.setDefaultWidth(220);
    // layout.setLabelAlign(LabelAlign.TOP);
    left.setLayout(layout);
    left.add(startDate);

    LayoutContainer right = new LayoutContainer();
    right.setStyleAttribute("paddingLeft", "10px");
    layout = new FormLayout();
    // layout.setLabelAlign(LabelAlign.TOP);
    layout.setLabelWidth(130);
    layout.setDefaultWidth(220);
    right.setLayout(layout);
    right.add(endDate);

    main.add(left, new ColumnData(.5));
    main.add(right, new ColumnData(.5));

    HBoxLayoutData dataSelectedTypes = new HBoxLayoutData(new Margins(5, 0, 0, 0));
    searchContainer.add(selectedEvenyTypes, dataSelectedTypes);
    HBoxLayoutData dataTypes = new HBoxLayoutData(new Margins(5, 0, 5, 135));
    searchContainer.add(evenyTypes, dataTypes);

    searchContainer.add(main);
    HBoxLayoutData dataButtons = new HBoxLayoutData(new Margins(0, 0, 5, 0));
    searchContainer.add(setupButtonPanel(3), dataButtons);

    cp.add(searchContainer);
    cp.add(grid);
    cp.setBottomComponent(pagingToolBar);

    container.add(cp);

    LayoutContainer wrapper = (LayoutContainer) Registry.get(Constants.CENTER_PANEL);
    wrapper.removeAll();
    wrapper.add(container);
    wrapper.layout();
    GWT.log("Done Initializing the UI in " + (new java.util.Date().getTime() - time), null);
  }