Code cleanup.
This commit is contained in:
parent
a463b686b3
commit
72d2eee503
6 changed files with 21 additions and 12 deletions
|
@ -26,7 +26,12 @@ import javax.swing.JOptionPane;
|
|||
import java.awt.Frame;
|
||||
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 */
|
||||
public class ConverterGUI implements FontConversion, FontConverterConstants {
|
||||
/** Default constructor; does nothing */
|
||||
|
@ -42,7 +47,6 @@ public class ConverterGUI implements FontConversion, FontConverterConstants {
|
|||
System.exit(realMain(args, System.out, null));
|
||||
}
|
||||
|
||||
// DLC FIXMEDOC returns true on success
|
||||
public boolean doConversion(ConvertDialog cd, File oldFile, File newFile,
|
||||
String whichConversion) {
|
||||
PrintStream ps;
|
||||
|
@ -101,12 +105,12 @@ public class ConverterGUI implements FontConversion, FontConverterConstants {
|
|||
}
|
||||
}
|
||||
|
||||
// DLC FIXMEDOC
|
||||
public String getDefaultDirectory() {
|
||||
return ThdlOptions.getStringOption("thdl.Jskad.working.directory",
|
||||
null);
|
||||
}
|
||||
|
||||
/** the exit status of this application */
|
||||
private static int returnCode = 0;
|
||||
|
||||
/** Runs the converter without exiting the program.
|
||||
|
|
|
@ -279,15 +279,11 @@ public class DuffPane extends TibetanPane implements FocusListener {
|
|||
}
|
||||
|
||||
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",
|
||||
36);
|
||||
}
|
||||
|
||||
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",
|
||||
14);
|
||||
}
|
||||
|
|
|
@ -20,10 +20,22 @@ package org.thdl.tib.input;
|
|||
|
||||
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
|
||||
{
|
||||
/** 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();
|
||||
|
||||
/** 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,
|
||||
File newFile, String whichConversion);
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@ interface FontConverterConstants
|
|||
final String suggested_TO_UNI_prefix = "Uni_";
|
||||
final String suggested_TO_TM_prefix = "TM_";
|
||||
|
||||
// DLC prune
|
||||
|
||||
// String Constants
|
||||
public final String PROGRAM_TITLE = "THDL Font Conversion (with Jskad Technology)";
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.io.File;
|
|||
class RecentlyOpenedFilesDatabase {
|
||||
|
||||
/** 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() {
|
||||
int n = 0;
|
||||
// We store 2*N files in the preferences in case some are deleted.
|
||||
|
|
|
@ -27,7 +27,7 @@ _, ,/,|,!,:,;,@,#,$,%,(,),H,M,`,&,@#,?,=,[,],<,>,{,},*
|
|||
<?Input:Punctuation?>
|
||||
//_~32,1~0,32
|
||||
// ~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
|
||||
~45,1~~1,45~~~~~~~0F0B
|
||||
/~202,1~~1,107~~~~~~~0F0D
|
||||
|
|
Loading…
Reference in a new issue