Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
幽默龙
luyten
提交
b8d91c12
L
luyten
项目概览
幽默龙
/
luyten
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
luyten
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b8d91c12
编写于
6月 05, 2018
作者:
D
deathmarine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Store Font Size in Preferences.
Addresses #131,#53
上级
223d58e6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
2 deletion
+43
-2
pom.xml
pom.xml
+19
-0
src/us/deathmarine/luyten/LuytenPreferences.java
src/us/deathmarine/luyten/LuytenPreferences.java
+9
-0
src/us/deathmarine/luyten/OpenFile.java
src/us/deathmarine/luyten/OpenFile.java
+15
-2
未找到文件。
pom.xml
浏览文件 @
b8d91c12
...
...
@@ -288,6 +288,25 @@
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.googlecode.maven-download-plugin
</groupId>
<artifactId>
download-maven-plugin
</artifactId>
<versionRange>
[1.3.0,)
</versionRange>
<goals>
<goal>
wget
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
...
...
src/us/deathmarine/luyten/LuytenPreferences.java
浏览文件 @
b8d91c12
...
...
@@ -14,6 +14,7 @@ public class LuytenPreferences {
private
String
themeXml
=
DEFAULT_THEME_XML
;
private
String
fileOpenCurrentDirectory
=
""
;
private
String
fileSaveCurrentDirectory
=
""
;
private
int
font_size
=
10
;
private
boolean
isPackageExplorerStyle
=
true
;
private
boolean
isFilterOutInnerClassEntries
=
true
;
...
...
@@ -75,4 +76,12 @@ public class LuytenPreferences {
public
void
setExitByEscEnabled
(
boolean
isExitByEscEnabled
)
{
this
.
isExitByEscEnabled
=
isExitByEscEnabled
;
}
public
int
getFont_size
()
{
return
font_size
;
}
public
void
setFont_size
(
int
font_size
)
{
this
.
font_size
=
font_size
;
}
}
src/us/deathmarine/luyten/OpenFile.java
浏览文件 @
b8d91c12
...
...
@@ -73,6 +73,9 @@ public class OpenFile implements SyntaxConstants {
RSyntaxTextArea
textArea
;
String
name
;
String
path
;
private
ConfigSaver
configSaver
;
private
LuytenPreferences
luytenPrefs
;
// decompiler and type references (not needed for text files)
private
MetadataSystem
metadataSystem
;
...
...
@@ -84,6 +87,10 @@ public class OpenFile implements SyntaxConstants {
this
.
name
=
name
;
this
.
path
=
path
;
this
.
mainWindow
=
mainWindow
;
configSaver
=
ConfigSaver
.
getLoadedInstance
();
luytenPrefs
=
configSaver
.
getLuytenPreferences
();
textArea
=
new
RSyntaxTextArea
(
25
,
70
);
textArea
.
setCaretPosition
(
0
);
textArea
.
requestFocusInWindow
();
...
...
@@ -149,15 +156,19 @@ public class OpenFile implements SyntaxConstants {
fontChooser
.
setSelectedFont
(
textArea
.
getFont
());
fontChooser
.
setSelectedFontSize
(
textArea
.
getFont
().
getSize
());
int
result
=
fontChooser
.
showDialog
(
mainWindow
);
if
(
result
==
JFontChooser
.
OK_OPTION
)
if
(
result
==
JFontChooser
.
OK_OPTION
)
{
textArea
.
setFont
(
fontChooser
.
getSelectedFont
());
luytenPrefs
.
setFont_size
(
fontChooser
.
getSelectedFontSize
());
}
}
});
pop
.
add
(
item
);
textArea
.
setPopupMenu
(
pop
);
theme
.
apply
(
textArea
);
textArea
.
setFont
(
new
Font
(
textArea
.
getFont
().
getName
(),
textArea
.
getFont
().
getStyle
(),
luytenPrefs
.
getFont_size
()));
scrollPane
.
setVerticalScrollBarPolicy
(
ScrollPaneConstants
.
VERTICAL_SCROLLBAR_ALWAYS
);
final
JScrollBar
verticalScrollbar
=
scrollPane
.
getVerticalScrollBar
();
if
(
verticalScrollbar
!=
null
)
{
...
...
@@ -225,6 +236,7 @@ public class OpenFile implements SyntaxConstants {
}
else
{
textArea
.
setFont
(
new
Font
(
font
.
getName
(),
font
.
getStyle
(),
++
size
));
}
luytenPrefs
.
setFont_size
(
size
);
}
else
{
if
(
scrollPane
.
isWheelScrollingEnabled
()
&&
e
.
getWheelRotation
()
!=
0
)
{
JScrollBar
toScroll
=
scrollPane
.
getVerticalScrollBar
();
...
...
@@ -373,6 +385,7 @@ public class OpenFile implements SyntaxConstants {
}
}
}
e
.
consume
();
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录