Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Christnowx
Gephi
提交
0f0da1be
G
Gephi
项目概览
Christnowx
/
Gephi
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gephi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0f0da1be
编写于
4月 15, 2013
作者:
M
Mathieu Bastian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor debug with graph visible
上级
1b4080c7
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
21 addition
and
21 deletion
+21
-21
modules/DesktopContext/src/main/java/org/gephi/desktop/context/ContextPanel.java
...src/main/java/org/gephi/desktop/context/ContextPanel.java
+3
-2
modules/DesktopContext/src/main/java/org/gephi/desktop/context/ContextRefreshThread.java
.../java/org/gephi/desktop/context/ContextRefreshThread.java
+1
-1
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/force/yifanHu/YifanHuLayout.java
.../org/gephi/layout/plugin/force/yifanHu/YifanHuLayout.java
+2
-2
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/forceAtlas/ForceAtlasLayout.java
.../org/gephi/layout/plugin/forceAtlas/ForceAtlasLayout.java
+2
-3
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/forceAtlas2/ForceAtlas2.java
...java/org/gephi/layout/plugin/forceAtlas2/ForceAtlas2.java
+3
-3
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/fruchterman/FruchtermanReingold.java
.../gephi/layout/plugin/fruchterman/FruchtermanReingold.java
+1
-1
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/labelAdjust/LabelAdjust.java
...java/org/gephi/layout/plugin/labelAdjust/LabelAdjust.java
+1
-1
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/random/RandomLayout.java
...ain/java/org/gephi/layout/plugin/random/RandomLayout.java
+1
-1
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/rotate/RotateLayout.java
...ain/java/org/gephi/layout/plugin/rotate/RotateLayout.java
+1
-1
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/scale/ScaleLayout.java
.../main/java/org/gephi/layout/plugin/scale/ScaleLayout.java
+1
-1
modules/VisualizationImpl/src/main/java/org/gephi/visualization/component/ActionsToolbar.java
...ava/org/gephi/visualization/component/ActionsToolbar.java
+5
-5
未找到文件。
modules/DesktopContext/src/main/java/org/gephi/desktop/context/ContextPanel.java
浏览文件 @
0f0da1be
...
...
@@ -97,14 +97,15 @@ public class ContextPanel extends javax.swing.JPanel {
@Override
public
void
run
()
{
Graph
visibleGraph
=
model
.
getGraph
(
model
.
getVisibleView
()
);
Graph
fullGraph
=
model
.
getGraph
(
model
.
getVisibleView
()
);
Graph
visibleGraph
=
model
.
getGraph
Visible
(
);
Graph
fullGraph
=
model
.
getGraph
();
final
int
nodesFull
=
fullGraph
.
getNodeCount
();
final
int
nodesVisible
=
visibleGraph
.
getNodeCount
();
final
int
edgesFull
=
fullGraph
.
getEdgeCount
();
final
int
edgesVisible
=
visibleGraph
.
getEdgeCount
();
final
GraphType
graphType
=
model
.
isDirected
()
?
GraphType
.
DIRECTED
:
model
.
isUndirected
()
?
GraphType
.
UNDIRECTED
:
GraphType
.
MIXED
;
SwingUtilities
.
invokeLater
(
new
Runnable
()
{
@Override
public
void
run
()
{
String
visible
=
NbBundle
.
getMessage
(
ContextPanel
.
class
,
"ContextPanel.visible"
);
String
nodeText
=
String
.
valueOf
(
nodesVisible
);
...
...
modules/DesktopContext/src/main/java/org/gephi/desktop/context/ContextRefreshThread.java
浏览文件 @
0f0da1be
...
...
@@ -69,7 +69,7 @@ public class ContextRefreshThread extends TimerTask {
private
void
initObserver
()
{
if
(
observer
==
null
||
observer
.
isDestroyed
())
{
observer
=
graphModel
.
getGraphObserver
(
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
),
false
);
observer
=
graphModel
.
getGraphObserver
(
graphModel
.
getGraph
Visible
(
),
false
);
}
}
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/force/yifanHu/YifanHuLayout.java
浏览文件 @
0f0da1be
...
...
@@ -228,7 +228,7 @@ public class YifanHuLayout extends AbstractLayout implements Layout {
if
(
graphModel
==
null
)
{
return
;
}
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
energy
=
Float
.
POSITIVE_INFINITY
;
for
(
Node
n
:
graph
.
getNodes
())
{
n
.
setLayoutData
(
new
ForceVector
());
...
...
@@ -247,7 +247,7 @@ public class YifanHuLayout extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
graph
.
readLock
();
Node
[]
nodes
=
graph
.
getNodes
().
toArray
();
for
(
Node
n
:
nodes
)
{
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/forceAtlas/ForceAtlasLayout.java
浏览文件 @
0f0da1be
...
...
@@ -46,10 +46,9 @@ import java.util.List;
import
org.gephi.graph.api.Edge
;
import
org.gephi.graph.api.Graph
;
import
org.gephi.graph.api.Node
;
import
org.gephi.layout.plugin.AbstractLayout
;
import
org.gephi.layout.plugin.ForceVectorUtils
;
import
org.gephi.layout.plugin.ForceVectorNodeLayoutData
;
import
org.gephi.layout.plugin.ForceVectorUtils
;
import
org.gephi.layout.spi.Layout
;
import
org.gephi.layout.spi.LayoutBuilder
;
import
org.gephi.layout.spi.LayoutProperty
;
...
...
@@ -103,7 +102,7 @@ public class ForceAtlasLayout extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
this
.
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
this
.
graph
=
graphModel
.
getGraph
Visible
(
);
graph
.
readLock
();
Node
[]
nodes
=
graph
.
getNodes
().
toArray
();
Edge
[]
edges
=
graph
.
getEdges
().
toArray
();
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/forceAtlas2/ForceAtlas2.java
浏览文件 @
0f0da1be
...
...
@@ -95,7 +95,7 @@ public class ForceAtlas2 implements Layout {
public
void
initAlgo
()
{
speed
=
1
.;
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
graph
.
readLock
();
Node
[]
nodes
=
graph
.
getNodes
().
toArray
();
...
...
@@ -124,7 +124,7 @@ public class ForceAtlas2 implements Layout {
if
(
graphModel
==
null
)
{
return
;
}
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
graph
.
readLock
();
Node
[]
nodes
=
graph
.
getNodes
().
toArray
();
...
...
@@ -384,7 +384,7 @@ public class ForceAtlas2 implements Layout {
int
nodesCount
=
0
;
if
(
graphModel
!=
null
)
{
nodesCount
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
).
getNodeCount
();
nodesCount
=
graphModel
.
getGraph
Visible
(
).
getNodeCount
();
}
// Tuning
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/fruchterman/FruchtermanReingold.java
浏览文件 @
0f0da1be
...
...
@@ -85,7 +85,7 @@ public class FruchtermanReingold extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
this
.
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
this
.
graph
=
graphModel
.
getGraph
Visible
(
);
graph
.
readLock
();
Node
[]
nodes
=
graph
.
getNodes
().
toArray
();
Edge
[]
edges
=
graph
.
getEdges
().
toArray
();
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/labelAdjust/LabelAdjust.java
浏览文件 @
0f0da1be
...
...
@@ -87,7 +87,7 @@ public class LabelAdjust extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
this
.
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
this
.
graph
=
graphModel
.
getGraph
Visible
(
);
graph
.
readLock
();
Node
[]
nodes
=
graph
.
getNodes
().
toArray
();
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/random/RandomLayout.java
浏览文件 @
0f0da1be
...
...
@@ -76,7 +76,7 @@ public class RandomLayout extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
for
(
Node
n
:
graph
.
getNodes
())
{
n
.
setX
((
float
)
(-
size
/
2
+
size
*
random
.
nextDouble
()));
n
.
setY
((
float
)
(-
size
/
2
+
size
*
random
.
nextDouble
()));
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/rotate/RotateLayout.java
浏览文件 @
0f0da1be
...
...
@@ -73,7 +73,7 @@ public class RotateLayout extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
double
sin
=
Math
.
sin
(
getAngle
()
*
Math
.
PI
/
180
);
double
cos
=
Math
.
cos
(
getAngle
()
*
Math
.
PI
/
180
);
double
px
=
0
f
;
...
...
modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/scale/ScaleLayout.java
浏览文件 @
0f0da1be
...
...
@@ -73,7 +73,7 @@ public class ScaleLayout extends AbstractLayout implements Layout {
@Override
public
void
goAlgo
()
{
graph
=
graphModel
.
getGraph
(
graphModel
.
getVisibleView
()
);
graph
=
graphModel
.
getGraph
Visible
(
);
double
xMean
=
0
,
yMean
=
0
;
for
(
Node
n
:
graph
.
getNodes
())
{
xMean
+=
n
.
x
();
...
...
modules/VisualizationImpl/src/main/java/org/gephi/visualization/component/ActionsToolbar.java
浏览文件 @
0f0da1be
...
...
@@ -113,7 +113,7 @@ public class ActionsToolbar extends JToolBar {
color
=
resetColorButton
.
getColor
();
GraphController
gc
=
Lookup
.
getDefault
().
lookup
(
GraphController
.
class
);
GraphModel
gm
=
gc
.
getGraphModel
();
Graph
graph
=
gm
.
getGraph
(
gm
.
getVisibleView
()
);
Graph
graph
=
gm
.
getGraph
Visible
(
);
for
(
Node
n
:
graph
.
getNodes
())
{
n
.
setR
(
color
.
getRed
()
/
255
f
);
n
.
setG
(
color
.
getGreen
()
/
255
f
);
...
...
@@ -139,7 +139,7 @@ public class ActionsToolbar extends JToolBar {
public
void
actionPerformed
(
ActionEvent
e
)
{
GraphController
gc
=
Lookup
.
getDefault
().
lookup
(
GraphController
.
class
);
GraphModel
gm
=
gc
.
getGraphModel
();
Graph
graph
=
gm
.
getGraph
(
gm
.
getVisibleView
()
);
Graph
graph
=
gm
.
getGraph
Visible
(
);
for
(
Node
n
:
graph
.
getNodes
())
{
n
.
setSize
(
size
);
}
...
...
@@ -171,7 +171,7 @@ public class ActionsToolbar extends JToolBar {
public
void
actionPerformed
(
ActionEvent
evt
)
{
GraphController
gc
=
Lookup
.
getDefault
().
lookup
(
GraphController
.
class
);
GraphModel
gm
=
gc
.
getGraphModel
();
Graph
graph
=
gm
.
getGraph
(
gm
.
getVisibleView
()
);
Graph
graph
=
gm
.
getGraph
Visible
(
);
for
(
Node
n
:
graph
.
getNodes
().
toArray
())
{
n
.
getTextProperties
().
setColor
(
null
);
}
...
...
@@ -191,7 +191,7 @@ public class ActionsToolbar extends JToolBar {
public
void
actionPerformed
(
ActionEvent
evt
)
{
GraphController
gc
=
Lookup
.
getDefault
().
lookup
(
GraphController
.
class
);
GraphModel
gm
=
gc
.
getGraphModel
();
Graph
graph
=
gm
.
getGraph
(
gm
.
getVisibleView
()
);
Graph
graph
=
gm
.
getGraph
Visible
(
);
for
(
Node
n
:
graph
.
getNodes
())
{
n
.
getTextProperties
().
setVisible
(
true
);
}
...
...
@@ -211,7 +211,7 @@ public class ActionsToolbar extends JToolBar {
public
void
actionPerformed
(
ActionEvent
e
)
{
GraphController
gc
=
Lookup
.
getDefault
().
lookup
(
GraphController
.
class
);
GraphModel
gm
=
gc
.
getGraphModel
();
Graph
graph
=
gm
.
getGraph
(
gm
.
getVisibleView
()
);
Graph
graph
=
gm
.
getGraph
Visible
(
);
for
(
Node
n
:
graph
.
getNodes
())
{
n
.
getTextProperties
().
setSize
(
1
f
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录