Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @UiField
- FlexTable tbl;
- //このListで追加したWidgetを管理する
- List<SubjectItem> itemList = new ArrayList<SubjectItem>();
- public void addItem(String name){
- Label label = new Label(name);
- TextBox count = new TextBox();
- TextBox point = new TextBox();
- SubjectItem item = new SubjectItem();
- //内部管理用
- item.id=id;
- item.label=label;
- item.count=count;
- item.point=point;
- itemList.add(item);
- //UIの設定(画面)
- tbl.setWidget(itemNum,0,label);
- tbl.setWidget(itemNum,1,count);
- tbl.setWidget(itemNum,2,point);
- itemNum++;
- }
- public class SubjectItem {
- //本当はアクセッサメソッドを用意したほうが良い
- public String id;
- public Label label;
- public TextBox count,point;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement