diff options
| author | 2016-07-04 18:14:22 +1000 | |
|---|---|---|
| committer | 2016-07-04 18:14:22 +1000 | |
| commit | 59e189bef2b5e6d129fb7c2c988ed0b2130e36ac (patch) | |
| tree | 2b638e60905251de85a4917152d6fc39a4112194 /src/main/java/cuchaz/enigma/gui/node | |
| parent | Fixed Obf Class list order (diff) | |
| download | enigma-fork-59e189bef2b5e6d129fb7c2c988ed0b2130e36ac.tar.gz enigma-fork-59e189bef2b5e6d129fb7c2c988ed0b2130e36ac.tar.xz enigma-fork-59e189bef2b5e6d129fb7c2c988ed0b2130e36ac.zip | |
Reformat
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/node')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java | 42 | ||||
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java | 36 |
2 files changed, 78 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java b/src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java new file mode 100644 index 0000000..e083572 --- /dev/null +++ b/src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2015 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Lesser General Public | ||
| 5 | * License v3.0 which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/lgpl.html | ||
| 7 | * <p> | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.gui.node; | ||
| 12 | |||
| 13 | import javax.swing.tree.DefaultMutableTreeNode; | ||
| 14 | |||
| 15 | import cuchaz.enigma.mapping.ClassEntry; | ||
| 16 | |||
| 17 | public class ClassSelectorClassNode extends DefaultMutableTreeNode { | ||
| 18 | |||
| 19 | private ClassEntry classEntry; | ||
| 20 | |||
| 21 | public ClassSelectorClassNode(ClassEntry classEntry) { | ||
| 22 | this.classEntry = classEntry; | ||
| 23 | } | ||
| 24 | |||
| 25 | public ClassEntry getClassEntry() { | ||
| 26 | return this.classEntry; | ||
| 27 | } | ||
| 28 | |||
| 29 | @Override | ||
| 30 | public String toString() { | ||
| 31 | return this.classEntry.getSimpleName(); | ||
| 32 | } | ||
| 33 | |||
| 34 | @Override | ||
| 35 | public boolean equals(Object other) { | ||
| 36 | return other instanceof ClassSelectorClassNode && equals((ClassSelectorClassNode) other); | ||
| 37 | } | ||
| 38 | |||
| 39 | public boolean equals(ClassSelectorClassNode other) { | ||
| 40 | return this.classEntry.equals(other.classEntry); | ||
| 41 | } | ||
| 42 | } | ||
diff --git a/src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java b/src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java new file mode 100644 index 0000000..805b3a8 --- /dev/null +++ b/src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2015 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Lesser General Public | ||
| 5 | * License v3.0 which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/lgpl.html | ||
| 7 | * <p> | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.gui.node; | ||
| 12 | |||
| 13 | import javax.swing.tree.DefaultMutableTreeNode; | ||
| 14 | |||
| 15 | public class ClassSelectorPackageNode extends DefaultMutableTreeNode { | ||
| 16 | |||
| 17 | private String packageName; | ||
| 18 | |||
| 19 | public ClassSelectorPackageNode(String packageName) { | ||
| 20 | this.packageName = packageName; | ||
| 21 | } | ||
| 22 | |||
| 23 | @Override | ||
| 24 | public String toString() { | ||
| 25 | return this.packageName; | ||
| 26 | } | ||
| 27 | |||
| 28 | @Override | ||
| 29 | public boolean equals(Object other) { | ||
| 30 | return other instanceof ClassSelectorPackageNode && equals((ClassSelectorPackageNode) other); | ||
| 31 | } | ||
| 32 | |||
| 33 | public boolean equals(ClassSelectorPackageNode other) { | ||
| 34 | return this.packageName.equals(other.packageName); | ||
| 35 | } | ||
| 36 | } | ||