Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
5c7a18c4
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5c7a18c4
编写于
8月 09, 2019
作者:
A
Arty68
提交者:
GitHub
8月 09, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update DataExporterHTML.java
上级
80e41a6a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
12 deletion
+28
-12
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/stream/exporter/DataExporterHTML.java
...aver/tools/transfer/stream/exporter/DataExporterHTML.java
+28
-12
未找到文件。
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/stream/exporter/DataExporterHTML.java
浏览文件 @
5c7a18c4
...
...
@@ -43,6 +43,7 @@ import java.util.List;
*/
public
class
DataExporterHTML
extends
StreamExporterAbstract
{
private
String
name
;
private
static
final
int
IMAGE_FRAME_SIZE
=
200
;
private
List
<
DBDAttributeBinding
>
columns
;
...
...
@@ -63,24 +64,39 @@ public class DataExporterHTML extends StreamExporterAbstract {
@Override
public
void
exportHeader
(
DBCSession
session
)
throws
DBException
,
IOException
{
columns
=
getSite
().
getAttributes
();
name
=
getSite
().
getSource
().
getName
();
columns
=
getSite
().
getAttributes
();
printHeader
();
}
private
void
printHeader
()
{
PrintWriter
out
=
getWriter
();
out
.
write
(
"<html>"
);
out
.
write
(
"\t<head>"
+
"\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">"
+
"\n\t<style>"
+
"table {font-family:\"Lucida Sans Unicode\", \"Lucida Grande\", Sans-Serif;font-size:12px;text-align:left;border-collapse:collapse;margin:10px;} "
+
"th{font-size:14px;font-weight:normal;color:#039;padding:10px 8px;} "
+
"td{color:#669;padding:8px;}"
+
".odd{background:#e8edff;}"
+
"img{padding:5px; border:solid; border-color: #dddddd #aaaaaa #aaaaaa #dddddd; border-width: 1px 2px 2px 1px; background-color:white;}"
+
"</style>\n</head>"
);
out
.
write
(
"<body><table>\n"
);
out
.
write
(
"<html>"
);
out
.
write
(
"<head><style>"
+
"table {border: medium solid #6495ed;"
+
"border-collapse: collapse;"
+
"width: 50%;} "
+
"th{font-family: monospace;"
+
"border: thin solid #6495ed;"
+
"width: 50%;"
+
"padding: 5px;"
+
"background-color: #D0E3FA;"
+
"background-image: url(sky.jpg);}"
+
"td{font-family: sans-serif;"
+
"border: thin solid #6495ed;"
+
"width: 50%;"
+
"padding: 5px;"
+
"text-align: center;"
+
"background-color: #ffffff;}"
+
".odd{background:#e8edff;}"
+
"img{padding:5px; border:solid; border-color: #dddddd #aaaaaa #aaaaaa #dddddd; border-width: 1px 2px 2px 1px; background-color:white;}"
+
"</style></head>"
);
out
.
write
(
"<body><table>"
);
out
.
write
(
"<tr>"
);
writeTextCell
(
name
,
true
);
out
.
write
(
"</tr>"
);
out
.
write
(
"<tr>"
);
for
(
int
i
=
0
,
columnsSize
=
columns
.
size
();
i
<
columnsSize
;
i
++)
{
String
colName
=
columns
.
get
(
i
).
getLabel
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录