Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sanbo_xyz
Gephi
提交
8ae43a41
G
Gephi
项目概览
sanbo_xyz
/
Gephi
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
8ae43a41
编写于
12月 30, 2022
作者:
M
Mathieu Bastian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update JOGL, clean-up NB modes and dispose of GL resources on TopComponent close to address #2546
上级
4457c42b
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
151 addition
and
123 deletion
+151
-123
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/contextmodeWsmode.xml
...esources/org/gephi/branding/desktop/contextmodeWsmode.xml
+8
-12
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/editorWsmode.xml
...ain/resources/org/gephi/branding/desktop/editorWsmode.xml
+7
-5
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/filtersmodeWsmode.xml
...esources/org/gephi/branding/desktop/filtersmodeWsmode.xml
+8
-11
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/layoutmodeWsmode.xml
...resources/org/gephi/branding/desktop/layoutmodeWsmode.xml
+8
-9
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/rankingmodeWsmode.xml
...esources/org/gephi/branding/desktop/rankingmodeWsmode.xml
+8
-10
modules/VisualizationImpl/pom.xml
modules/VisualizationImpl/pom.xml
+43
-44
modules/VisualizationImpl/src/main/java/org/gephi/visualization/apiimpl/GraphDrawable.java
...n/java/org/gephi/visualization/apiimpl/GraphDrawable.java
+4
-0
modules/VisualizationImpl/src/main/java/org/gephi/visualization/component/GraphTopComponent.java
.../org/gephi/visualization/component/GraphTopComponent.java
+49
-23
modules/VisualizationImpl/src/main/java/org/gephi/visualization/swing/GLAbstractListener.java
...ava/org/gephi/visualization/swing/GLAbstractListener.java
+15
-2
modules/VisualizationImpl/src/main/java/org/gephi/visualization/swing/GraphCanvas.java
.../main/java/org/gephi/visualization/swing/GraphCanvas.java
+0
-6
modules/application/src/main/resources/gephi.conf
modules/application/src/main/resources/gephi.conf
+1
-1
未找到文件。
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/contextmodeWsmode.xml
浏览文件 @
8ae43a41
...
...
@@ -4,13 +4,9 @@
<kind
type=
"view"
/>
<state
type=
"joined"
/>
<constraints>
<path
orientation=
"horizontal"
number=
"60"
weight=
"0.7"
/>
<path
orientation=
"vertical"
number=
"40"
weight=
"0.7"
/>
<path
orientation=
"horizontal"
number=
"80"
weight=
"0.252324037184595"
/>
<path
orientation=
"vertical"
number=
"81"
weight=
"0.10926694329183956"
/>
<path
orientation=
"horizontal"
number=
"90"
weight=
"0.17"
/>
<path
orientation=
"vertical"
number=
"5"
weight=
"0.13"
/>
</constraints>
<bounds
x=
"0"
y=
"0"
width=
"0"
height=
"0"
/>
<frame
state=
"0"
/>
<empty-behavior
permanent=
"false"
/>
<empty-behavior
permanent=
"true"
/>
</mode>
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/editorWsmode.xml
浏览文件 @
8ae43a41
...
...
@@ -3,8 +3,10 @@
<name
unique=
"editor"
/>
<kind
type=
"editor"
/>
<state
type=
"joined"
/>
<!--<bounds x="0" y="0" width="0" height="0"/>-->
<constraints>
<path
orientation=
"horizontal"
number=
"20"
weight=
"0.66"
/>
<path
orientation=
"vertical"
number=
"60"
weight=
"1.0"
/>
</constraints>
<frame
state=
"0"
/>
<empty-behavior
permanent=
"true"
/>
</mode>
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/filtersmodeWsmode.xml
浏览文件 @
8ae43a41
...
...
@@ -4,13 +4,10 @@
<kind
type=
"view"
/>
<state
type=
"joined"
/>
<constraints>
<path
orientation=
"horizontal"
number=
"60"
weight=
"0.7"
/>
<path
orientation=
"vertical"
number=
"40"
weight=
"0.7"
/>
<path
orientation=
"horizontal"
number=
"80"
weight=
"0.252324037184595"
/>
<path
orientation=
"vertical"
number=
"82"
weight=
"0.8865836791147994"
/>
<path
orientation=
"horizontal"
number=
"90"
weight=
"0.17"
/>
<path
orientation=
"vertical"
number=
"7"
weight=
"0.87"
/>
</constraints>
<bounds
x=
"1260"
y=
"536"
width=
"252"
height=
"306"
/>
<frame
state=
"0"
/>
<empty-behavior
permanent=
"true"
/>
</mode>
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/layoutmodeWsmode.xml
浏览文件 @
8ae43a41
...
...
@@ -4,11 +4,10 @@
<kind
type=
"view"
/>
<state
type=
"joined"
/>
<constraints>
<path
orientation=
"horizontal"
number=
"20"
weight=
"0.2
"
/>
<path
orientation=
"vertical"
number=
"6
0"
weight=
"0.6"
/>
<path
orientation=
"horizontal"
number=
"10"
weight=
"0.17
"
/>
<path
orientation=
"vertical"
number=
"5
0"
weight=
"0.6"
/>
</constraints>
<bounds
x=
"168"
y=
"210"
width=
"537"
height=
"479"
/>
<frame
state=
"0"
/>
<empty-behavior
permanent=
"true"
/>
</mode>
modules/DesktopBranding/src/main/resources/org/gephi/branding/desktop/rankingmodeWsmode.xml
浏览文件 @
8ae43a41
...
...
@@ -4,11 +4,9 @@
<kind
type=
"view"
/>
<state
type=
"joined"
/>
<constraints>
<path
orientation=
"horizontal"
number=
"20"
weight=
"0.2
"
/>
<path
orientation=
"vertical"
number=
"2
0"
weight=
"0.4"
/>
<path
orientation=
"horizontal"
number=
"10"
weight=
"0.17
"
/>
<path
orientation=
"vertical"
number=
"4
0"
weight=
"0.4"
/>
</constraints>
<bounds
x=
"0"
y=
"0"
width=
"0"
height=
"0"
/>
<frame
state=
"0"
/>
<active-tc
id=
"RankingTopComponent"
/>
<empty-behavior
permanent=
"false"
/>
<empty-behavior
permanent=
"true"
/>
</mode>
modules/VisualizationImpl/pom.xml
浏览文件 @
8ae43a41
...
...
@@ -16,9 +16,8 @@
<name>
VisualizationImpl
</name>
<properties>
<jogl.version>
2.4.0-rc-20210111
</jogl.version>
<jogl.version>
v2.4.0-rc4
</jogl.version>
<jogl.version.jogl.all>
2.4.0-rc-20221118
</jogl.version.jogl.all>
<jogl.version.natives.macos>
2.4.0-rc4
</jogl.version.natives.macos>
</properties>
<dependencies>
...
...
@@ -86,6 +85,26 @@
<groupId>
org.netbeans.api
</groupId>
<artifactId>
org-openide-util-ui
</artifactId>
</dependency>
<dependency>
<groupId>
org.netbeans.api
</groupId>
<artifactId>
org-openide-dialogs
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
project-api
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
desktop-project
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
utils-longtask
</artifactId>
</dependency>
<dependency>
<groupId>
org.netbeans.api
</groupId>
<artifactId>
org-openide-modules
</artifactId>
</dependency>
<!-- Gluegen -->
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
...
...
@@ -94,33 +113,28 @@
</dependency>
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
<artifactId>
gluegen-rt
</artifactId>
<artifactId>
gluegen-rt
-natives-linux-amd64
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-linux-amd64
</classifier>
</dependency>
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
<artifactId>
gluegen-rt
</artifactId>
<artifactId>
gluegen-rt
-natives-linux-i586
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-linux-i586
</classifier>
</dependency>
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
<artifactId>
gluegen-rt
</artifactId>
<version>
${jogl.version.natives.macos}
</version>
<classifier>
natives-macosx-universal
</classifier>
<artifactId>
gluegen-rt-natives-macosx-universal
</artifactId>
<version>
${jogl.version}
</version>
</dependency>
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
<artifactId>
gluegen-rt
</artifactId>
<artifactId>
gluegen-rt
-natives-windows-amd64
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-windows-amd64
</classifier>
</dependency>
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
<artifactId>
gluegen-rt
</artifactId>
<artifactId>
gluegen-rt
-natives-windows-i586
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-windows-i586
</classifier>
</dependency>
<!-- JOGL -->
<dependency>
...
...
@@ -130,53 +144,28 @@
</dependency>
<dependency>
<groupId>
org.jogamp.jogl
</groupId>
<artifactId>
jogl-all
</artifactId>
<artifactId>
jogl-all
-natives-linux-amd64
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-linux-amd64
</classifier>
</dependency>
<dependency>
<groupId>
org.jogamp.jogl
</groupId>
<artifactId>
jogl-all
</artifactId>
<artifactId>
jogl-all
-natives-linux-i586
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-linux-i586
</classifier>
</dependency>
<dependency>
<groupId>
org.jogamp.jogl
</groupId>
<artifactId>
jogl-all
</artifactId>
<version>
${jogl.version.natives.macos}
</version>
<classifier>
natives-macosx-universal
</classifier>
<artifactId>
jogl-all-natives-macosx-universal
</artifactId>
<version>
${jogl.version}
</version>
</dependency>
<dependency>
<groupId>
org.jogamp.jogl
</groupId>
<artifactId>
jogl-all
</artifactId>
<artifactId>
jogl-all
-natives-windows-amd64
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-windows-amd64
</classifier>
</dependency>
<dependency>
<groupId>
org.jogamp.jogl
</groupId>
<artifactId>
jogl-all
</artifactId>
<artifactId>
jogl-all
-natives-windows-i586
</artifactId>
<version>
${jogl.version}
</version>
<classifier>
natives-windows-i586
</classifier>
</dependency>
<dependency>
<groupId>
org.netbeans.api
</groupId>
<artifactId>
org-openide-dialogs
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
project-api
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
desktop-project
</artifactId>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
utils-longtask
</artifactId>
</dependency>
<dependency>
<groupId>
org.netbeans.api
</groupId>
<artifactId>
org-openide-modules
</artifactId>
</dependency>
</dependencies>
...
...
@@ -215,4 +204,14 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
jogl-jzy3d
</id>
<name>
JOGL Jzy3d
</name>
<url>
https://maven.jzy3d.org/releases
</url>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
</project>
modules/VisualizationImpl/src/main/java/org/gephi/visualization/apiimpl/GraphDrawable.java
浏览文件 @
8ae43a41
...
...
@@ -92,10 +92,14 @@ public interface GraphDrawable {
public
void
initConfig
(
GL2
gl
);
public
void
initMouseEvents
();
public
GraphicalConfiguration
getGraphicalConfiguration
();
public
void
destroy
();
public
boolean
isDestroyed
();
public
Point
getLocationOnScreen
();
public
void
reinitWindow
();
...
...
modules/VisualizationImpl/src/main/java/org/gephi/visualization/component/GraphTopComponent.java
浏览文件 @
8ae43a41
...
...
@@ -49,12 +49,10 @@ import java.awt.event.KeyEvent;
import
javax.swing.JComponent
;
import
javax.swing.JPanel
;
import
javax.swing.SwingUtilities
;
import
javax.swing.UIManager
;
import
org.gephi.project.api.ProjectController
;
import
org.gephi.project.api.Workspace
;
import
org.gephi.project.api.WorkspaceListener
;
import
org.gephi.tools.api.ToolController
;
import
org.gephi.ui.utils.UIUtils
;
import
org.gephi.visualization.VizController
;
import
org.gephi.visualization.apiimpl.GraphDrawable
;
import
org.gephi.visualization.opengl.AbstractEngine
;
...
...
@@ -63,6 +61,7 @@ import org.openide.awt.ActionID;
import
org.openide.awt.ActionReference
;
import
org.openide.util.Lookup
;
import
org.openide.util.NbBundle
;
import
org.openide.util.Utilities
;
import
org.openide.windows.TopComponent
;
import
org.openide.windows.WindowManager
;
...
...
@@ -94,13 +93,15 @@ public class GraphTopComponent extends TopComponent implements AWTEventListener
initComponents
();
setName
(
NbBundle
.
getMessage
(
GraphTopComponent
.
class
,
"CTL_GraphTopComponent"
));
// setToolTipText(NbBundle.getMessage(GraphTopComponent.class, "HINT_GraphTopComponent"));
//Request component activation and therefore initialize JOGL2 component
WindowManager
.
getDefault
().
invokeWhenUIReady
(
new
Runnable
()
{
@Override
public
void
run
()
{
open
();
if
(!
Utilities
.
isMac
())
{
WindowManager
.
getDefault
().
invokeWhenUIReady
(
this
::
initDrawable
);
}
initKeyEventContextMenuActionMappings
();
}
private
void
initDrawable
()
{
SwingUtilities
.
invokeLater
(
new
Runnable
()
{
@Override
public
void
run
()
{
...
...
@@ -113,17 +114,15 @@ public class GraphTopComponent extends TopComponent implements AWTEventListener
requestActive
();
add
(
drawable
.
getGraphComponent
(),
BorderLayout
.
CENTER
);
remove
(
waitingLabel
);
drawable
.
initMouseEvents
();
}
});
}
});
initKeyEventContextMenuActionMappings
();
// add(drawable.getGraphComponent(), BorderLayout.CENTER);
// remove(waitingLabel);
}
private
void
initCollapsePanel
()
{
if
(
vizBarController
!=
null
)
{
return
;
}
vizBarController
=
new
VizBarController
();
if
(
VizController
.
getInstance
().
getVizConfig
().
isShowVizVar
())
{
collapsePanel
.
init
(
vizBarController
.
getToolbar
(),
vizBarController
.
getExtendedBar
(),
false
);
...
...
@@ -150,6 +149,9 @@ public class GraphTopComponent extends TopComponent implements AWTEventListener
// }
private
void
initToolPanels
()
{
if
(
toolbar
!=
null
)
{
return
;
}
final
ToolController
tc
=
Lookup
.
getDefault
().
lookup
(
ToolController
.
class
);
if
(
tc
!=
null
)
{
if
(
VizController
.
getInstance
().
getVizConfig
().
isToolbar
())
{
...
...
@@ -308,4 +310,28 @@ public class GraphTopComponent extends TopComponent implements AWTEventListener
String
version
=
p
.
getProperty
(
"version"
);
// TODO read your settings according to their version
}
@Override
protected
void
componentClosed
()
{
super
.
componentClosed
();
// On Mac we dispose the canvas to avoid haning issues
if
(
Utilities
.
isMac
())
{
engine
.
stopDisplay
();
drawable
.
destroy
();
remove
(
drawable
.
getGraphComponent
());
add
(
waitingLabel
,
BorderLayout
.
CENTER
);
}
}
@Override
protected
void
componentOpened
()
{
super
.
componentOpened
();
// On Mac we destroy and reinit the drawable here instead than once
// to address freeze issues within JOGL
if
(
Utilities
.
isMac
())
{
initDrawable
();
}
}
}
modules/VisualizationImpl/src/main/java/org/gephi/visualization/swing/GLAbstractListener.java
浏览文件 @
8ae43a41
...
...
@@ -110,6 +110,7 @@ public abstract class GLAbstractListener implements GLEventListener, VizArchitec
private
boolean
showGLLog
=
true
;
private
volatile
boolean
resizing
=
false
;
private
double
aspectRatio
=
0
;
private
boolean
destroyed
=
false
;
public
GLAbstractListener
()
{
this
.
vizController
=
VizController
.
getInstance
();
...
...
@@ -129,9 +130,14 @@ public abstract class GLAbstractListener implements GLEventListener, VizArchitec
cameraLocation
=
vizController
.
getVizConfig
().
getDefaultCameraPosition
();
cameraTarget
=
vizController
.
getVizConfig
().
getDefaultCameraTarget
();
initMouseEvents
();
}
@Override
public
void
initMouseEvents
()
{
//Mouse events
if
(
vizController
.
getVizConfig
().
isReduceFpsWhenMouseOut
()
||
vizController
.
getVizConfig
().
isPauseLoopWhenMouseOut
())
{
if
(
graphMouseAdapter
==
null
&&
(
vizController
.
getVizConfig
().
isReduceFpsWhenMouseOut
()
||
vizController
.
getVizConfig
().
isPauseLoopWhenMouseOut
())
)
{
graphMouseAdapter
=
new
GraphMouseAdapter
();
if
(
window
!=
null
)
{
graphMouseAdapterNewt
=
new
MouseAdapter
()
{
...
...
@@ -179,6 +185,7 @@ public abstract class GLAbstractListener implements GLEventListener, VizArchitec
caps
.
setAlphaBits
(
8
);
//if NOT opaque
caps
.
setDoubleBuffered
(
true
);
caps
.
setHardwareAccelerated
(
true
);
caps
.
setOnscreen
(
true
);
//FSAA
int
antialisaing
=
vizController
.
getVizConfig
().
getAntialiasing
();
...
...
@@ -386,6 +393,7 @@ public abstract class GLAbstractListener implements GLEventListener, VizArchitec
@Override
public
void
destroy
()
{
destroyed
=
true
;
if
(
graphMouseAdapterNewt
!=
null
)
{
window
.
removeMouseListener
(
graphMouseAdapterNewt
);
}
else
if
(
graphMouseAdapterCanvas
!=
null
)
{
...
...
@@ -395,6 +403,11 @@ public abstract class GLAbstractListener implements GLEventListener, VizArchitec
drawable
.
destroy
();
}
@Override
public
boolean
isDestroyed
()
{
return
destroyed
;
}
public
void
renderTestCube
(
GL2
gl
)
{
float
cubeSize
=
1
f
;
...
...
modules/VisualizationImpl/src/main/java/org/gephi/visualization/swing/GraphCanvas.java
浏览文件 @
8ae43a41
...
...
@@ -124,10 +124,4 @@ public class GraphCanvas extends GLAbstractListener {
}
}
}
@Override
public
void
destroy
()
{
super
.
destroy
();
glCanvas
.
destroy
();
}
}
modules/application/src/main/resources/gephi.conf
浏览文件 @
8ae43a41
...
...
@@ -8,7 +8,7 @@ default_cachedir="${DEFAULT_CACHEDIR_ROOT}/${gephi.minor.version}"
# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options
=
"--branding ${branding.token} -J-Dsun.java2d.metal=true -J-Dsun.java2d.noddraw=true -J-Dsun.awt.noerasebackground=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dnetbeans.indexing.noFileRefresh=true -J-Dplugin.manager.check.interval=EVERY_DAY -J-Dapple.awt.application.appearance=system -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.base/java.nio=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED"
default_options
=
"--branding ${branding.token} -J-Dsun.java2d.metal=true -J-Dsun.java2d.noddraw=true -J-Dsun.awt.noerasebackground=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dnetbeans.indexing.noFileRefresh=true -J-D
netbeans.winsys.hideEmptyDocArea=true -J-D
plugin.manager.check.interval=EVERY_DAY -J-Dapple.awt.application.appearance=system -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.base/java.nio=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED"
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea
# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录