Beispiel #1
0
  public ProgressBar() {

    Grid grid = new Grid(1, 10);
    initWidget(grid);
    grid.setSize("200px", "18px");

    Image image = new Image("images/greenbox.jpg");
    image.setVisible(false);
    grid.setWidget(0, 0, image);
    image.setSize("15px", "15px");

    Image image_1 = new Image("images/greenbox.jpg");
    image_1.setVisible(false);
    grid.setWidget(0, 1, image_1);
    image_1.setSize("15px", "15px");

    Image image_2 = new Image("images/greenbox.jpg");
    image_2.setVisible(false);
    grid.setWidget(0, 2, image_2);
    image_2.setSize("15px", "15px");

    Image image_3 = new Image("images/greenbox.jpg");
    image_3.setVisible(false);
    grid.setWidget(0, 3, image_3);
    image_3.setSize("15px", "15px");

    Image image_4 = new Image("images/greenbox.jpg");
    image_4.setVisible(false);
    grid.setWidget(0, 4, image_4);
    image_4.setSize("15px", "15px");

    Image image_5 = new Image("images/greenbox.jpg");
    image_5.setVisible(false);
    grid.setWidget(0, 5, image_5);
    image_5.setSize("15px", "15px");

    Image image_6 = new Image("images/greenbox.jpg");
    image_6.setVisible(false);
    grid.setWidget(0, 6, image_6);
    image_6.setSize("15px", "15px");

    Image image_7 = new Image("images/greenbox.jpg");
    image_7.setVisible(false);
    grid.setWidget(0, 7, image_7);
    image_7.setSize("15px", "15px");

    Image image_8 = new Image("images/greenbox.jpg");
    image_8.setVisible(false);
    grid.setWidget(0, 8, image_8);
    image_8.setSize("15px", "15px");

    Image image_9 = new Image("images/greenbox.jpg");
    image_9.setVisible(false);
    grid.setWidget(0, 9, image_9);
    image_9.setSize("15px", "15px");
  }
Beispiel #2
0
 @Test
 public void checkVisible() {
   Image i = new Image();
   Assert.assertEquals(true, i.isVisible());
   i.setVisible(false);
   Assert.assertEquals(false, i.isVisible());
 }
Beispiel #3
0
  private void turnNameFieldIntoLabel() {
    String name = patternNameField.getText();

    if (name.equalsIgnoreCase(DEFAULT_PATTERN_NAME)) {
      name = "";
    }

    arrowImage.setVisible(true);
    patternNameField.setVisible(false);

    if (name.equals("")) {
      GWTServiceLookup.getSearchService().deleteSavedSearch(currentSearchId, blackHoleCallback);
      currentSearchId = 0;
      starImage.setUrl(STAR_OFF_URL);
    } else {
      // NOTE: currently do not support updated a saved search pattern
      if (currentSearchId == 0) {
        String pattern = autoCompletePatternField.getText();
        createSavedSearch(name, pattern);
      } else {
        updateSavedSearchName(currentSearchId, name);
      }
      patternNameLabel.setText(elipse(name));
      patternNameLabel.setVisible(true);
      starImage.setUrl(STAR_ON_URL);
    }
  }
Beispiel #4
0
 public void reset() {
   loadCategories();
   doNotCreatingItem();
   itemDataFormPanel.reset();
   imgItem.setVisible(false);
   editingExistingData = false;
 }
 @UiHandler("runButton")
 void runSQLCode(ClickEvent event) {
   resultStatusTextBox.setVisible(false);
   presenter.runSQLCode(codeEditor.getValue());
   loadingBar.setVisible(true);
   quickCodeResult.setVisible(false);
 }
  public PlaceBookEntryPreview(final Entry entry) {
    initWidget(uiBinder.createAndBindUi(this));

    container
        .getElement()
        .getStyle()
        .setBackgroundImage(
            "url(" + Resources.IMAGES.placebook_open().getSafeUri().asString() + ")");

    title.setText(entry.getTitle());
    description.setText(entry.getDescription());
    author.setText(entry.getOwnerName());

    if (entry.getPreviewImage() != null) {
      image.setUrl(
          PlaceBooks.getServer().getHostURL()
              + "media?hash="
              + entry.getPreviewImage()
              + "&type=imageitem");
    } else {
      image.setVisible(false);
    }

    container.addDomHandler(
        new ClickHandler() {
          @Override
          public void onClick(final ClickEvent event) {
            PlaceBooks.goTo(new PlaceBookPage(entry.getKey()));
          }
        },
        ClickEvent.getType());
  }
