From 0cff54eb9a3db72464034e70f0d9e934728176e1 Mon Sep 17 00:00:00 2001 From: Yanis48 Date: Wed, 16 Dec 2020 15:53:49 +0100 Subject: isConstructor() from method entry --- .../src/main/java/cuchaz/enigma/gui/panels/StructurePanel.java | 6 +----- 1 file changed, 1 insertion(+), 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 d6044dc7..a9ccffd7 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 { if (entry instanceof ClassEntry) { this.label.setIcon(GuiUtil.CLASS_ICON); } else if (entry instanceof MethodEntry) { - this.label.setIcon(isConstructor(entry) ? GuiUtil.CONSTRUCTOR_ICON : GuiUtil.METHOD_ICON); + this.label.setIcon(((MethodEntry) entry).isConstructor() ? GuiUtil.CONSTRUCTOR_ICON : GuiUtil.METHOD_ICON); } else if (entry instanceof FieldEntry) { this.label.setIcon(GuiUtil.FIELD_ICON); } @@ -98,9 +98,5 @@ public class StructurePanel extends JPanel { return this.label; } - - private boolean isConstructor(ParentedEntry entry) { - return "".equals(entry.getName()); - } } } -- cgit v1.2.3