Ejemplo 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() + " " + JsonUtils.getCurrentYear()));

    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;
  }
Ejemplo n.º 2
0
 private void displayMessage(final String message) {
   if (message != null && !message.isEmpty()) {
     messageDisplay.setHTML(wrapDisplayMessage(message));
     messageDisplay.setVisible(true);
   } else {
     messageDisplay.setVisible(false);
   }
 }