Beispiel #7
0
  public void setData(String[] data) {
    final int baseName = 12;
    final int basePrice = baseName + Constants.NO_OF_EXTRAS_IN_UI;
    final int basePriceValue = basePrice + Constants.NO_OF_EXTRAS_IN_UI;
    tbKeyId.setText(data[0]);
    String imageKey = data[1];
    if (imageKey != null) {
      imgItem.setUrl(GWT.getHostPageBaseURL() + "serveBlob?id=" + data[1]);
      imgItem.setVisible(true);
    }
    tbName.setText(data[2]);
    taDescription.setText(data[3]);
    editingExistingData = true;
    if (data[4] != null) {
      rbSinglePrice.setValue(true);
      rbSinglePrice.setFormValue("single");
      dbSinglePrice.setValue(Double.parseDouble(data[basePriceValue]));
    } else {
      rbMultiplePrice.setValue(true);
      rbMultiplePrice.setFormValue("multiple");
      if (data[5] != null) {
        cbSmall.setValue(true);
        dbSmallPrice.setValue(Double.parseDouble(data[basePriceValue + 1]));
      }
      if (data[6] != null) {
        cbMedium.setValue(true);
        dbMediumPrice.setValue(Double.parseDouble(data[basePriceValue + 2]));
      }
      if (data[7] != null) {
        cbLarge.setValue(true);
        dbLargePrice.setValue(Double.parseDouble(data[basePriceValue + 3]));
      }
      if (data[8] != null) {
        cbTapa.setValue(true);
        dbTapaPrice.setValue(Double.parseDouble(data[basePriceValue + 4]));
      }
      if (data[9] != null) {
        cbHalf.setValue(true);
        dbHalfPrice.setValue(Double.parseDouble(data[basePriceValue + 5]));
      }
      if (data[10] != null) {
        cbFull.setValue(true);
        dbFullPrice.setValue(Double.parseDouble(data[basePriceValue + 6]));
      }
    }
    if (data[11] != null) {
      tbExtrasName.setText(data[11]);
    }

    for (int i = 0; i < Constants.NO_OF_EXTRAS_IN_UI; i++) {
      String name = data[baseName + i];
      if (name != null) {
        tbExtras[i].setText(name);
        tbExtrasPrices[i].setText(data[basePrice + i]);
      }
    }
  }
  public LOpenTrialsDocumentCardPanel(IDomeo domeo) {
    _domeo = domeo;

    initWidget(binder.createAndBindUi(this));
    body.setHeight("100%");
    tabToolsPanel.setHeight(Window.getClientHeight() - 45 + "px");
    // tabToolsPanel.addStyleName(style.tabLayoutPanel());
    urlImage.setVisible(false);
  }
  public InfoPanelWidget() {
    throbber = new Image("throbber1.gif");
    throbber.setVisible(false);
    this.add(throbber);

    information = new Label();
    this.add(information);

    this.addStyleName("easyvote-infoPanel");
  }
  /**
   * Constructor.
   *
   * @param pSelectorCallback called when the selector is clicked. Must <b>not</b> be <code>null
   *     </code>.
   * @param pMoreArrowCallback called when the 'More' arrow is clicked. Must <b>not</b> be <code>
   *     null</code>.
   */
  public CbGenericListItem(
      final CbSelectorCallbackIF<W> pSelectorCallback,
      final CbMoreArrowCallbackIF<W> pMoreArrowCallback) {
    // dummy widget we put on the panel until the display widget is set in setDisplayWidget()
    Label dummy = new Label("<dummy>"); // $NON-NLS-1$

    // image shown when the marker is active
    Image markerActive = new Image(CbConstants.IMG_BUNDLE.markerActive());
    markerActive.setStyleName(CbConstants.CSS.ccColMarker());
    markerActive.setVisible(false);
    Image markerPassive = new Image(CbConstants.IMG_BUNDLE.markerPassive());
    markerPassive.setStyleName(CbConstants.CSS.ccColMarker());

    CbMoreArrow moreArrow = new CbMoreArrow(pMoreArrowCallback.getTooltipText());
    moreArrow.addStyleName(CbConstants.CSS.cbMoreArrowLabelSmaller());

    iDisplayWidgetWrapper = new FlowPanel();
    iDisplayWidgetWrapper.add(dummy);
    iDisplayWidgetWrapper.setStyleName(CbConstants.CSS.cbDisplayWidgetWrapper());

    final FlowPanel fp = new FlowPanel();
    fp.setStyleName(CbConstants.CSS.cbGeneralListItem());
    fp.add(markerActive);
    fp.add(markerPassive);
    fp.add(iDisplayWidgetWrapper);
    fp.add(moreArrow);

    final ClickHandler clickHandler =
        new ClickHandler() {
          @Override
          public void onClick(final ClickEvent pEvent) {
            int pos = COL_SELECTOR;
            if (!fp.getWidget(pos).isVisible()) {
              pos++;
            }
            if (CbUtil.isInside(fp.getWidget(pos), pEvent)) {
              pSelectorCallback.onItemSelected(CbGenericListItem.this);
            } else {
              pMoreArrowCallback.onMoreArrowClicked(CbGenericListItem.this);
            }
          }
        };
    addClickHandler(clickHandler);
    initWidget(fp);
  }
