Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
75445f3c
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,发现更多精彩内容 >>
提交
75445f3c
编写于
8月 20, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GraphML format support
上级
d7d614ef
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
28 addition
and
13 deletion
+28
-13
plugins/org.jkiss.dbeaver.ext.erd/src/org/jkiss/dbeaver/ext/erd/editor/ERDExportGraphML.java
...rc/org/jkiss/dbeaver/ext/erd/editor/ERDExportGraphML.java
+11
-13
plugins/org.jkiss.dbeaver.ext.erd/src/org/jkiss/dbeaver/ext/erd/figures/AttributeListFigure.java
...rg/jkiss/dbeaver/ext/erd/figures/AttributeListFigure.java
+13
-0
plugins/org.jkiss.dbeaver.ext.erd/src/org/jkiss/dbeaver/ext/erd/figures/EntityFigure.java
...d/src/org/jkiss/dbeaver/ext/erd/figures/EntityFigure.java
+4
-0
未找到文件。
plugins/org.jkiss.dbeaver.ext.erd/src/org/jkiss/dbeaver/ext/erd/editor/ERDExportGraphML.java
浏览文件 @
75445f3c
...
...
@@ -20,7 +20,6 @@ package org.jkiss.dbeaver.ext.erd.editor;
import
org.eclipse.draw2d.Bendpoint
;
import
org.eclipse.draw2d.geometry.Rectangle
;
import
org.eclipse.swt.graphics.Color
;
import
org.eclipse.swt.graphics.FontData
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.ext.erd.figures.AttributeListFigure
;
import
org.jkiss.dbeaver.ext.erd.figures.EntityFigure
;
...
...
@@ -101,9 +100,9 @@ public class ERDExportGraphML
{
// Generic node
EntityPart
p
art
=
diagramPart
.
getEntityPart
(
entity
);
EntityFigure
figure
=
(
EntityFigure
)
p
art
.
getFigure
();
Rectangle
partBounds
=
p
art
.
getBounds
();
EntityPart
entityP
art
=
diagramPart
.
getEntityPart
(
entity
);
EntityFigure
entityFigure
=
(
EntityFigure
)
entityP
art
.
getFigure
();
Rectangle
partBounds
=
entityP
art
.
getBounds
();
xml
.
startElement
(
"y:GenericNode"
);
xml
.
addAttribute
(
"configuration"
,
"com.yworks.entityRelationship.big_entity"
);
...
...
@@ -117,21 +116,21 @@ public class ERDExportGraphML
// Fill
xml
.
startElement
(
"y:Fill"
);
xml
.
addAttribute
(
"color"
,
getHtmlColor
(
f
igure
.
getBackgroundColor
()));
xml
.
addAttribute
(
"color"
,
getHtmlColor
(
entityF
igure
.
getBackgroundColor
()));
//xml.addAttribute("color2", partBounds.width);
xml
.
addAttribute
(
"transparent"
,
"false"
);
xml
.
endElement
();
// Border
xml
.
startElement
(
"y:BorderStyle"
);
xml
.
addAttribute
(
"color"
,
getHtmlColor
(
f
igure
.
getForegroundColor
()));
xml
.
addAttribute
(
"color"
,
getHtmlColor
(
entityF
igure
.
getForegroundColor
()));
xml
.
addAttribute
(
"type"
,
"line"
);
xml
.
addAttribute
(
"width"
,
"1.0"
);
xml
.
endElement
();
{
// Entity Name
Rectangle
nameBounds
=
f
igure
.
getNameLabel
().
getBounds
();
Rectangle
nameBounds
=
entityF
igure
.
getNameLabel
().
getBounds
();
xml
.
startElement
(
"y:NodeLabel"
);
xml
.
addAttribute
(
"alignment"
,
"center"
);
...
...
@@ -143,8 +142,8 @@ public class ERDExportGraphML
xml
.
addAttribute
(
"hasLineColor"
,
"false"
);
xml
.
addAttribute
(
"modelName"
,
"internal"
);
xml
.
addAttribute
(
"modelPosition"
,
"t"
);
xml
.
addAttribute
(
"backgroundColor"
,
getHtmlColor
(
f
igure
.
getNameLabel
().
getBackgroundColor
()));
xml
.
addAttribute
(
"textColor"
,
getHtmlColor
(
f
igure
.
getNameLabel
().
getForegroundColor
()));
xml
.
addAttribute
(
"backgroundColor"
,
getHtmlColor
(
entityF
igure
.
getNameLabel
().
getBackgroundColor
()));
xml
.
addAttribute
(
"textColor"
,
getHtmlColor
(
entityF
igure
.
getNameLabel
().
getForegroundColor
()));
xml
.
addAttribute
(
"visible"
,
"true"
);
xml
.
addAttribute
(
"height"
,
nameBounds
.
height
());
...
...
@@ -159,9 +158,8 @@ public class ERDExportGraphML
{
// Attributes
AttributeListFigure
columnsFigure
=
f
igure
.
getColumnsFigure
();
AttributeListFigure
columnsFigure
=
entityF
igure
.
getColumnsFigure
();
Rectangle
attrsBounds
=
columnsFigure
.
getBounds
();
FontData
attrsFont
=
columnsFigure
.
getFont
().
getFontData
()[
0
];
xml
.
startElement
(
"y:NodeLabel"
);
xml
.
addAttribute
(
"alignment"
,
"left"
);
...
...
@@ -173,8 +171,8 @@ public class ERDExportGraphML
xml
.
addAttribute
(
"hasLineColor"
,
"false"
);
xml
.
addAttribute
(
"modelName"
,
"custom"
);
xml
.
addAttribute
(
"modelPosition"
,
"t"
);
xml
.
addAttribute
(
"backgroundColor"
,
getHtmlColor
(
figure
.
getNameLabel
()
.
getBackgroundColor
()));
xml
.
addAttribute
(
"textColor"
,
getHtmlColor
(
figure
.
getNameLabel
()
.
getForegroundColor
()));
xml
.
addAttribute
(
"backgroundColor"
,
getHtmlColor
(
columnsFigure
.
getBackgroundColor
()));
xml
.
addAttribute
(
"textColor"
,
getHtmlColor
(
columnsFigure
.
getForegroundColor
()));
xml
.
addAttribute
(
"visible"
,
"true"
);
xml
.
addAttribute
(
"height"
,
attrsBounds
.
height
());
...
...
plugins/org.jkiss.dbeaver.ext.erd/src/org/jkiss/dbeaver/ext/erd/figures/AttributeListFigure.java
浏览文件 @
75445f3c
...
...
@@ -27,6 +27,9 @@ import org.eclipse.ui.PlatformUI;
import
org.jkiss.dbeaver.ext.erd.ERDConstants
;
import
org.jkiss.dbeaver.ext.erd.model.ERDEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Figure used to hold the column labels
* @author Serge Rieder
...
...
@@ -54,6 +57,16 @@ public class AttributeListFigure extends Figure
setOpaque
(
true
);
}
public
List
<
AttributeItemFigure
>
getAttributes
()
{
List
<
AttributeItemFigure
>
result
=
new
ArrayList
<
AttributeItemFigure
>();
for
(
Object
child
:
getChildren
())
{
if
(
child
instanceof
AttributeItemFigure
)
{
result
.
add
((
AttributeItemFigure
)
child
);
}
}
return
result
;
}
class
ColumnFigureBorder
extends
AbstractBorder
{
...
...
plugins/org.jkiss.dbeaver.ext.erd/src/org/jkiss/dbeaver/ext/erd/figures/EntityFigure.java
浏览文件 @
75445f3c
...
...
@@ -105,6 +105,10 @@ public class EntityFigure extends Figure {
return
nameLabel
;
}
public
AttributeListFigure
getKeyFigure
()
{
return
keyFigure
;
}
/**
* @return the figure containing the column lables
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录