Skip to content

Commit

Permalink
- PrintWidget now accepts SafeHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbiehl committed Apr 2, 2013
1 parent a76deb2 commit ab5a213
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
@@ -1,10 +1,18 @@
package org.fhw.asta.kasse.client.widget.print;

import org.fhw.asta.kasse.client.common.HTMLTableBuilder;

import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.user.client.ui.IsWidget;

public interface PrintWidget extends IsWidget {

public void clear();

public void addHtml(String html);

public void addHtml(SafeHtml safeHtml);

public void addHtml(HTMLTableBuilder htmlTable);

}
@@ -1,6 +1,9 @@
package org.fhw.asta.kasse.client.widget.print;

import org.fhw.asta.kasse.client.common.HTMLTableBuilder;

import com.google.gwt.core.client.GWT;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
Expand All @@ -23,14 +26,22 @@ public PrintWidgetImpl() {

@Override
public void clear() {
htmlWidget.setHTML("");

htmlWidget.setHTML("");
}

@Override
public void addHtml(String html) {
htmlWidget.setHTML(htmlWidget.getHTML()+html);

htmlWidget.setHTML(htmlWidget.getHTML()+html);
}

@Override
public void addHtml(HTMLTableBuilder htmlTable) {
addHtml(htmlTable.toString());
}

@Override
public void addHtml(SafeHtml safeHtml) {
addHtml(safeHtml.asString());
}

}

0 comments on commit ab5a213

Please sign in to comment.