OLD | NEW |
---|---|
(Empty) | |
1 package org.chromium.distiller.webdocument; | |
2 | |
3 import com.google.gwt.dom.client.Document; | |
4 import com.google.gwt.dom.client.Element; | |
5 | |
6 public class WebFigure extends WebImage { | |
7 | |
8 private String figCaption; | |
9 | |
10 public WebFigure(Element e, int w, int h, String src, String caption) { | |
11 super(e, w, h, src); | |
12 figCaption = caption; | |
13 } | |
14 | |
15 @Override | |
16 public String generateOutput(boolean textOnly) { | |
wychen
2016/06/02 23:48:49
This doesn't work for text-only mode. Add this as
marcelorcorrea
2016/06/06 20:38:30
Acknowledged.
| |
17 Element fig = Document.get().createElement("FIGURE"); | |
18 fig.setInnerHTML(super.generateOutput(textOnly)); | |
wychen
2016/06/02 23:48:49
After that, textOnly can only be false here.
marcelorcorrea
2016/06/06 20:38:30
Acknowledged.
| |
19 if (!figCaption.isEmpty()) { | |
20 Element cap = Document.get().createElement("FIGCAPTION"); | |
21 cap.setInnerText(figCaption); | |
22 fig.appendChild(cap); | |
23 } | |
24 return fig.getString(); | |
25 } | |
26 } | |
OLD | NEW |