Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
b18dabee
Commit
b18dabee
authored
Nov 24, 2013
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gui: adjust tabbed ui appearance
parent
b6befbdc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
14 deletions
+42
-14
MainWindow.java
jadx-gui/src/main/java/jadx/gui/MainWindow.java
+37
-14
SearchBar.java
jadx-gui/src/main/java/jadx/gui/SearchBar.java
+5
-0
cross_grayed.png
jadx-gui/src/main/resources/icons-16/cross_grayed.png
+0
-0
No files found.
jadx-gui/src/main/java/jadx/gui/MainWindow.java
View file @
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
);
}
});
panel
.
addMouseListener
(
new
MouseAdapter
()
{
@Override
public
void
mouseClicked
(
MouseEvent
e
)
{
if
(
e
.
getButton
()
==
MouseEvent
.
BUTTON2
)
{
closeCodeTab
(
cls
,
comp
);
}
}
});
p
.
add
(
button
);
p
.
doLayout
();
return
p
;
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
View file @
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
View file @
b18dabee
731 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment