Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
f9e87d4d
Commit
f9e87d4d
authored
Aug 10, 2013
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gui: set bigger window size at start
parent
ab8fa23f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
JadxGUI.java
jadx-gui/src/main/java/jadx/gui/JadxGUI.java
+5
-0
MainWindow.java
jadx-gui/src/main/java/jadx/gui/MainWindow.java
+14
-4
No files found.
jadx-gui/src/main/java/jadx/gui/JadxGUI.java
View file @
f9e87d4d
...
...
@@ -4,6 +4,7 @@ import jadx.cli.JadxCLIArgs;
import
javax.swing.SwingUtilities
;
import
javax.swing.UIManager
;
import
javax.swing.WindowConstants
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -19,7 +20,11 @@ public class JadxGUI {
public
void
run
()
{
JadxWrapper
wrapper
=
new
JadxWrapper
(
jadxArgs
);
MainWindow
mainWindow
=
new
MainWindow
(
wrapper
);
mainWindow
.
pack
();
mainWindow
.
setLocationAndPosition
();
mainWindow
.
setVisible
(
true
);
mainWindow
.
setLocationRelativeTo
(
null
);
mainWindow
.
setDefaultCloseOperation
(
WindowConstants
.
EXIT_ON_CLOSE
);
if
(!
jadxArgs
.
getInput
().
isEmpty
())
{
mainWindow
.
openFile
(
jadxArgs
.
getInput
().
get
(
0
));
...
...
jadx-gui/src/main/java/jadx/gui/MainWindow.java
View file @
f9e87d4d
...
...
@@ -33,6 +33,8 @@ import javax.swing.tree.TreeSelectionModel;
import
java.awt.BorderLayout
;
import
java.awt.Color
;
import
java.awt.Component
;
import
java.awt.Dimension
;
import
java.awt.Toolkit
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.ActionListener
;
import
java.awt.event.InputEvent
;
...
...
@@ -51,6 +53,9 @@ public class MainWindow extends JFrame {
private
static
final
String
DEFAULT_TITLE
=
"jadx-gui"
;
private
static
final
Color
BACKGROUND
=
new
Color
(
0xf7f7f7
);
private
static
final
double
BORDER_RATIO
=
0.15
;
private
static
final
double
WINDOW_RATIO
=
1
-
BORDER_RATIO
*
2
;
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"
);
...
...
@@ -228,7 +233,7 @@ public class MainWindow extends JFrame {
private
void
initUI
()
{
mainPanel
=
new
JPanel
(
new
BorderLayout
());
JSplitPane
splitPane
=
new
JSplitPane
();
splitPane
.
set
DividerLocation
(
200
);
splitPane
.
set
ResizeWeight
(
0.2
);
mainPanel
.
add
(
splitPane
);
DefaultMutableTreeNode
treeRoot
=
new
DefaultMutableTreeNode
(
"Please open file"
);
...
...
@@ -281,9 +286,14 @@ public class MainWindow extends JFrame {
setContentPane
(
mainPanel
);
setTitle
(
DEFAULT_TITLE
);
setDefaultCloseOperation
(
DISPOSE_ON_CLOSE
);
pack
();
setLocationRelativeTo
(
null
);
}
public
void
setLocationAndPosition
()
{
Dimension
dimension
=
Toolkit
.
getDefaultToolkit
().
getScreenSize
();
double
w
=
dimension
.
getWidth
();
double
h
=
dimension
.
getHeight
();
setLocation
((
int
)
(
w
*
BORDER_RATIO
),
(
int
)
(
h
*
BORDER_RATIO
));
setSize
((
int
)
(
w
*
WINDOW_RATIO
),
(
int
)
(
h
*
WINDOW_RATIO
));
}
private
class
OpenListener
implements
ActionListener
{
...
...
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