diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/panels/PanelIdentifier.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/panels/PanelIdentifier.java | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/panels/PanelIdentifier.java b/src/main/java/cuchaz/enigma/gui/panels/PanelIdentifier.java index faa023bd..1bf68879 100644 --- a/src/main/java/cuchaz/enigma/gui/panels/PanelIdentifier.java +++ b/src/main/java/cuchaz/enigma/gui/panels/PanelIdentifier.java | |||
| @@ -1,34 +1,30 @@ | |||
| 1 | package cuchaz.enigma.gui.panels; | 1 | package cuchaz.enigma.gui.panels; |
| 2 | 2 | ||
| 3 | import java.awt.Dimension; | ||
| 4 | import java.awt.GridLayout; | ||
| 5 | |||
| 6 | import javax.swing.BorderFactory; | ||
| 7 | import javax.swing.JLabel; | ||
| 8 | import javax.swing.JPanel; | ||
| 9 | |||
| 10 | import cuchaz.enigma.gui.Gui; | 3 | import cuchaz.enigma.gui.Gui; |
| 11 | import cuchaz.enigma.utils.Utils; | 4 | import cuchaz.enigma.utils.Utils; |
| 12 | 5 | ||
| 6 | import javax.swing.*; | ||
| 7 | import java.awt.*; | ||
| 8 | |||
| 13 | public class PanelIdentifier extends JPanel { | 9 | public class PanelIdentifier extends JPanel { |
| 14 | 10 | ||
| 15 | private final Gui gui; | 11 | private final Gui gui; |
| 16 | 12 | ||
| 17 | public PanelIdentifier(Gui gui) { | 13 | public PanelIdentifier(Gui gui) { |
| 18 | this.gui = gui; | 14 | this.gui = gui; |
| 19 | 15 | ||
| 20 | this.setLayout(new GridLayout(4, 1, 0, 0)); | 16 | this.setLayout(new GridLayout(4, 1, 0, 0)); |
| 21 | this.setPreferredSize(new Dimension(0, 100)); | 17 | this.setPreferredSize(new Dimension(0, 100)); |
| 22 | this.setBorder(BorderFactory.createTitledBorder("Identifier Info")); | 18 | this.setBorder(BorderFactory.createTitledBorder("Identifier Info")); |
| 23 | } | 19 | } |
| 24 | 20 | ||
| 25 | public void clearReference() { | 21 | public void clearReference() { |
| 26 | this.removeAll(); | 22 | this.removeAll(); |
| 27 | JLabel label = new JLabel("No identifier selected"); | 23 | JLabel label = new JLabel("No identifier selected"); |
| 28 | Utils.unboldLabel(label); | 24 | Utils.unboldLabel(label); |
| 29 | label.setHorizontalAlignment(JLabel.CENTER); | 25 | label.setHorizontalAlignment(JLabel.CENTER); |
| 30 | this.add(label); | 26 | this.add(label); |
| 31 | 27 | ||
| 32 | gui.redraw(); | 28 | gui.redraw(); |
| 33 | } | 29 | } |
| 34 | } | 30 | } |