Beispiel #11
0
 @UiHandler("fuImageFile")
 void onFuImageFileChange(ChangeEvent event) {
   imgItem.setVisible(false);
 }
Beispiel #12
0
 @UiHandler("basePanel")
 void hideCloseButton(MouseOutEvent event) {
   closeButton.setVisible(false);
 }
Beispiel #13
0
 public void setDownVisible(boolean visible) {
   moveDownIcon.setVisible(visible);
 }
Beispiel #14
0
 public void setUpVisible(boolean visible) {
   moveUpIcon.setVisible(visible);
 }
 public void noDeleteButton() {
   deleteButton.setVisible(false);
   // courseHorizontalPanel.remove(deleteButton);
 }
  public void refresh() {
    Resources _resources = Domeo.resources;

    try {
      init();
      uriField.setValue(_resource.getUrl());
      // sourceField.add(new HTML("<img src='" + Domeo.resources.externalLinkIcon().getURL() + "'/>
      // <a href='" +
      //	_resource.getSource().getHomepage() + "' target='_blank'>"+_resource.getSource().getName()
      // + "</a> "));

      String synonyms = _resource.getIsAbout().getSynonyms();
      aboutField.add(
          new HTML(
              _resource.getIsAbout().getLabel()
                  + " "
                  + (_resource.getIsAbout().getSynonyms() != null ? synonyms : "")));

      if (_domeo.getExtractorsManager().isExtractorDefined()) {
        urlImage.setResource(_resources.checkIcon());
        urlImage.setTitle(
            "Known resource, executed extractor '"
                + _domeo.getExtractorsManager().getExtractorLabel()
                + "'");
        urlImage.setVisible(true);
      } else {
        urlImage.setVisible(false);
      }

      if (_resource != null) {
        extractionProvenanceImage.setUrl(
            Domeo.resources.pluginsGrayLittleIcon().getSafeUri().asString());
        extractionProvenanceImage.setTitle(_resource.getCreator().getName());
        extractorProvenanceDetails.setText("Extracted by " + _resource.getCreator().getName());
        extractionSourceDetails.setHTML(
            "Source <a href='"
                + _resource.getSource().getHomepage()
                + "' target='_blank'> <img src='"
                + Domeo.resources.externalLinkIcon().getSafeUri().asString()
                + "'/> "
                + _resource.getSource().getName()
                + "</a>");
        extractionDateDetails.setText("On " + _resource.getFormattedCreationDate());
      }
    } catch (Exception e) {
      _domeo
          .getLogger()
          .exception(this, "Exception while rendering OpenTrials resource info " + e.getMessage());
      body.clear();
      body.add(
          new HTML(
              "<img src='"
                  + _resources.crossLittleIcon().getSafeUri().asString()
                  + "'/> Exception while rendering OpenTrials resource info "
                  + e.getMessage()));
    }

    // References
    try {
      CitationReferencesPanel p = new CitationReferencesPanel(_domeo, false);
      referencesPanel.clear();
      referencesPanel.add(p);
    } catch (Exception e) {
      _domeo
          .getLogger()
          .exception(this, "Exception while rendering resource info " + e.getMessage());
      referencesPanel.clear();
      referencesPanel.add(
          new HTML(
              "<img src='"
                  + _resources.crossLittleIcon().getSafeUri().asString()
                  + "'/> Exception while rendering PubMed resource info "
                  + e.getMessage()));
    }

    // Generic Document Resource
    try {
      LDocumentResourceCardPanel d = new LDocumentResourceCardPanel(_domeo);
      d.initializeLens(_resource, _parameters);
      contentPanel.clear();
      contentPanel.add(d);
    } catch (Exception e) {
      _domeo
          .getLogger()
          .exception(this, "Exception while rendering resource info " + e.getMessage());
      body.clear();
      body.add(
          new HTML(
              "<img src='"
                  + _resources.crossLittleIcon().getSafeUri().asString()
                  + "'/> Exception while rendering OpenTrials resource info "
                  + e.getMessage()));
    }
  }
Beispiel #17
0
 public void useAppLogo(boolean useLogo) {
   appNameImage.setVisible(useLogo);
   appNameLabel.setVisible(!useLogo);
 }
Beispiel #18
0
 @UiHandler("basePanel")
 void showCloseButton(MouseOverEvent event) {
   closeButton.setVisible(true);
 }
 @Override
 public void setInProgress(boolean inProgress) {
   saveChangesEnabled(!inProgress);
   inProgressImg.setVisible(inProgress);
 }
 public void setInformation(String info, boolean showThrobber) {
   information.setText(info);
   throbber.setVisible(showThrobber);
 }