/** Should be called when creating a new working set */
  public void refresh() {
    id = null;

    clearCells();
    managerHTML.setText(SimpleSISClient.currentUser.getUsername());
    dateCreatedHTML.setText(FormattedDate.impl.getDate());
  }
 @Override
 public DataSetSummary.View showSizePanel(final String backendSizeRow, final String clientSizeKb) {
   estimatedRowsText.setText(backendSizeRow);
   estimatedSizeText.setText(clientSizeKb);
   statusIcon.setVisible(false);
   return this;
 }
Beispiel #3
0
 public void startTable() {
   HTML headers = new HTML();
   headers.getElement().addClassName("login-table-header");
   headers.setText("Cliente");
   table.setWidget(0, 0, headers);
   headers = new HTML();
   headers.getElement().addClassName("login-table-header");
   headers.setText("Fecha Inicio");
   table.setWidget(0, 1, headers);
   headers = new HTML();
   headers.getElement().addClassName("login-table-header");
   headers.setText("Fecha Fin");
   table.setWidget(0, 2, headers);
 }
 protected void clearCells() {
   managerHTML.setText("");
   dateCreatedHTML.setText("");
   //		workingSetMode.setEnabled(true);
   //		workingSetMode.setSelectedIndex(0);
   //		workingSetName.setEnabled(true);
   filterPanel.setFilter(new AssessmentFilter());
   workingSetName.setText("");
   description.setEnabled(true);
   description.setText("");
   notes.setEnabled(true);
   notes.setText("");
   people.enable();
   people.clearItemsInList();
 }
Beispiel #5
0
 private void setFeedbackValue(double value) {
   String currentValue = "" + value;
   if (resolution == 0) {
     currentValue = "" + new Double(value).intValue();
   }
   feedback.setText(currentValue);
 }
 public void clearSelection() {
   currentValue.setText("");
   for (int i = 0; i < getItemCount(); i++) {
     setItemSelected(i, false);
   }
   selectedItemIndex = -1;
 }
 public void showError(String title, String message) {
   dialogBox.setText(title);
   errorLabel.setText(message);
   closeButton.setVisible(true);
   errorLabel.setStyleName("serverResponseLabelError");
   dialogBox.center();
 }
Beispiel #8
0
  public void setStack(JGroupsStack stack) {
    this.selectedStack = stack;

    headline.setText("Protocols: Stack " + stack.getName());

    dataProvider.setList(stack.getProtocols());
    table.selectDefaultEntity();
  }
  public void setItemSelected(int i, boolean isSelected) {

    if (isSelected && !values.isEmpty()) {
      this.selectedItemIndex = i;
      String selectedValue = values.get(selectedItemIndex);
      currentValue.setText(selectedValue);
      onSelection(selectedValue);
    }
  }
 public void showInfo(String title, String message) {
   dialogBox.setText(title);
   errorLabel.setText(message);
   errorLabel.setStyleName("infoText");
   closeButton.setVisible(false);
   dialogBox.center();
   new Timer() {
     public void run() {
       dialogBox.hide();
     }
   }.schedule(2000);
 }
Beispiel #11
0
  public void setAdapter(ResourceAdapter adapter) {

    this.currentAdapter = adapter;

    configProperties.clearValues();

    headline.setText("Resource Adapter: " + adapter.getArchive());

    List<AdminObject> list = adapter.getAdminObjects();
    dataProvider.setList(list);

    table.selectDefaultEntity();
  }
  public void init(final KieImageType imageType, final int containersRunningCount) {
    if (imageType == null) return;

    final SafeUri imageUri = ClientUtils.getImageUri(imageType);
    typeNameText.setText(imageType.getName());
    if (containersRunningCount < 0) {
      countText.setVisible(false);
    } else if (containersRunningCount == 0
        && showCreateButton
        && !KieImageCategory.OTHERS.equals(imageType.getCategory())) {
      countText.setText(Constants.INSTANCE.createNew());
      countText.setTitle(Constants.INSTANCE.createNewForThisType());
      countText.addStyleName(style.createNewButton());
      countText.addClickHandler(
          new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
              KieImageTypeView.this.fireEvent(new CreateContainerEvent(imageType));
            }
          });
      countText.setVisible(true);
    } else {
      countText.setText(Integer.toString(containersRunningCount));
      countText.removeStyleName(style.createNewButton());
      countText.setVisible(true);
    }

    typeImage.setUrl(imageUri);
    typeImage.setSize(size, size);
    typeImage.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent clickEvent) {
            KieImageTypeView.this.fireEvent(new ImageTypeSelectedEvent(imageType));
          }
        });
    mainPanel.setVisible(true);
  }
