1717package cn .enaium .joe ;
1818
1919import cn .enaium .joe .config .ConfigManager ;
20+ import cn .enaium .joe .event .EventManager ;
2021import cn .enaium .joe .gui .panel .BottomPanel ;
22+ import cn .enaium .joe .gui .panel .file .tree .FileTreePanel ;
2123import cn .enaium .joe .gui .panel .LeftPanel ;
2224import cn .enaium .joe .gui .panel .file .tabbed .FileTabbedPanel ;
23- import cn .enaium .joe .gui .panel . file . tree . FileTreePanel ;
25+ import cn .enaium .joe .gui .component . FileTree ;
2426import cn .enaium .joe .gui .panel .menu .*;
2527import cn .enaium .joe .jar .Jar ;
2628import cn .enaium .joe .task .TaskManager ;
29+ import cn .enaium .joe .util .KeyStrokeUtil ;
2730import cn .enaium .joe .util .LangUtil ;
2831import cn .enaium .joe .util .MessageUtil ;
2932import cn .enaium .joe .util .ReflectUtil ;
30- import com .sun .tools .attach .VirtualMachine ;
3133import org .fife .ui .rsyntaxtextarea .AbstractTokenMakerFactory ;
3234import org .fife .ui .rsyntaxtextarea .TokenMakerFactory ;
33- import org .pmw .tinylog .Logger ;
3435
3536import javax .swing .*;
3637import java .awt .*;
37- import java .awt .event .WindowAdapter ;
38- import java .awt .event .WindowEvent ;
38+ import java .awt .event .*;
3939
4040/**
4141 * @author Enaium
@@ -51,22 +51,26 @@ public class JavaOctetEditor {
5151
5252 public FileTabbedPanel fileTabbedPanel ;
5353
54- public FileTreePanel fileTreePanel ;
54+ public FileTree fileTree ;
5555
5656 public BottomPanel bottomPanel ;
5757
58+ public EventManager event ;
59+
5860 public ConfigManager config ;
5961
6062 public TaskManager task ;
6163
64+
6265 public JavaOctetEditor () {
6366 instance = this ;
67+ event = new EventManager ();
6468 config = new ConfigManager ();
6569 config .load ();
6670 task = new TaskManager ();
6771 Runtime .getRuntime ().addShutdownHook (new Thread (config ::save ));
6872 fileTabbedPanel = new FileTabbedPanel ();
69- fileTreePanel = new FileTreePanel ();
73+ fileTree = new FileTree ();
7074 bottomPanel = new BottomPanel ();
7175 }
7276
@@ -92,16 +96,16 @@ public void run() {
9296 add (new HelpMenu ());
9397 }});
9498
95- window .setContentPane (new JPanel (new BorderLayout ()) {
96- {
97- add (new JSplitPane () {{
98- setDividerLocation ( 150 );
99- setLeftComponent ( new LeftPanel () );
100- setRightComponent ( fileTabbedPanel );
101- }} , BorderLayout .CENTER );
102- add ( bottomPanel , BorderLayout . SOUTH );
103- }
104- });
99+ window .setContentPane (new JPanel (new BorderLayout ()) {{
100+ add ( new LeftPanel (), BorderLayout . WEST );
101+ add (new JSplitPane () {{
102+ setLeftComponent ( new FileTreePanel () );
103+ setRightComponent ( fileTabbedPanel );
104+ }}, BorderLayout . CENTER );
105+ add ( bottomPanel , BorderLayout .SOUTH );
106+ }} );
107+
108+
105109 window .setDefaultCloseOperation (WindowConstants .DO_NOTHING_ON_CLOSE );
106110 window .addWindowListener (new WindowAdapter () {
107111 @ Override
@@ -113,7 +117,7 @@ public void windowClosing(WindowEvent e) {
113117 });
114118 }
115119 });
116- window .setSize (800 , 500 );
120+ window .setSize (1000 , 600 );
117121 window .setLocationRelativeTo (null );
118122 window .setVisible (true );
119123 }
@@ -124,7 +128,7 @@ public Jar getJar() {
124128
125129 public void setJar (Jar jar ) {
126130 this .jar = jar ;
127- fileTreePanel .refresh (jar );
131+ fileTree .refresh (jar );
128132 }
129133
130134 public static JavaOctetEditor getInstance () {
0 commit comments