This repository was archived by the owner on Apr 8, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
src/com/akjava/gwt/html5/client/file/ui Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .akjava .gwt .html5 .client .file .ui ;
2+
3+ import com .akjava .gwt .html5 .client .download .HTML5Download ;
4+ import com .google .gwt .user .client .ui .Anchor ;
5+
6+ public class FileNameAndText {
7+ private String name ;
8+ private String text ;
9+ public FileNameAndText (){}
10+ public FileNameAndText (String name ,String text ){
11+ this .name =name ;
12+ this .text =text ;
13+ }
14+ public String getName () {
15+ return name ;
16+ }
17+ public void setName (String name ) {
18+ this .name = name ;
19+ }
20+ public String getText () {
21+ return text ;
22+ }
23+ public void setText (String text ) {
24+ this .text = text ;
25+ }
26+
27+ public Anchor createDownloadLink (String linkText ){
28+ return new HTML5Download ().generateTextDownloadLink (text , name , linkText );
29+ }
30+
31+ }
Original file line number Diff line number Diff line change 1+ package com .akjava .gwt .html5 .client .file .ui ;
2+
3+ import com .google .gwt .cell .client .AbstractCell ;
4+ import com .google .gwt .safehtml .shared .SafeHtmlBuilder ;
5+
6+ public class FileNameAndTextCell extends AbstractCell <FileNameAndText >{
7+
8+ @ Override
9+ public void render (com .google .gwt .cell .client .Cell .Context context ,
10+ FileNameAndText value , SafeHtmlBuilder sb ) {
11+ if (value == null ){
12+ return ;
13+ }
14+ sb .appendHtmlConstant (value .getName ());
15+ }
16+
17+ }
You can’t perform that action at this time.
0 commit comments