Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
幽默龙
luyten
提交
7e6be078
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 搜索 >>
提交
7e6be078
编写于
5月 16, 2017
作者:
D
deathmarine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#79 Add Ctrl-F4 to Close Tab
上级
befd23f4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
1 deletion
+24
-1
src/us/deathmarine/luyten/Model.java
src/us/deathmarine/luyten/Model.java
+24
-1
未找到文件。
src/us/deathmarine/luyten/Model.java
浏览文件 @
7e6be078
...
...
@@ -4,6 +4,8 @@ import java.awt.GridBagConstraints;
import
java.awt.GridBagLayout
;
import
java.awt.Insets
;
import
java.awt.Toolkit
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.InputEvent
;
import
java.awt.event.KeyAdapter
;
import
java.awt.event.KeyEvent
;
import
java.awt.event.MouseAdapter
;
...
...
@@ -27,9 +29,12 @@ import java.util.TreeMap;
import
java.util.TreeSet
;
import
java.util.jar.JarEntry
;
import
java.util.jar.JarFile
;
import
javax.swing.AbstractAction
;
import
javax.swing.BorderFactory
;
import
javax.swing.BoxLayout
;
import
javax.swing.ImageIcon
;
import
javax.swing.JComponent
;
import
javax.swing.JLabel
;
import
javax.swing.JPanel
;
import
javax.swing.JProgressBar
;
...
...
@@ -37,6 +42,7 @@ import javax.swing.JScrollPane;
import
javax.swing.JSplitPane
;
import
javax.swing.JTabbedPane
;
import
javax.swing.JTree
;
import
javax.swing.KeyStroke
;
import
javax.swing.SwingUtilities
;
import
javax.swing.event.ChangeEvent
;
import
javax.swing.event.ChangeListener
;
...
...
@@ -62,6 +68,8 @@ import com.strobel.decompiler.DecompilationOptions;
import
com.strobel.decompiler.DecompilerSettings
;
import
com.strobel.decompiler.PlainTextOutput
;
import
us.deathmarine.luyten.FindBox.FindExploreAction
;
/**
* Jar-level model
*/
...
...
@@ -146,6 +154,20 @@ public class Model extends JSplitPane {
}
}
});
KeyStroke
sfuncF4
=
KeyStroke
.
getKeyStroke
(
KeyEvent
.
VK_F4
,
InputEvent
.
CTRL_DOWN_MASK
,
false
);
mainWindow
.
getRootPane
().
getInputMap
(
JComponent
.
WHEN_IN_FOCUSED_WINDOW
).
put
(
sfuncF4
,
"CloseTab"
);
mainWindow
.
getRootPane
().
getActionMap
().
put
(
"CloseTab"
,
new
AbstractAction
()
{
private
static
final
long
serialVersionUID
=
-
885398399200419492L
;
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
closeOpenTab
(
house
.
getSelectedIndex
());
}
});
JPanel
panel
=
new
JPanel
();
panel
.
setLayout
(
new
BoxLayout
(
panel
,
1
));
panel
.
setBorder
(
BorderFactory
.
createTitledBorder
(
"Code"
));
...
...
@@ -639,7 +661,7 @@ public class Model extends JSplitPane {
if
(
open
)
closeFile
();
this
.
file
=
file
;
RecentFiles
.
add
(
file
.
getAbsolutePath
());
mainWindow
.
mainMenuBar
.
updateRecentFiles
();
loadTree
();
...
...
@@ -925,6 +947,7 @@ public class Model extends JSplitPane {
RSyntaxTextArea
currentTextArea
=
null
;
try
{
int
pos
=
house
.
getSelectedIndex
();
System
.
out
.
println
(
pos
);
if
(
pos
>=
0
)
{
RTextScrollPane
co
=
(
RTextScrollPane
)
house
.
getComponentAt
(
pos
);
currentTextArea
=
(
RSyntaxTextArea
)
co
.
getViewport
().
getView
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录