Make it so Last Activity column isn't cut off

Make it so double-clicking a gauntlet on the Load Gauntlet screen will launch it
Support renaming gauntlets
Support sorting gauntlets (and quests) case insensitive
This commit is contained in:
drdev
2014-08-07 23:33:46 +00:00
parent 04c2e30dbd
commit d571daeed0
6 changed files with 180 additions and 52 deletions

View File

@@ -1,8 +1,10 @@
package forge.gauntlet;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
import forge.deck.Deck;
import forge.deck.Deck;
import forge.properties.ForgeConstants;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -37,6 +39,21 @@ public final class GauntletData {
name = name0;
}
/**
* Rename this gauntlet.
*
* @param newName
* the new name to set
*/
public void rename(final String newName) {
File newpath = new File(ForgeConstants.GAUNTLET_DIR.userPrefLoc, newName + ".dat");
File oldpath = new File(ForgeConstants.GAUNTLET_DIR.userPrefLoc, this.name + ".dat");
oldpath.renameTo(newpath);
this.name = newName;
GauntletIO.saveGauntlet(this);
}
public String getName() {
return name;
}

View File

@@ -161,7 +161,7 @@ public final class QuestData {
}
/**
* Rename this quest the name.
* Rename this quest.
*
* @param newName
* the new name to set