Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76393173
jadx
提交
b18dabee
J
jadx
项目概览
2301_76393173
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b18dabee
编写于
11月 24, 2013
作者:
S
Skylot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gui: adjust tabbed ui appearance
上级
b6befbdc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
42 addition
and
14 deletion
+42
-14
jadx-gui/src/main/java/jadx/gui/MainWindow.java
jadx-gui/src/main/java/jadx/gui/MainWindow.java
+37
-14
jadx-gui/src/main/java/jadx/gui/SearchBar.java
jadx-gui/src/main/java/jadx/gui/SearchBar.java
+5
-0
jadx-gui/src/main/resources/icons-16/cross_grayed.png
jadx-gui/src/main/resources/icons-16/cross_grayed.png
+0
-0
未找到文件。
jadx-gui/src/main/java/jadx/gui/MainWindow.java
浏览文件 @
b18dabee
...
...
@@ -39,11 +39,14 @@ import java.awt.BorderLayout;
import
java.awt.Color
;
import
java.awt.Component
;
import
java.awt.Dimension
;
import
java.awt.FlowLayout
;
import
java.awt.Toolkit
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.ActionListener
;
import
java.awt.event.InputEvent
;
import
java.awt.event.KeyEvent
;
import
java.awt.event.MouseAdapter
;
import
java.awt.event.MouseEvent
;
import
java.io.File
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -67,6 +70,7 @@ public class MainWindow extends JFrame {
private
static
final
ImageIcon
ICON_OPEN
=
Utils
.
openIcon
(
"folder"
);
private
static
final
ImageIcon
ICON_SAVE_ALL
=
Utils
.
openIcon
(
"disk_multiple"
);
private
static
final
ImageIcon
ICON_CLOSE
=
Utils
.
openIcon
(
"cross"
);
private
static
final
ImageIcon
ICON_CLOSE_INACTIVE
=
Utils
.
openIcon
(
"cross_grayed"
);
private
static
final
ImageIcon
ICON_FLAT_PKG
=
Utils
.
openIcon
(
"empty_logical_package_obj"
);
private
static
final
ImageIcon
ICON_SEARCH
=
Utils
.
openIcon
(
"magnifier"
);
...
...
@@ -210,29 +214,48 @@ public class MainWindow extends JFrame {
private
Component
makeTabComponent
(
final
JClass
cls
,
final
Component
comp
)
{
String
name
=
cls
.
getCls
().
getFullName
();
JPanel
p
=
new
JPanel
();
JLabel
label
=
new
JLabel
(
name
);
p
.
add
(
label
);
JButton
button
=
new
JButton
();
button
.
setIcon
(
ICON_CLOSE
);
final
int
size
=
12
;
button
.
setPreferredSize
(
new
Dimension
(
size
,
size
));
button
.
setToolTipText
(
"Close"
);
JPanel
panel
=
new
JPanel
(
new
FlowLayout
(
FlowLayout
.
CENTER
,
3
,
0
));
panel
.
setOpaque
(
false
);
final
JLabel
label
=
new
JLabel
(
name
);
label
.
setBorder
(
BorderFactory
.
createEmptyBorder
(
0
,
0
,
0
,
10
));
label
.
setIcon
(
cls
.
getIcon
());
final
JButton
button
=
new
JButton
();
button
.
setIcon
(
ICON_CLOSE_INACTIVE
);
button
.
setRolloverIcon
(
ICON_CLOSE
);
button
.
setRolloverEnabled
(
true
);
button
.
setOpaque
(
false
);
button
.
setUI
(
new
BasicButtonUI
());
button
.
setContentAreaFilled
(
false
);
button
.
setFocusable
(
false
);
button
.
setBorder
(
BorderFactory
.
createEtchedBorder
()
);
button
.
setBorder
(
null
);
button
.
setBorderPainted
(
false
);
button
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
tabbedPane
.
remove
(
comp
);
openTabs
.
remove
(
cls
);
closeCodeTab
(
cls
,
comp
);
}
});
p
.
add
(
button
);
p
.
doLayout
();
return
p
;
panel
.
addMouseListener
(
new
MouseAdapter
()
{
@Override
public
void
mouseClicked
(
MouseEvent
e
)
{
if
(
e
.
getButton
()
==
MouseEvent
.
BUTTON2
)
{
closeCodeTab
(
cls
,
comp
);
}
}
});
panel
.
add
(
label
);
panel
.
add
(
button
);
panel
.
setBorder
(
BorderFactory
.
createEmptyBorder
(
4
,
0
,
0
,
0
));
return
panel
;
}
private
void
closeCodeTab
(
JClass
cls
,
Component
comp
)
{
tabbedPane
.
remove
(
comp
);
openTabs
.
remove
(
cls
);
}
private
void
scrollToLine
(
JTextArea
textArea
,
int
line
)
{
...
...
jadx-gui/src/main/java/jadx/gui/SearchBar.java
浏览文件 @
b18dabee
...
...
@@ -21,6 +21,8 @@ import org.fife.ui.rtextarea.SearchContext;
import
org.fife.ui.rtextarea.SearchEngine
;
public
class
SearchBar
extends
JToolBar
{
private
static
final
long
serialVersionUID
=
1836871286618633003L
;
private
static
final
Color
COLOR_BG_ERROR
=
new
Color
(
0xFFDFDE
);
private
static
final
Color
COLOR_BG_WARN
=
new
Color
(
0xFFFDD9
);
private
static
final
Color
COLOR_BG_NORMAL
=
new
Color
(
0xFFFFFF
);
...
...
@@ -84,6 +86,7 @@ public class SearchBar extends JToolBar {
search
(-
1
);
}
});
prevButton
.
setBorderPainted
(
false
);
add
(
prevButton
);
JButton
nextButton
=
new
JButton
(
NLS
.
str
(
"search.next"
));
...
...
@@ -94,6 +97,7 @@ public class SearchBar extends JToolBar {
search
(
1
);
}
});
nextButton
.
setBorderPainted
(
false
);
add
(
nextButton
);
markAllCB
=
new
JCheckBox
(
NLS
.
str
(
"search.mark_all"
));
...
...
@@ -120,6 +124,7 @@ public class SearchBar extends JToolBar {
toggle
();
}
});
closeButton
.
setBorderPainted
(
false
);
add
(
closeButton
);
setFloatable
(
false
);
...
...
jadx-gui/src/main/resources/icons-16/cross_grayed.png
0 → 100644
浏览文件 @
b18dabee
731 字节
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录