X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=src%2Fcom%2Ftedpearson%2Fypp%2Fmarket%2FMarketUploader.java;h=7632c01f1221bd8ac3b27fd0c1242bcaeca3fbe6;hb=0b0a3e3376419ae1321e349764092c0210cda5eb;hp=4886868a89a61a2fb67f87dd247c0c88ed32a1f1;hpb=615a2587009b0e237aeafc0313cfe6cf76aa69c3;p=jarrg-ian.git diff --git a/src/com/tedpearson/ypp/market/MarketUploader.java b/src/com/tedpearson/ypp/market/MarketUploader.java index 4886868..7632c01 100644 --- a/src/com/tedpearson/ypp/market/MarketUploader.java +++ b/src/com/tedpearson/ypp/market/MarketUploader.java @@ -16,37 +16,29 @@ import org.w3c.dom.*; import javax.xml.parsers.DocumentBuilderFactory; import org.xml.sax.InputSource; import java.util.zip.GZIPOutputStream; -import com.myjavatools.web.ClientHttpRequest; +import net.chiark.yarrg.ClientHttpRequest; import java.util.regex.*; import java.util.prefs.Preferences; import java.beans.*; -import com.tedpearson.util.update.*; - -/* - TODO: - allow adding new islands - allow adding new oceans -*/ /** -* MarketUploader is a class that handles the uploading of market data from -* Yohoho! Puzzle Pirates. Currently, it must be launched in the save Java -* Virtual Machine as YPP. This is handled by a sister "helper" class, -* {@link MarketUploaderRunner}. -*
-* MarketUploader initializes after the main YPP window has initialized. It
-* provides a simple window with a "Capture Market Data" button displayed.
-* Upon clicking this button, a progress dialog is displayed, and the data
-* is processed and submitted to the Pirate Commodities Trader with Bleach (PCTB)
-* web server. If any errors occur, an error dialog is shown, and processing
-* returns, the button becoming re-enabled.
-*
-* @see MarketUploaderRunner
+* MarketUploader is a class that handles the uploading of market
+* data from Yohoho! Puzzle Pirates via the Java Accessibility
+* API.
+*
+* MarketUploader initializes after the main YPP window has
+* initialized. It provides a simple window with a "Capture
+* Market Data" button displayed. Upon clicking this button, a
+* progress dialog is displayed, and the data is processed and
+* submitted to the YARRG and PCTB servers. If any errors occur,
+* an error dialog is shown, and processing returns, the button
+* becoming re-enabled.
*/
public class MarketUploader implements TopLevelWindowListener, GUIInitializedListener {
private JFrame frame = null;
private Window window = null;
private JButton findMarket = null;
+ private JLabel resultSummary = null;
private final static String PCTB_LIVE_HOST_URL = "http://pctb.crabdance.com/";
private final static String PCTB_TEST_HOST_URL = "http://pctb.ilk.org/";
@@ -54,8 +46,9 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
// Yarrg protocol parameters
private final static String YARRG_CLIENTNAME = "jpctb greenend";
- private final static String YARRG_CLIENTVERSION = "0.1";
- private final static String YARRG_CLIENTFIXES = "";
+ private final static String YARRG_CLIENTVERSION =
+ com.tedpearson.ypp.market.Version.version;
+ private final static String YARRG_CLIENTFIXES = "bug-094";
private final static String YARRG_LIVE_URL = "http://upload.yarrg.chiark.net/commod-update-receiver";
private final static String YARRG_TEST_URL = "http://upload.yarrg.chiark.net/test/commod-update-receiver";
private String YARRG_URL;
@@ -69,14 +62,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
private AccessibleContext sidePanel;
private HashMap