Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sanbo_xyz
Gephi
提交
7883e5b0
G
Gephi
项目概览
sanbo_xyz
/
Gephi
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
7883e5b0
编写于
3月 08, 2022
作者:
M
Mathieu Bastian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add max size preference to address #1518
上级
0fedf940
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
1 deletion
+51
-1
modules/VisualizationImpl/src/main/java/org/gephi/visualization/apiimpl/VizConfig.java
.../main/java/org/gephi/visualization/apiimpl/VizConfig.java
+4
-0
modules/VisualizationImpl/src/main/java/org/gephi/visualization/opengl/CompatibilityEngine.java
...a/org/gephi/visualization/opengl/CompatibilityEngine.java
+9
-0
modules/VisualizationImpl/src/main/java/org/gephi/visualization/options/OpenGLPanel.java
...ain/java/org/gephi/visualization/options/OpenGLPanel.java
+37
-1
modules/VisualizationImpl/src/main/resources/org/gephi/visualization/options/Bundle.properties
...sources/org/gephi/visualization/options/Bundle.properties
+1
-0
未找到文件。
modules/VisualizationImpl/src/main/java/org/gephi/visualization/apiimpl/VizConfig.java
浏览文件 @
7883e5b0
...
...
@@ -418,6 +418,10 @@ public class VizConfig {
return
octreeWidth
;
}
public
void
setOctreeWidth
(
int
octreeWidth
)
{
this
.
octreeWidth
=
octreeWidth
;
}
public
boolean
isRectangleSelection
()
{
return
rectangleSelection
;
}
...
...
modules/VisualizationImpl/src/main/java/org/gephi/visualization/opengl/CompatibilityEngine.java
浏览文件 @
7883e5b0
...
...
@@ -84,6 +84,14 @@ public class CompatibilityEngine extends AbstractEngine {
scheduler
=
(
CompatibilityScheduler
)
VizController
.
getInstance
().
getScheduler
();
vizEventManager
=
VizController
.
getInstance
().
getVizEventManager
();
initOctree
();
}
private
synchronized
void
initOctree
()
{
if
(
octree
!=
null
)
{
octree
.
clear
();
}
//Init
octree
=
new
Octree
(
vizConfig
.
getOctreeDepth
(),
vizConfig
.
getOctreeWidth
());
octree
.
initArchitecture
();
...
...
@@ -133,6 +141,7 @@ public class CompatibilityEngine extends AbstractEngine {
if
(
reinit
)
{
VizController
.
getInstance
().
refreshWorkspace
();
dataBridge
.
reset
();
initOctree
();
graphDrawable
.
initConfig
(
gl
);
graphDrawable
.
setCameraLocation
(
vizController
.
getVizModel
().
getCameraPosition
());
graphDrawable
.
setCameraTarget
(
vizController
.
getVizModel
().
getCameraTarget
());
...
...
modules/VisualizationImpl/src/main/java/org/gephi/visualization/options/OpenGLPanel.java
浏览文件 @
7883e5b0
...
...
@@ -44,6 +44,10 @@ package org.gephi.visualization.options;
import
java.awt.event.ActionEvent
;
import
java.awt.event.ActionListener
;
import
java.text.NumberFormat
;
import
java.text.ParseException
;
import
java.util.Locale
;
import
javax.swing.text.NumberFormatter
;
import
org.gephi.visualization.VizController
;
import
org.gephi.visualization.apiimpl.VizConfig
;
import
org.gephi.visualization.opengl.GraphicalConfiguration
;
...
...
@@ -60,9 +64,11 @@ final class OpenGLPanel extends javax.swing.JPanel {
private
org
.
jdesktop
.
swingx
.
JXTitledSeparator
jXTitledSeparator1
;
private
javax
.
swing
.
JLabel
labelAntialiasing
;
private
javax
.
swing
.
JLabel
labelShow
;
private
javax
.
swing
.
JLabel
labelOctreeWidth
;
private
javax
.
swing
.
JTextArea
openInfoText
;
private
javax
.
swing
.
JPanel
openglInfoPanel
;
private
javax
.
swing
.
JButton
resetButton
;
private
javax
.
swing
.
JFormattedTextField
octreeWidthTextField
;
OpenGLPanel
(
OpenGLOptionsPanelController
controller
)
{
this
.
controller
=
controller
;
...
...
@@ -94,11 +100,21 @@ final class OpenGLPanel extends javax.swing.JPanel {
labelAntialiasing
=
new
javax
.
swing
.
JLabel
();
antialisaingCombobox
=
new
javax
.
swing
.
JComboBox
();
labelShow
=
new
javax
.
swing
.
JLabel
();
labelOctreeWidth
=
new
javax
.
swing
.
JLabel
();
fpsCheckbox
=
new
javax
.
swing
.
JCheckBox
();
resetButton
=
new
javax
.
swing
.
JButton
();
openglInfoPanel
=
new
javax
.
swing
.
JPanel
();
openInfoText
=
new
javax
.
swing
.
JTextArea
();
NumberFormat
format
=
NumberFormat
.
getInstance
(
Locale
.
ENGLISH
);
NumberFormatter
formatter
=
new
NumberFormatter
(
format
);
formatter
.
setValueClass
(
Integer
.
class
);
formatter
.
setAllowsInvalid
(
false
);
octreeWidthTextField
=
new
javax
.
swing
.
JFormattedTextField
(
formatter
);
org
.
openide
.
awt
.
Mnemonics
.
setLocalizedText
(
labelOctreeWidth
,
org
.
openide
.
util
.
NbBundle
.
getMessage
(
OpenGLPanel
.
class
,
"OpenGLPanel.labelOctreeWidth.text"
));
// NOI18N
jXTitledSeparator1
.
setTitle
(
org
.
openide
.
util
.
NbBundle
.
getMessage
(
OpenGLPanel
.
class
,
"OpenGLPanel.jXTitledSeparator1.title"
));
// NOI18N
...
...
@@ -152,10 +168,15 @@ final class OpenGLPanel extends javax.swing.JPanel {
.
addGroup
(
javax
.
swing
.
GroupLayout
.
Alignment
.
TRAILING
,
layout
.
createSequentialGroup
()
.
addGap
(
10
,
10
,
10
)
.
addGroup
(
layout
.
createParallelGroup
(
javax
.
swing
.
GroupLayout
.
Alignment
.
LEADING
)
.
addComponent
(
labelOctreeWidth
,
javax
.
swing
.
GroupLayout
.
PREFERRED_SIZE
,
52
,
javax
.
swing
.
GroupLayout
.
PREFERRED_SIZE
)
.
addComponent
(
labelShow
,
javax
.
swing
.
GroupLayout
.
PREFERRED_SIZE
,
52
,
javax
.
swing
.
GroupLayout
.
PREFERRED_SIZE
)
.
addComponent
(
labelAntialiasing
))
.
addGroup
(
layout
.
createParallelGroup
(
javax
.
swing
.
GroupLayout
.
Alignment
.
LEADING
)
.
addGroup
(
layout
.
createSequentialGroup
()
.
addGap
(
20
,
20
,
20
)
.
addComponent
(
octreeWidthTextField
))
.
addGroup
(
layout
.
createSequentialGroup
()
.
addGap
(
20
,
20
,
20
)
.
addComponent
(
fpsCheckbox
))
...
...
@@ -186,7 +207,12 @@ final class OpenGLPanel extends javax.swing.JPanel {
.
addGroup
(
layout
.
createParallelGroup
(
javax
.
swing
.
GroupLayout
.
Alignment
.
BASELINE
)
.
addComponent
(
labelShow
,
javax
.
swing
.
GroupLayout
.
DEFAULT_SIZE
,
javax
.
swing
.
GroupLayout
.
DEFAULT_SIZE
,
Short
.
MAX_VALUE
)
.
addComponent
(
fpsCheckbox
))))
.
addComponent
(
fpsCheckbox
))
.
addGap
(
18
,
18
,
18
)
.
addGroup
(
layout
.
createParallelGroup
(
javax
.
swing
.
GroupLayout
.
Alignment
.
BASELINE
)
.
addComponent
(
labelOctreeWidth
,
javax
.
swing
.
GroupLayout
.
DEFAULT_SIZE
,
javax
.
swing
.
GroupLayout
.
DEFAULT_SIZE
,
Short
.
MAX_VALUE
)
.
addComponent
(
octreeWidthTextField
))))
.
addGap
(
18
,
18
,
Short
.
MAX_VALUE
)
.
addComponent
(
resetButton
)
.
addContainerGap
())
...
...
@@ -209,6 +235,8 @@ final class OpenGLPanel extends javax.swing.JPanel {
.
setSelectedIndex
(
antiAliasing
==
0
?
0
:
Math
.
round
((
float
)
(
Math
.
log
(
antiAliasing
)
/
Math
.
log
(
2
))));
fpsCheckbox
.
setSelected
(
NbPreferences
.
forModule
(
VizConfig
.
class
).
getBoolean
(
VizConfig
.
SHOW_FPS
,
VizConfig
.
DEFAULT_SHOW_FPS
));
octreeWidthTextField
.
setText
(
String
.
valueOf
(
NbPreferences
.
forModule
(
VizConfig
.
class
).
getInt
(
VizConfig
.
OCTREE_WIDTH
,
VizConfig
.
DEFAULT_OCTREE_WIDTH
)));
//OpenGLInfo
GraphicalConfiguration
gc
=
VizController
.
getInstance
().
getDrawable
().
getGraphicalConfiguration
();
...
...
@@ -220,6 +248,14 @@ final class OpenGLPanel extends javax.swing.JPanel {
void
store
()
{
NbPreferences
.
forModule
(
VizConfig
.
class
).
putInt
(
VizConfig
.
ANTIALIASING
,
antiAliasing
);
NbPreferences
.
forModule
(
VizConfig
.
class
).
putBoolean
(
VizConfig
.
SHOW_FPS
,
fpsCheckbox
.
isSelected
());
try
{
int
width
=
NumberFormat
.
getInstance
(
Locale
.
ENGLISH
).
parse
(
octreeWidthTextField
.
getText
()).
intValue
();
NbPreferences
.
forModule
(
VizConfig
.
class
)
.
putInt
(
VizConfig
.
OCTREE_WIDTH
,
width
);
VizController
.
getInstance
().
getVizConfig
().
setOctreeWidth
(
width
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
VizController
.
getInstance
().
getEngine
().
reinit
();
}
...
...
modules/VisualizationImpl/src/main/resources/org/gephi/visualization/options/Bundle.properties
浏览文件 @
7883e5b0
...
...
@@ -27,4 +27,5 @@ OpenGLPanel.labelShow.text=Show:
OpenGLPanel.labelAntialiasing.text
=
Antialiasing:
OpenGLPanel.fpsCheckbox.text
=
FPS (Frames Per Second)
OpenGLPanel.resetButton.text
=
Reset Default
OpenGLPanel.labelOctreeWidth.text
=
Max size
DefaultPanel.resetButton.text
=
Reset defaults
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录