-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
src/main/java/com/hohltier/decompiler/controllers/EmptyController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.hohltier.decompiler.controllers; | ||
|
||
import com.hohltier.decompiler.views.EmptyView; | ||
|
||
public class EmptyController extends BaseController<EmptyView> { | ||
|
||
public EmptyController() { | ||
super(new EmptyView()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
package com.hohltier.decompiler.views; | ||
|
||
import com.hohltier.decompiler.services.LanguageService; | ||
import lombok.Getter; | ||
import net.miginfocom.swing.MigLayout; | ||
import javax.swing.*; | ||
import java.awt.event.KeyEvent; | ||
|
||
@Getter | ||
public class EmptyView extends JPanel { | ||
|
||
private final JPanel root; | ||
private final JLabel header; | ||
private final JLabel open; | ||
private final JLabel drag; | ||
|
||
public EmptyView() { | ||
add(new JLabel("TODO")); | ||
setLayout(new MigLayout("fill")); | ||
|
||
root = new JPanel(new MigLayout("gapy 15")); | ||
add(root, "center"); | ||
|
||
header = new JLabel(LanguageService.getTranslation("empty")); | ||
header.putClientProperty("FlatLaf.styleClass", "h1"); | ||
root.add(header, "wrap"); | ||
|
||
String text = LanguageService.getTranslation("file.openFile"); | ||
String modifier = KeyEvent.getModifiersExText(KeyEvent.CTRL_DOWN_MASK); | ||
String key = KeyEvent.getKeyText(KeyEvent.VK_O); | ||
open = new JLabel(String.format("%s (%s+%s)", text, modifier, key)); | ||
root.add(open, "wrap"); | ||
|
||
drag = new JLabel(LanguageService.getTranslation("empty.drag")); | ||
root.add(drag, "wrap"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ file.exit=出口 | |
|
||
help=帮助 | ||
|
||
empty=没有文件打开 | ||
empty.drag=拖放打开 | ||
|
||
about=关于 | ||
about.version=版本 %s | ||
about.vm=虚拟机 | ||
|