Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nicol committed Oct 20, 2024
1 parent 9d371bf commit 34b2d6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 6 additions & 8 deletions src/main/java/org/magic/gui/components/deck/DeckTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import org.magic.gui.renderer.DeckTreeCellRenderer;

public class DeckTree extends JTree{

private static final long serialVersionUID = 1L;
private DefaultTreeModel model;
private DefaultMutableTreeNode root;
private DefaultMutableTreeNode creatureNode = new DefaultMutableTreeNode("Creatures");
Expand Down Expand Up @@ -48,8 +50,8 @@ private void expandAll(TreePath parent) {
TreeNode node = (TreeNode) parent.getLastPathComponent();
if (node.getChildCount() >= 0) {
for (Enumeration<? extends TreeNode>e = node.children(); e.hasMoreElements();) {
TreeNode n = e.nextElement();
TreePath path = parent.pathByAddingChild(n);
var n = e.nextElement();
var path = parent.pathByAddingChild(n);
expandAll(path);
}
}
Expand All @@ -64,7 +66,8 @@ private void initTree() {
landsNode.removeAllChildren();
spellsNode.removeAllChildren();
sideNode.removeAllChildren();



if (selectedDeck != null) {
for (var mc : selectedDeck.getMain().entrySet()) {
if (mc.getKey().isCreature() && !mc.getKey().isArtifact())
Expand All @@ -88,11 +91,6 @@ else if (mc.getKey().isPlaneswalker())
}
}

public void enableSelection() {
// TODO Auto-generated method stub

}



}
6 changes: 5 additions & 1 deletion src/main/resources/data/sets_codeAliases.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{


"YBLB": [
"YDSK"

],
"DSK": [
"ADSK"
],
Expand Down

0 comments on commit 34b2d6b

Please sign in to comment.