Esempio n. 1
0
  private FlexTable getFooter() {

    ft = new FlexTable();
    ft.addStyleName("perunFooter");

    FlexTable.FlexCellFormatter ftf = ft.getFlexCellFormatter();

    if (!voContact.getHTML().isEmpty()) {
      // show only if any contact is present
      voContact.setHTML(
          "<strong>"
              + ApplicationMessages.INSTANCE.supportContact()
              + "</strong> "
              + voContact.getHTML());
    }

    ft.setWidget(0, 0, voContact);
    ft.setWidget(0, 1, new HTML(PerunWebConstants.INSTANCE.footerPerunCopyright()));

    ftf.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
    ftf.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE);
    ftf.getElement(0, 1).setAttribute("style", "text-wrap: avoid;");
    ftf.setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_RIGHT);
    ftf.setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_MIDDLE);

    return ft;
  }
Esempio n. 2
0
 private ValueEditor<O> addValueEditor(boolean deleteVisible) {
   final ValueEditor<O> editor = getFreshValueEditor();
   currentEditors.add(editor);
   final int rowCount = tableField.getRowCount();
   tableField.setWidget(rowCount, 0, editor.asWidget());
   final DeleteButton deleteButton = new DeleteButton();
   deleteButton.addClickHandler(
       new ClickHandler() {
         @Override
         public void onClick(ClickEvent event) {
           handleDelete(editor);
         }
       });
   tableField.setWidget(rowCount, 1, deleteButton);
   final FlexTable.FlexCellFormatter formatter = tableField.getFlexCellFormatter();
   formatter.setWidth(rowCount, 0, "100%");
   formatter.setVerticalAlignment(rowCount, 0, HasVerticalAlignment.ALIGN_TOP);
   formatter.setWidth(rowCount, 1, "30px");
   formatter.getElement(rowCount, 1).getStyle().setPaddingLeft(1, Style.Unit.PX);
   formatter.setVerticalAlignment(rowCount, 1, HasVerticalAlignment.ALIGN_TOP);
   editor.addDirtyChangedHandler(dirtyChangedHandler);
   editor.addValueChangeHandler(valueChangeHandler);
   deleteButton.setVisible(deleteVisible);
   return editor;
 }