diff options
author | Patrick Woodworth <[email protected]> | 2012-12-07 22:52:49 -0800 |
---|---|---|
committer | Patrick Woodworth <[email protected]> | 2012-12-07 22:52:49 -0800 |
commit | 9f42486dcf2896fc0b649f9fd915e26e3a8a5589 (patch) | |
tree | 8db2c9932e8a5fc938e2f4aa61943818d508181e /test/jake2/qcommon | |
parent | 9bf77befdd3a8871cc8ed2c4de561095f2d4958c (diff) |
Fixing test source compilation with new Q2TestDataUtil.
Diffstat (limited to 'test/jake2/qcommon')
-rw-r--r-- | test/jake2/qcommon/Q2TestDataUtil.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/jake2/qcommon/Q2TestDataUtil.java b/test/jake2/qcommon/Q2TestDataUtil.java new file mode 100644 index 0000000..e273215 --- /dev/null +++ b/test/jake2/qcommon/Q2TestDataUtil.java @@ -0,0 +1,51 @@ +package jake2.qcommon; + +import jake2.Jake2; + +import java.util.Locale; + +/** @author Patrick Woodworth */ +public class Q2TestDataUtil { + + private static final boolean USE_DATA_DIALOG = Boolean.getBoolean("jake.data.dialog"); + + public static final void initQ2DataTool() { + if (USE_DATA_DIALOG) { + Q2DataDialogWrapper tmpq2DataTool = new Q2DataDialogWrapper(); + Locale.setDefault(Locale.US); + tmpq2DataTool.setVisible(true); + Jake2.q2DataTool = tmpq2DataTool; + } else { + Jake2.q2DataTool = new Q2DataTool(); + Locale.setDefault(Locale.US); + } + } + + public static class Q2DataDialogWrapper extends Q2DataTool { + + private final Q2DataDialog m_data = new Q2DataDialog(); + + public Q2DataDialogWrapper() { + super(); + } + + @Override + public void testQ2Data() { + m_data.testQ2Data(); + } + + @Override + void dispose() { + m_data.dispose(); + } + + @Override + void setStatus(String text) { + m_data.setStatus(text); + } + + public void setVisible(boolean b) { + m_data.setVisible(b); + } + } +} |