From 8ec9a4a4ee0b129b0223b216e3a48745e95767f7 Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 26 Apr 2021 19:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E4=B8=80=E4=B8=8B=E7=AE=80=E5=8D=95?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=95=B0=E6=8D=AE=E9=9B=86demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/data/SimpleArrayTableDataDemo.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/com/fr/data/SimpleArrayTableDataDemo.java diff --git a/src/main/java/com/fr/data/SimpleArrayTableDataDemo.java b/src/main/java/com/fr/data/SimpleArrayTableDataDemo.java new file mode 100644 index 0000000..47eddf2 --- /dev/null +++ b/src/main/java/com/fr/data/SimpleArrayTableDataDemo.java @@ -0,0 +1,29 @@ +package com.fr.data; + +import java.util.ArrayList; +import java.util.List; + +public class SimpleArrayTableDataDemo extends SimpleTableData { + + /** + * 初始化列头 + * @return + */ + @Override + public String[] initColumnNames() { + return new String[]{"Name", "Score"}; + } + + /** + * 加载行列数据 + * @return + */ + @Override + public List loadData() { + ArrayList valueList = new ArrayList(); + valueList.add(new Object[]{"Alex", 15}); + valueList.add(new Object[]{"Helly", 22}); + valueList.add(new Object[]{"Bobby", 99}); + return valueList; + } +} \ No newline at end of file