protected void setValue(FileModel fileModel) {
   String currentValue = getDisplayedContent(fileModel);
   // if current value has changed, update view with current value
   if (!Util.equalWithNull(currentValue, this.currentValue)) {
     updateCurrentValue(currentValue);
   }
 }
 @Override
 public void onSave() {
   String currentValue = getFileBasedMiniAppView().getValue();
   // if current value has changed, update store, which publishes to other
   // presenters
   if (!Util.equalWithNull(currentValue, this.currentValue)) {
     this.currentValue = currentValue;
     getFileModel().setContent(currentValue);
     getFileModel().setLastModified(new Date()); // TODO: move to FileSystem
     getFileSystem().getTreeStore().update(getFileModel());
   }
 }
  @SuppressWarnings({"unchecked", "rawtypes"})
  @Override
  protected void updateContent() {
    String textHtml = "";

    if (toolTipConfig.getRenderer() != null) {
      Object data = toolTipConfig.getData();
      ToolTipRenderer r = toolTipConfig.getRenderer();
      SafeHtml html = r.renderToolTip(data);
      textHtml = html.asString();
    } else {
      textHtml = Util.isEmptyString(bodyHtml) ? " " : bodyHtml;
    }

    appearance.updateContent(getElement(), titleHtml, textHtml);
  }
Ejemplo n.º 4
0
 /**
  * Sets the regular expression.
  *
  * @param regex the regular expression
  */
 public void setRegex(String regex) {
   if (!Util.equalWithNull(this.regex, regex)) {
     compiledRegExp = null;
     this.regex = regex;
   }
 }