Beispiel #13
0
  @Test
  public void text() {
    // Arrange
    HTML html = new HTML("this is a <b>great</b> test.<BR/>Enjoy!");

    // Act
    String result = html.getText();

    // Assert
    assertEquals("this is a great test.Enjoy!", result);

    // Act 2
    html.setText("override <b>not bold text</b>");

    // Assert 2
    assertEquals("override <b>not bold text</b>", html.getText());
  }
  /** Send the name from the nameField to the server and wait for a response. */
  private void sendToServer(RequestBuilder.Method httpMethod) {
    // Then, we send the input to the server.
    textToServerLabel.setText("");
    serverResponseLabel.setText("");

    RequestBuilder request = buildRequest(httpMethod);
    request.setTimeoutMillis(10000);
    request.setCallback(
        new RequestCallback() {

          @Override
          public void onError(Request request, Throwable exception) {
            // Show the error message to the user
            dialogBox.setText("RESTful Call - Failure");
            serverResponseLabel.addStyleName("serverResponseLabelError");
            serverResponseLabel.setHTML(SERVER_ERROR);
            dialogBox.center();
            closeButton.setFocus(true);
          }

          @Override
          public void onResponseReceived(Request request, Response response) {
            dialogBox.setText("RESTful Call");
            serverResponseLabel.removeStyleName("serverResponseLabelError");
            serverResponseLabel.setHTML(
                response.getStatusCode()
                    + " "
                    + response.getStatusText()
                    + "<p>"
                    + response.getText());
            dialogBox.center();
            closeButton.setFocus(true);

            if (response.getStatusCode() == HTTP_OK) {
              parseXml(response.getText());
            }
          }
        });
    try {
      request.send();
    } catch (RequestException re) {
      re.printStackTrace();
    }
  }
Beispiel #15
0
 /*
  * (non-Javadoc)
  *
  * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object)
  */
 public void setValue(String aValue) {
   if (allowHtml) {
     if (aValue != null && aValue.trim().length() > 0) {
       myHtmlView.setHTML(aValue);
       myHtmlView.removeStyleName("empty_field");
     } else {
       myHtmlView.setText(constants.editValue());
       myHtmlView.addStyleName("empty_field");
     }
   } else {
     if (aValue != null && aValue.trim().length() > 0) {
       myTextView.setText(aValue);
       myTextView.removeStyleName("empty_field");
     } else {
       myTextView.setText(constants.editValue());
       myTextView.addStyleName("empty_field");
     }
   }
 }
Beispiel #16
0
 private void initContent(String aValue) {
   if (allowHtml) {
     myHtmlView = new HTML();
     myHtmlView.setStylePrimaryName("field_htmlview");
     if (aValue != null) {
       myHtmlView.setHTML(aValue);
     } else {
       myHtmlView.setText(constants.editValue());
       myHtmlView.addStyleName("empty_field");
     }
     myOuterPanel.add(myHtmlView);
   } else {
     myTextView = new Label();
     myTextView.setStylePrimaryName("field_view");
     if (aValue != null && aValue.length() > 0) {
       myTextView.setText(aValue);
     } else {
       myTextView.setText(constants.editValue());
       myTextView.addStyleName("empty_field");
     }
     myOuterPanel.add(myTextView);
   }
 }
 public void clearSelection() {
   currentDisplayedValue.setText("");
 }
 /**
  * Sets the message to be displayed to the user
  *
  * @param message
  */
 public void setMessage(String message) {
   messageLabel.setText(message);
 }
Beispiel #19
0
 @Override
 public void setError(String errorText) {
   error.setText(errorText);
 }
 @Override
 public void setTitle(String title) {
   titleHtml.setText(title);
 }
Beispiel #21
0
 public void callback(Message message) {
   responsePanel.setText("Calculation result: " + message.get(Double.class, "result") + "");
 }
Beispiel #22
0
 public void setFeedbackValue(double value) {
   feedback.setText(String.valueOf(value));
 }
Beispiel #23
0
 public void setText(String s) {
   html.setText(s);
 }
 public void setText(String text) {
   caption.setText(text);
 }