Code cleanup.

This commit is contained in:
dchandler 2003-07-05 19:26:58 +00:00
parent a463b686b3
commit 72d2eee503
6 changed files with 21 additions and 12 deletions

View file

@ -26,7 +26,12 @@ import javax.swing.JOptionPane;
import java.awt.Frame; import java.awt.Frame;
import java.awt.Dialog; import java.awt.Dialog;
/** DLC FIXMEDOC /** The ConverterGUI is a Swing GUI application. It is used for
* converting TibetanMachine-, TibetanMachineWeb-, and THDL Extended
* Wylie-encoded Rich Text Files to any of several formats, including
* Unicode. The TibetanMachine-to-TibetanMachineWeb conversion is
* flawless, and is used as an intermediate step in other
* conversions, for example the TibetanMachine-to-Unicode conversion.
* @author David Chandler */ * @author David Chandler */
public class ConverterGUI implements FontConversion, FontConverterConstants { public class ConverterGUI implements FontConversion, FontConverterConstants {
/** Default constructor; does nothing */ /** Default constructor; does nothing */
@ -42,7 +47,6 @@ public class ConverterGUI implements FontConversion, FontConverterConstants {
System.exit(realMain(args, System.out, null)); System.exit(realMain(args, System.out, null));
} }
// DLC FIXMEDOC returns true on success
public boolean doConversion(ConvertDialog cd, File oldFile, File newFile, public boolean doConversion(ConvertDialog cd, File oldFile, File newFile,
String whichConversion) { String whichConversion) {
PrintStream ps; PrintStream ps;
@ -101,12 +105,12 @@ public class ConverterGUI implements FontConversion, FontConverterConstants {
} }
} }
// DLC FIXMEDOC
public String getDefaultDirectory() { public String getDefaultDirectory() {
return ThdlOptions.getStringOption("thdl.Jskad.working.directory", return ThdlOptions.getStringOption("thdl.Jskad.working.directory",
null); null);
} }
/** the exit status of this application */
private static int returnCode = 0; private static int returnCode = 0;
/** Runs the converter without exiting the program. /** Runs the converter without exiting the program.

View file

@ -279,15 +279,11 @@ public class DuffPane extends TibetanPane implements FocusListener {
} }
private static int defaultTibFontSize() { private static int defaultTibFontSize() {
// FIXME: at program exit, or when the user selects "Save
// preferences", or somehow, save the value the users chooses:
return ThdlOptions.getIntegerOption("thdl.default.tibetan.font.size", return ThdlOptions.getIntegerOption("thdl.default.tibetan.font.size",
36); 36);
} }
private static int defaultRomanFontSize() { private static int defaultRomanFontSize() {
// FIXME: at program exit, or when the user selects "Save
// preferences", or somehow, save the value the users chooses:
return ThdlOptions.getIntegerOption("thdl.default.roman.font.size", return ThdlOptions.getIntegerOption("thdl.default.roman.font.size",
14); 14);
} }

View file

@ -20,10 +20,22 @@ package org.thdl.tib.input;
import java.io.File; import java.io.File;
// DLC FIXMEDOC /** A FontConversion is an implementer of the conversions built into
* (@link #ConvertDialog}.
* @author Nathaniel Garson, Tibetan and Himalayan Digital Library */
interface FontConversion interface FontConversion
{ {
/** Returns the directory to be displayed when the user selects
"Browse..." to look for either the new or old file. May
return null if no particular choice seems more appropriate
than any other. */
String getDefaultDirectory(); String getDefaultDirectory();
/** Converts oldFile to newFile, yielding a modal dialog box
displaying the results if you want happy users. The
conversion performed is specified by the interned String
whichConversion, which must be one of the known conversions.
@return true on success, false otherwise */
boolean doConversion(ConvertDialog cd, File oldFile, boolean doConversion(ConvertDialog cd, File oldFile,
File newFile, String whichConversion); File newFile, String whichConversion);
} }

View file

@ -40,8 +40,6 @@ interface FontConverterConstants
final String suggested_TO_UNI_prefix = "Uni_"; final String suggested_TO_UNI_prefix = "Uni_";
final String suggested_TO_TM_prefix = "TM_"; final String suggested_TO_TM_prefix = "TM_";
// DLC prune
// String Constants // String Constants
public final String PROGRAM_TITLE = "THDL Font Conversion (with Jskad Technology)"; public final String PROGRAM_TITLE = "THDL Font Conversion (with Jskad Technology)";

View file

@ -31,7 +31,6 @@ import java.io.File;
class RecentlyOpenedFilesDatabase { class RecentlyOpenedFilesDatabase {
/** Tells ThdlOptions about the recently opened files. Call this before program exit. */ /** Tells ThdlOptions about the recently opened files. Call this before program exit. */
// DLC FIXME: this doesn't keep the second-most recently opened item second if you have just three items.
public static void storeRecentlyOpenedFilePreferences() { public static void storeRecentlyOpenedFilePreferences() {
int n = 0; int n = 0;
// We store 2*N files in the preferences in case some are deleted. // We store 2*N files in the preferences in case some are deleted.

View file

@ -27,7 +27,7 @@ _, ,/,|,!,:,;,@,#,$,%,(,),H,M,`,&,@#,?,=,[,],<,>,{,},*
<?Input:Punctuation?> <?Input:Punctuation?>
//_~32,1~0,32 //_~32,1~0,32
// ~45,1~0,45~~~~~~~0F0B // ~45,1~0,45~~~~~~~0F0B
// DLC 0020 or a wider space? // DLC 0020 or a wider space, perhaps a couple of EM spaces (2003,2003)?
_~32,1~~1,32~~~~~~~0020 _~32,1~~1,32~~~~~~~0020
~45,1~~1,45~~~~~~~0F0B ~45,1~~1,45~~~~~~~0F0B
/~202,1~~1,107~~~~~~~0F0D /~202,1~~1,107~~~~~~~0F0D