Added game files descriptions in modpack file selection ui
This commit is contained in:
@@ -48,7 +48,11 @@ public final class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] getURL() {
|
||||
public static URL[] getURL() {
|
||||
return ((URLClassLoader) Utils.class.getClassLoader()).getURLs();
|
||||
}
|
||||
|
||||
public static String[] getURLString() {
|
||||
URL[] urls = ((URLClassLoader) Utils.class.getClassLoader()).getURLs();
|
||||
String[] urlStrings = new String[urls.length];
|
||||
for (int i = 0; i < urlStrings.length; i++)
|
||||
|
||||
@@ -27,6 +27,7 @@ import javax.swing.JTree;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ColorUIResource;
|
||||
import javax.swing.tree.TreeCellRenderer;
|
||||
import org.jackhuang.hellominecraft.util.Pair;
|
||||
|
||||
public class CheckBoxTreeCellRenderer extends JPanel implements TreeCellRenderer {
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package org.jackhuang.hellominecraft.util.ui.checktree;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import org.jackhuang.hellominecraft.util.Pair;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -40,6 +41,14 @@ public class CheckBoxTreeNode extends DefaultMutableTreeNode {
|
||||
this.isSelected = isSelected;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (userObject instanceof Pair)
|
||||
return "<html>" + ((Pair) userObject).key + "<font color=gray> - " + ((Pair) userObject).value + "</font></html>";
|
||||
else
|
||||
return userObject.toString();
|
||||
}
|
||||
|
||||
public boolean isSelected() {
|
||||
return isSelected;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user