summaryrefslogtreecommitdiff
path: root/enigma-swing/src/main/java/cuchaz
diff options
context:
space:
mode:
authorGravatar Yanis482020-12-16 15:53:49 +0100
committerGravatar Yanis482020-12-16 15:53:49 +0100
commit0cff54eb9a3db72464034e70f0d9e934728176e1 (patch)
treedd5e559aea255ef71d45e6f42848eed2fa306a7f /enigma-swing/src/main/java/cuchaz
parentMerge branch 'structure-panel' of https://github.com/YanisBft/Enigma into str... (diff)
downloadenigma-fork-0cff54eb9a3db72464034e70f0d9e934728176e1.tar.gz
enigma-fork-0cff54eb9a3db72464034e70f0d9e934728176e1.tar.xz
enigma-fork-0cff54eb9a3db72464034e70f0d9e934728176e1.zip
isConstructor() from method entry
Diffstat (limited to 'enigma-swing/src/main/java/cuchaz')
-rw-r--r--enigma-swing/src/main/java/cuchaz/enigma/gui/panels/StructurePanel.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/StructurePanel.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/StructurePanel.java
index d6044dc..a9ccffd 100644
--- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/StructurePanel.java
+++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/StructurePanel.java
@@ -89,7 +89,7 @@ public class StructurePanel extends JPanel {
89 if (entry instanceof ClassEntry) { 89 if (entry instanceof ClassEntry) {
90 this.label.setIcon(GuiUtil.CLASS_ICON); 90 this.label.setIcon(GuiUtil.CLASS_ICON);
91 } else if (entry instanceof MethodEntry) { 91 } else if (entry instanceof MethodEntry) {
92 this.label.setIcon(isConstructor(entry) ? GuiUtil.CONSTRUCTOR_ICON : GuiUtil.METHOD_ICON); 92 this.label.setIcon(((MethodEntry) entry).isConstructor() ? GuiUtil.CONSTRUCTOR_ICON : GuiUtil.METHOD_ICON);
93 } else if (entry instanceof FieldEntry) { 93 } else if (entry instanceof FieldEntry) {
94 this.label.setIcon(GuiUtil.FIELD_ICON); 94 this.label.setIcon(GuiUtil.FIELD_ICON);
95 } 95 }
@@ -98,9 +98,5 @@ public class StructurePanel extends JPanel {
98 98
99 return this.label; 99 return this.label;
100 } 100 }
101
102 private boolean isConstructor(ParentedEntry<?> entry) {
103 return "<init>".equals(entry.getName());
104 }
105 } 101 }
106} 102}