[sword-cvs] r11 - in trunk/app: . src/org/crosswire/common
src/org/crosswire/flashcards src/org/crosswire/modedit
Apache
apache at crosswire.org
Wed Sep 8 11:26:35 MST 2004
Author:
Date: 2004-09-08 11:26:35 -0700 (Wed, 08 Sep 2004)
New Revision: 11
Added:
trunk/app/src/org/crosswire/flashcards/Debug.java
trunk/app/src/org/crosswire/flashcards/MainMenu.java
trunk/app/src/org/crosswire/modedit/CGreekIM.java
trunk/app/src/org/crosswire/modedit/Gtk2ClassicalGreekIM.java
trunk/app/src/org/crosswire/modedit/Ibycus4IM.java
Modified:
trunk/app/GNUmakefile
trunk/app/src/org/crosswire/common/CWClassLoader.java
trunk/app/src/org/crosswire/flashcards/Editor.java
trunk/app/src/org/crosswire/flashcards/EditorFrame.java
trunk/app/src/org/crosswire/flashcards/MainFrame.java
trunk/app/src/org/crosswire/flashcards/Quiz.java
trunk/app/src/org/crosswire/modedit/UniTextEdit.java
Log:
- Made this compile again on Linux (1.4.2_04)
- Added a menu to the main frame.
- Added the ability to run the editor from
the main frame.
- Added three input methods (these are not yet
finished...)
- Added a debug class (for those of us that
occasionally debug via print()s)
Modified: trunk/app/GNUmakefile
===================================================================
--- trunk/app/GNUmakefile 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/GNUmakefile 2004-09-08 18:26:35 UTC (rev 11)
@@ -28,6 +28,8 @@
@$(CHECK_CLASSES_DIRECTORY)
javac -g -d $(CLASSES_DIRECTORY) `find . -type f -name '*.java'`
cp src/org/crosswire/flashcards/*png classes/org/crosswire/flashcards
+ cd $(CLASSES_DIRECTORY) ; \
+ jar cvf $(CLASSES_DIRECTORY)/flashcards.jar org
Editor :
java -classpath classes org.crosswire.flashcards.Editor &
Modified: trunk/app/src/org/crosswire/common/CWClassLoader.java
===================================================================
--- trunk/app/src/org/crosswire/common/CWClassLoader.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/common/CWClassLoader.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -235,12 +235,19 @@
{
if (home != null)
{
+
return new URL(home.getProtocol(), home.getHost(), home.getPort(), home.getFile());
}
}
catch (MalformedURLException e)
{
- assert false;
+ // assert false;
+ //
+ // The above statement fails to compile in 1.4, I'm assuming the intent is
+ // to throw an AssertionError; so, 'throw new AssertionError( );'.
+ // John Jacques, john.jacques at bigfoot.com
+ //
+ throw new AssertionError( );
}
return home;
}
@@ -332,8 +339,16 @@
}
catch (MalformedURLException ex)
{
- assert false : ex;
- return null;
+ // assert false : ex;
+ //
+ // The above statement fails to compile in 1.4, I'm assuming the intent is
+ // to throw an AssertionError( ex ); so, 'throw new AssertionError( ex );'.
+ // John Jacques, john.jacques at bigfoot.com
+ //
+ throw new AssertionError( ex );
+
+ //return null;
+ // unreachable!
}
}
Added: trunk/app/src/org/crosswire/flashcards/Debug.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/Debug.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/flashcards/Debug.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// Debug.java
+//
+// Help with debugging!
+//
+// Copyright : 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
+package org.crosswire.flashcards;
+
+import java.io.*;
+
+class Debug {
+
+ //
+ // Attributes
+ //
+
+ private static boolean enabled = false;
+ private static boolean trace = true;
+ private static boolean inform = true;
+ private static boolean warn = true;
+ private static boolean error = true;
+ private static PrintStream printStream = System.err;
+
+ //
+ // Methods
+ //
+
+ // ---------------
+ static boolean getEnabled( ) { return enabled; }
+
+ // ---------------
+ static void setEnabled( boolean enabled ) { Debug.enabled = enabled; }
+
+ // ---------------
+ static boolean getTrace( ) { return trace; }
+
+ // ---------------
+ static void setTrace( boolean trace ) { Debug.trace = trace; }
+
+ // ---------------
+ static boolean getInform( ) { return inform; }
+
+ // ---------------
+ static void setInform( boolean inform ) { Debug.inform = inform; }
+
+ // ---------------
+ static boolean getWarn( ) { return warn; }
+
+ // ---------------
+ static void setWarn( boolean warn ) { Debug.warn = warn; }
+
+ // ---------------
+ static boolean getError( ) { return error; }
+
+ // ---------------
+ static void setError( boolean error ) { Debug.error = error; }
+
+ // ---------------
+ static PrintStream getPrintStream( ) { return printStream; }
+
+ // ---------------
+ static void setPrintStream( PrintStream printStream ) {
+
+ Debug.printStream = printStream;
+
+ }
+
+ // ---------------
+ static void trace( String identity, String message ) {
+
+ if( null != printStream && false != trace && false != enabled ) {
+
+ Debug.printStream.print( " TRACE : " + identity + " : " +
+ Thread.currentThread( ) + "\n" + message );
+
+ }
+
+ }
+
+ // ---------------
+ static void inform( String identity, String message ) {
+
+ if( null != printStream && false != inform && false != enabled ) {
+
+ Debug.printStream.print( "INFORM : " + identity + " : " +
+ Thread.currentThread( ) + "\n" + message );
+
+ }
+
+ }
+
+ // ---------------
+ static void warn( String identity, String message ) {
+
+ if( null != printStream && false != warn && false != enabled ) {
+
+ Debug.printStream.print( " WARN : " + identity + " : " +
+ Thread.currentThread( ) + "\n" + message );
+
+ }
+
+ }
+
+ // ---------------
+ static void error( String identity, String message ) {
+
+ if( null != printStream && false != error ) {
+
+ Debug.printStream.print( " ERROR : " + identity + " : " +
+ Thread.currentThread( ) + "\n" + message );
+
+ }
+
+ }
+
+}
Modified: trunk/app/src/org/crosswire/flashcards/Editor.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/Editor.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/flashcards/Editor.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -1,3 +1,13 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// Editor.java
+//
+// Editor for lessons used by Quiz (part of FlashCards).
+//
+// Copyright : (c) 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
package org.crosswire.flashcards;
import java.awt.Dimension;
@@ -5,49 +15,81 @@
import javax.swing.UIManager;
-/**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2003</p>
- * <p>Company: </p>
- * @author not attributable
- * @version 1.0
- */
+public class Editor {
-public class Editor {
+ //
+ // Attributes
+ //
+
boolean packFrame = false;
- //Construct the application
- public Editor() {
- EditorFrame frame = new EditorFrame();
+ //
+ // Methods
+ //
+
+ // ---------------
+ public Editor( boolean standAlone ) {
+
+ EditorFrame frame = new EditorFrame( standAlone );
+
//Validate frames that have preset sizes
//Pack frames that have useful preferred size info, e.g. from their layout
- if (packFrame) {
- frame.pack();
- }
- else {
- frame.validate();
- }
+
+ if( packFrame ) { frame.pack( ); }
+ else { frame.validate( ); }
+
//Center the window
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension frameSize = frame.getSize();
- if (frameSize.height > screenSize.height) {
+
+ Dimension screenSize = Toolkit.getDefaultToolkit( ).getScreenSize( );
+ Dimension frameSize = frame.getSize( );
+
+ if( frameSize.height > screenSize.height ) {
+
frameSize.height = screenSize.height;
+
}
- if (frameSize.width > screenSize.width) {
+
+ if( frameSize.width > screenSize.width ) {
+
frameSize.width = screenSize.width;
+
}
- frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
- frame.setVisible(true);
+
+ frame.setLocation( ( screenSize.width - frameSize.width ) / 2,
+ ( screenSize.height - frameSize.height ) / 2 );
+ frame.setVisible( true );
+
}
+
//Main method
- public static void main(String[] args) {
+ public static void main( String[ ] arguments ) {
+
+ // Parse the command line arguments
+
+ for( int index = 0; arguments.length > index; ++ index ) {
+
+ if( ( arguments [ index ] ).equals( "-debug" ) ) {
+
+ Debug.setEnabled( true );
+
+ }
+
+ }
+
+ // Set the "Look And Feel"
+
try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+
+ UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName( ) );
+
+ } catch( Exception exception ) {
+
+ exception.printStackTrace( );
+
}
- catch(Exception e) {
- e.printStackTrace();
- }
- new Editor();
+
+ new Editor( true );
+
}
+
}
Modified: trunk/app/src/org/crosswire/flashcards/EditorFrame.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/EditorFrame.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/flashcards/EditorFrame.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -1,3 +1,13 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// EditorFrame.java
+//
+// Editor for lessons used by Quiz (part of FlashCards).
+//
+// Copyright : (c) 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
package org.crosswire.flashcards;
import java.awt.AWTEvent;
@@ -33,16 +43,12 @@
import org.crosswire.modedit.UniTextEdit;
-/**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2003</p>
- * <p>Company: </p>
- * @author not attributable
- * @version 1.0
- */
+public class EditorFrame extends JFrame {
-public class EditorFrame extends JFrame {
+ //
+ // Attributes
+ //
+
JPanel contentPane;
JToolBar jToolBar = new JToolBar();
JButton jButton1 = new JButton();
@@ -77,6 +83,7 @@
BorderLayout borderLayout6 = new BorderLayout();
Vector words = new Vector();
UniTextEdit wordText = new UniTextEdit();
+ private boolean standAlone;
static class WordEntry {
public WordEntry(String word) { this.word = word; }
@@ -88,16 +95,25 @@
}
}
- //Construct the frame
- public EditorFrame() {
- enableEvents(AWTEvent.WINDOW_EVENT_MASK);
- try {
- jbInit();
+ //
+ // Methods
+ //
+
+ // ---------------
+ public EditorFrame( boolean standAlone ) {
+
+ this.standAlone = standAlone;
+ enableEvents( AWTEvent.WINDOW_EVENT_MASK );
+
+ try { jbInit( ); }
+ catch( Exception exception ) {
+
+ Debug.error( this.toString( ), exception.getMessage( ) );
+
}
- catch(Exception e) {
- e.printStackTrace();
- }
+
}
+
//Component initialization
private void jbInit() throws Exception {
image1 = new ImageIcon(EditorFrame.class.getResource("openFile.png"));
@@ -296,8 +312,12 @@
}
//File | Exit action performed
- public void jMenuFileExit_actionPerformed(ActionEvent e) {
- System.exit(0);
+
+ public void jMenuFileExit_actionPerformed( ActionEvent event ) {
+
+ if( standAlone ) { System.exit( 0 ); }
+ else { dispose( ); }
+
}
//Help | About action performed
@@ -306,17 +326,26 @@
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
- dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
+ dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
+ (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.pack();
dlg.show();
}
- //Overridden so we can exit when window is closed
- protected void processWindowEvent(WindowEvent e) {
- super.processWindowEvent(e);
- if (e.getID() == WindowEvent.WINDOW_CLOSING) {
- System.exit(0);
+
+ // Overridden so we can exit when window is closed
+
+ protected void processWindowEvent( WindowEvent event ) {
+
+ super.processWindowEvent( event );
+
+ if( event.getID( ) == WindowEvent.WINDOW_CLOSING ) {
+
+ if( standAlone ) { System.exit( 0 ); }
+ else { dispose( ); }
+
}
+
}
void jButton1_actionPerformed(ActionEvent e) {
@@ -424,7 +453,8 @@
void fileName_caretUpdate(CaretEvent e) {
lesson.setProperty("fileName", fileName.getText()+".flash");
- setTitle("FlashCard Editor (c) CrossWire Bible Society http://crosswire.org - " + lesson.getProperty("fileName"));
+ setTitle("FlashCard Editor (c) CrossWire Bible Society http://crosswire.org - " +
+ lesson.getProperty("fileName"));
}
void lessonTitle_caretUpdate(CaretEvent e) {
Modified: trunk/app/src/org/crosswire/flashcards/MainFrame.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/MainFrame.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/flashcards/MainFrame.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -97,6 +97,7 @@
private static final String LESSON_ROOT = "lessons";
private static final String DIR_PROJECT = ".flashcards";
private static final String FILE_PROTOCOL = "file";
+ private MainMenu mainMenu;
static class WordEntry {
public WordEntry(String word) { this.word = word; }
@@ -121,7 +122,13 @@
}
catch (MalformedURLException e1)
{
- assert false;
+ // assert false;
+ //
+ // The above statement fails to compile in 1.4, I'm assuming the intent is
+ // to throw an AssertionError; so, 'throw new AssertionError( );'.
+ // John Jacques, john.jacques at bigfoot.com
+ //
+ throw new AssertionError( );
}
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
@@ -133,6 +140,8 @@
{
e.printStackTrace();
}
+ mainMenu = new MainMenu( this );
+ setJMenuBar( mainMenu );
}
//Component initialization
private void jbInit() throws Exception {
@@ -224,6 +233,7 @@
private void loadJarLessons(String directoryPath)
{
+
// Dig into the jar for lessons
URL lessonsURL = this.getClass().getResource('/' + directoryPath);
URLConnection connection = null;
@@ -233,7 +243,14 @@
}
catch (IOException e1)
{
- assert false;
+ // assert false;
+ //
+ // The above statement fails to compile in 1.4, I'm assuming the intent is
+ // to throw an AssertionError; so, 'throw new AssertionError( );'.
+ // John Jacques, john.jacques at bigfoot.com
+ //
+ throw new AssertionError( );
+
}
if (connection instanceof JarURLConnection)
{
@@ -245,7 +262,13 @@
}
catch (IOException e2)
{
- assert false;
+ // assert false;
+ //
+ // The above statement fails to compile in 1.4, I'm assuming the intent is
+ // to throw an AssertionError; so, 'throw new AssertionError( );'.
+ // John Jacques, john.jacques at bigfoot.com
+ //
+ throw new AssertionError( );
}
Enumeration enum = jarFile.entries();
Set lessonSet = null;
Added: trunk/app/src/org/crosswire/flashcards/MainMenu.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/MainMenu.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/flashcards/MainMenu.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -0,0 +1,190 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// MainMenu.java
+//
+// Menu bar for FlashCards
+//
+// Copyright : 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
+package org.crosswire.flashcards;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import javax.swing.*;
+
+class MainMenu extends JMenuBar {
+
+ //
+ // Attributes
+ //
+
+ private JFrame frame;
+ private JRadioButtonMenuItem trace, inform, warn, error;
+
+ //
+ // Methods
+ //
+
+ // ---------------
+ MainMenu( JFrame frame ) {
+
+ this.frame = frame;
+
+ JMenu menu1, menu2;
+ JMenuItem item;
+ ButtonGroup buttonGroup;
+
+ // Application Menu
+
+ menu1 = new JMenu( "FlashCards" );
+
+ // Application Menu -> Editor
+
+ item = new JMenuItem( "Edit" );
+ item.addActionListener( new EditAction( ) );
+ menu1.add( item );
+
+ // Application Menu -> Debugging
+
+ if( Debug.getEnabled( ) ) {
+
+ menu2 = new JMenu( "Debugging" );
+ DebugAction debugAction = new DebugAction( );
+ trace = new JRadioButtonMenuItem( "Trace" );
+ if( Debug.getTrace( ) ) { trace.setSelected( true ); }
+ trace.addActionListener( debugAction );
+ menu2.add( trace );
+ inform = new JRadioButtonMenuItem( "Inform" );
+ if( Debug.getInform( ) ) { inform.setSelected( true ); }
+ inform.addActionListener( debugAction );
+ menu2.add( inform );
+ warn = new JRadioButtonMenuItem( "Warn" );
+ if( Debug.getWarn( ) ) { warn.setSelected( true ); }
+ warn.addActionListener( debugAction );
+ menu2.add( warn );
+ error = new JRadioButtonMenuItem( "Error" );
+ if( Debug.getError( ) ) { error.setSelected( true ); }
+ error.addActionListener( debugAction );
+ menu2.add( error );
+ menu1.add( menu2 );
+
+ }
+
+ // Application Menu -> Exit
+
+ item = new JMenuItem( "Exit" );
+ item.addActionListener( new ExitAction( ) );
+ menu1.add( item );
+ add( menu1 );
+
+ // Help Menu
+
+ menu1 = new JMenu( "Help" );
+
+ // Help Menu -> About
+
+ item = new JMenuItem( "About" );
+ item.addActionListener( new AboutAction( ) );
+ menu1.add( item );
+
+ // Add the menu
+
+ add( menu1 );
+
+ }
+
+ //
+ // Classes
+ //
+
+ // ---------------
+ class EditAction extends AbstractAction {
+
+ public void actionPerformed( ActionEvent event ) {
+
+ Debug.trace( this.toString( ), "Beginning\n" );
+ new Editor( false );
+ Debug.trace( this.toString( ), "Ending\n" );
+
+ }
+
+ }
+
+ // ---------------
+ class DebugAction extends AbstractAction {
+
+ public void actionPerformed( ActionEvent event ) {
+
+ Debug.trace( this.toString( ), "Beginning\n" );
+ Debug.inform( this.toString( ),
+ "event.getActionCommand( ) = " + event.getActionCommand( ) + "\n" );
+
+ if( event.getActionCommand( ).equals( "Trace" ) ) {
+
+ if( trace.isSelected( ) ) { Debug.setTrace( true ); }
+ else { Debug.setTrace( false ); }
+
+ } else if( event.getActionCommand( ).equals( "Inform" ) ) {
+
+ if( inform.isSelected( ) ) { Debug.setInform( true ); }
+ else { Debug.setInform( false ); }
+
+ } else if( event.getActionCommand( ).equals( "Warn" ) ) {
+
+ if( warn.isSelected( ) ) { Debug.setWarn( true ); }
+ else { Debug.setWarn( false ); }
+
+ } else if( event.getActionCommand( ).equals( "Error" ) ) {
+
+ if( error.isSelected( ) ) { Debug.setError( true ); }
+ else { Debug.setError( false ); }
+
+ }
+
+ Debug.trace( this.toString( ), "Ending\n" );
+
+ }
+
+ }
+
+ // ---------------
+ class ExitAction extends AbstractAction {
+
+ public ExitAction( ) { super( ); }
+
+ public void actionPerformed( ActionEvent event ) {
+
+ Debug.trace( this.toString( ), "Beginning\n" );
+ System.exit( 0 );
+ Debug.trace( this.toString( ), "Ending\n" );
+
+ }
+
+ }
+
+ // ---------------
+ class AboutAction extends AbstractAction {
+
+ public void actionPerformed( ActionEvent event ) {
+
+ String aboutString = new String( "FlashCards\n" +
+ "A Vocabulary Training Tool by CrossWire\n" +
+ "(c) 2004 CrossWire Bible Society\n" +
+ "http://crosswire.org" );
+
+ Debug.trace( this.toString( ), "Beginning\n" );
+ JOptionPane.showMessageDialog( frame,
+ aboutString,
+ "About FlashCards",
+ JOptionPane.INFORMATION_MESSAGE );
+ Debug.trace( this.toString( ), "Ending\n" );
+
+ }
+
+ }
+
+}
Modified: trunk/app/src/org/crosswire/flashcards/Quiz.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/Quiz.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/flashcards/Quiz.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -1,3 +1,13 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// Quiz.java
+//
+// The start of it all
+//
+// Copyright : 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
package org.crosswire.flashcards;
import java.awt.Dimension;
@@ -5,49 +15,84 @@
import javax.swing.UIManager;
-/**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2003</p>
- * <p>Company: </p>
- * @author not attributable
- * @version 1.0
- */
-
public class Quiz {
- boolean packFrame = false;
- //Construct the application
- public Quiz() {
- MainFrame frame = new MainFrame();
- //Validate frames that have preset sizes
- //Pack frames that have useful preferred size info, e.g. from their layout
- if (packFrame) {
- frame.pack();
+ //
+ // Attributes
+ //
+
+ boolean packFrame = false;
+
+ //
+ // Methods
+ //
+
+ // ---------------
+ public Quiz( ) {
+
+ MainFrame frame = new MainFrame();
+
+ // Validate frames that have preset sizes
+ // Pack frames that have useful preferred size info,
+ // e.g. from their layout
+
+ if( packFrame ) { frame.pack( ); }
+ else { frame.validate( ); }
+
+ //Center the window
+
+ Dimension screenSize = Toolkit.getDefaultToolkit( ).getScreenSize( );
+ Dimension frameSize = frame.getSize( );
+
+ if( frameSize.height > screenSize.height ) {
+
+ frameSize.height = screenSize.height;
+
+ }
+
+ if( frameSize.width > screenSize.width ) {
+
+ frameSize.width = screenSize.width;
+
+ }
+
+ frame.setLocation( ( screenSize.width - frameSize.width ) / 2,
+ ( screenSize.height - frameSize.height ) / 2 );
+ frame.setVisible( true );
+
}
- else {
- frame.validate();
+
+ // ---------------
+ public static void main( String [ ] arguments ) {
+
+ // Parse the command line arguments
+
+ for( int index = 0; arguments.length > index; ++ index ) {
+
+ if( ( arguments [ index ] ).equals( "-debug" ) ) {
+
+ Debug.setEnabled( true );
+
+ }
+
+ }
+
+ // Set the "Look And Feel"
+
+ try {
+
+ UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName( ) );
+
+ } catch(Exception e ) {
+
+ e.printStackTrace();
+
+ }
+
+ // Go...
+
+ new Quiz( );
+
}
- //Center the window
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension frameSize = frame.getSize();
- if (frameSize.height > screenSize.height) {
- frameSize.height = screenSize.height;
- }
- if (frameSize.width > screenSize.width) {
- frameSize.width = screenSize.width;
- }
- frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
- frame.setVisible(true);
- }
- //Main method
- public static void main(String[] args) {
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- }
- catch(Exception e) {
- e.printStackTrace();
- }
- new Quiz();
- }
+
}
Added: trunk/app/src/org/crosswire/modedit/CGreekIM.java
===================================================================
--- trunk/app/src/org/crosswire/modedit/CGreekIM.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/modedit/CGreekIM.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -0,0 +1,161 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// CGreekIM.java
+//
+// Input Method to match the Emacs cgreek package.
+//
+// Copyright : 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
+package org.crosswire.modedit;
+
+import java.util.*;
+
+public class CGreekIM extends SWInputMethod {
+
+ //
+ // Attributes
+ //
+
+ private Hashtable characterMap = new Hashtable();
+
+ //
+ // Methods
+ //
+
+ // ---------------
+ public CGreekIM( String name ) {
+
+ super( name );
+ init( );
+
+ }
+
+ // ---------------
+ public String translate( char input ) {
+
+ String returnValue = ( String ) characterMap.get( new Integer( input ) );
+
+ if( returnValue == null ) {
+
+ returnValue = new String() + input;
+
+ }
+
+ return returnValue;
+
+ }
+
+ // ---------------
+ private void init( ) {
+
+ // Lower case alphabet
+ characterMap.put( new Integer( 'a' ), new String( new char [ ] { 0x03b1 } ) );
+ characterMap.put( new Integer( 'b' ), new String( new char [ ] { 0x03b2 } ) );
+ characterMap.put( new Integer( 'g' ), new String( new char [ ] { 0x03b3 } ) );
+ characterMap.put( new Integer( 'd' ), new String( new char [ ] { 0x03b4 } ) );
+ characterMap.put( new Integer( 'e' ), new String( new char [ ] { 0x03b5 } ) );
+ characterMap.put( new Integer( 'z' ), new String( new char [ ] { 0x03b6 } ) );
+ characterMap.put( new Integer( 'h' ), new String( new char [ ] { 0x03b7 } ) );
+ characterMap.put( new Integer( 'q' ), new String( new char [ ] { 0x03b8 } ) );
+ characterMap.put( new Integer( 'i' ), new String( new char [ ] { 0x03b9 } ) );
+ characterMap.put( new Integer( 'k' ), new String( new char [ ] { 0x03ba } ) );
+ characterMap.put( new Integer( 'l' ), new String( new char [ ] { 0x03bb } ) );
+ characterMap.put( new Integer( 'm' ), new String( new char [ ] { 0x03bc } ) );
+ characterMap.put( new Integer( 'n' ), new String( new char [ ] { 0x03bd } ) );
+ characterMap.put( new Integer( 'x' ), new String( new char [ ] { 0x03be } ) );
+ characterMap.put( new Integer( 'o' ), new String( new char [ ] { 0x03bf } ) );
+ characterMap.put( new Integer( 'p' ), new String( new char [ ] { 0x03c0 } ) );
+ characterMap.put( new Integer( 'r' ), new String( new char [ ] { 0x03c1 } ) );
+ characterMap.put( new Integer( 's' ), new String( new char [ ] { 0x03c3 } ) );
+ characterMap.put( new Integer( 't' ), new String( new char [ ] { 0x03c4 } ) );
+ characterMap.put( new Integer( 'u' ), new String( new char [ ] { 0x03c5 } ) );
+ characterMap.put( new Integer( 'f' ), new String( new char [ ] { 0x03c6 } ) );
+ characterMap.put( new Integer( 'c' ), new String( new char [ ] { 0x03be } ) );
+ characterMap.put( new Integer( 'y' ), new String( new char [ ] { 0x03c8 } ) );
+ characterMap.put( new Integer( 'w' ), new String( new char [ ] { 0x03c9 } ) );
+
+ // Upper case alphabet
+ characterMap.put( new Integer( 'A' ), new String( new char [ ] { 0x0391 } ) );
+ characterMap.put( new Integer( 'B' ), new String( new char [ ] { 0x0392 } ) );
+ characterMap.put( new Integer( 'C' ), new String( new char [ ] { 0x0393 } ) );
+ characterMap.put( new Integer( 'D' ), new String( new char [ ] { 0x0394 } ) );
+ characterMap.put( new Integer( 'E' ), new String( new char [ ] { 0x0395 } ) );
+ characterMap.put( new Integer( 'Z' ), new String( new char [ ] { 0x0396 } ) );
+ characterMap.put( new Integer( 'H' ), new String( new char [ ] { 0x0397 } ) );
+ characterMap.put( new Integer( 'Q' ), new String( new char [ ] { 0x0398 } ) );
+ characterMap.put( new Integer( 'I' ), new String( new char [ ] { 0x0399 } ) );
+ characterMap.put( new Integer( 'K' ), new String( new char [ ] { 0x039a } ) );
+ characterMap.put( new Integer( 'L' ), new String( new char [ ] { 0x039b } ) );
+ characterMap.put( new Integer( 'M' ), new String( new char [ ] { 0x039c } ) );
+ characterMap.put( new Integer( 'N' ), new String( new char [ ] { 0x039d } ) );
+ characterMap.put( new Integer( 'X' ), new String( new char [ ] { 0x039e } ) );
+ characterMap.put( new Integer( 'O' ), new String( new char [ ] { 0x039f } ) );
+ characterMap.put( new Integer( 'P' ), new String( new char [ ] { 0x03a0 } ) );
+ characterMap.put( new Integer( 'R' ), new String( new char [ ] { 0x03a1 } ) );
+ characterMap.put( new Integer( 'S' ), new String( new char [ ] { 0x03a3 } ) );
+ characterMap.put( new Integer( 'T' ), new String( new char [ ] { 0x03a4 } ) );
+ characterMap.put( new Integer( 'U' ), new String( new char [ ] { 0x03a5 } ) );
+ characterMap.put( new Integer( 'F' ), new String( new char [ ] { 0x03a6 } ) );
+ characterMap.put( new Integer( 'C' ), new String( new char [ ] { 0x039e } ) );
+ characterMap.put( new Integer( 'Y' ), new String( new char [ ] { 0x03a8 } ) );
+ characterMap.put( new Integer( 'W' ), new String( new char [ ] { 0x03a9 } ) );
+
+ // Terminal sigma
+ characterMap.put( new Integer( 'j' ), new String( new char [ ] { 0x03c2 } ) );
+
+ // Iota subscript
+ characterMap.put( new Integer( 'J' ), new String( new char [ ] { 0x0345 } ) );
+
+ // smooth breathing
+ characterMap.put( new Integer( '\'' ), new String( new char [ ] { 0x0313 } ) );
+ characterMap.put( new Integer( 'v' ), new String( new char [ ] { 0x0313 } ) );
+
+ // smooth breathing
+ characterMap.put( new Integer( '`' ), new String( new char [ ] { 0x0314 } ) );
+ characterMap.put( new Integer( 'V' ), new String( new char [ ] { 0x0314 } ) );
+
+ // acute
+ characterMap.put( new Integer( '/' ), new String( new char [ ] { 0x0301 } ) );
+
+ // grave
+ characterMap.put( new Integer( '?' ), new String( new char [ ] { 0x0300 } ) );
+
+ // circumflex
+ characterMap.put( new Integer( '\\' ), new String( new char [ ] { 0x0311 } ) );
+ characterMap.put( new Integer( '^' ), new String( new char [ ] { 0x0311 } ) );
+
+ // trema (diaeresis)
+ characterMap.put( new Integer( '"' ), new String( new char [ ] { 0x0308 } ) );
+
+ // comma
+ characterMap.put( new Integer( ',' ), new String( new char [ ] { 0x002c } ) );
+
+ // full stop
+ characterMap.put( new Integer( '.' ), new String( new char [ ] { 0x0387 } ) );
+
+ // question mark
+ characterMap.put( new Integer( ';' ), new String( new char [ ] { 0x037e } ) );
+
+ // colon
+ characterMap.put( new Integer( ':' ), new String( new char [ ] { 0x003a } ) );
+
+ // sampi (upper case 0x3e0, lower case 0x3e1)
+ characterMap.put( new Integer( '!' ), new String( new char [ ] { 0x03e0 } ) );
+
+ // diagamma (upper case 0x3dc, lower case 0x3dd)
+ characterMap.put( new Integer( '#' ), new String( new char [ ] { 0x03dc } ) );
+
+ // stigma (upper case 0x3da, lower case 0x3db)
+ characterMap.put( new Integer( '$' ), new String( new char [ ] { 0x03da } ) );
+
+ // qoppa (lower case)
+ characterMap.put( new Integer( '%' ), new String( new char [ ] { 0x03df } ) );
+
+ // qoppa (upper case)
+ characterMap.put( new Integer( '&' ), new String( new char [ ] { 0x03de } ) );
+
+ }
+
+}
Added: trunk/app/src/org/crosswire/modedit/Gtk2ClassicalGreekIM.java
===================================================================
--- trunk/app/src/org/crosswire/modedit/Gtk2ClassicalGreekIM.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/modedit/Gtk2ClassicalGreekIM.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -0,0 +1,199 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// Gtk2ClassicalGreekIM.java
+//
+// Input Method to match the Emacs cgreek package.
+//
+// Copyright : 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
+package org.crosswire.modedit;
+
+import java.util.*;
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Mimics 'im-classicalgreek - A GTK2 Input Method for Classicla Greek'.
+// See http://im-classgreek.sourceforge.net
+//
+// N.B. Due to the way 'UniTextEdit' works, the breathing must be
+// entered AFTER the vowel!
+//
+// alpha - lower: a upper: A
+// beta - lower: b upper: B
+// gamma - lower: g upper: G
+// delta - lower: d upper: D
+// epsilon - lower: e upper: E
+// zeta - lower: z upper: Z
+// eta - lower: q upper: Q
+// theta - lower: th upper: TH,Th
+// iota - lower: i upper: I
+// kappa - lower: k upper: K
+// lambda - lower: l upper: L
+// mu - lower: m upper: M
+// nu - lower: n,v upper: N,V
+// xi - lower: x upper: X
+// omicron - lower: o upper: O
+// pi - lower: p upper: P
+// rho - lower: r upper: R
+// sigma - lower: s upper: S
+// terminal sigma - lower: c
+// tau - lower: t upper: T
+// upsilon - lower: u upper: U
+// phi - lower: f,ph upper: F,PH,Ph
+// chi - lower: ch upper: CH,Ch
+// psi - lower: ps upper: PS,Ps
+// omega - lower: w upper: W
+//
+// The breathing is entered after the vowel.
+//
+// j - smooth
+// h - rough
+//
+// Iota subscript is entered by typing 'y' after
+// the vowel.
+//
+// After entering the breathing (if any),
+// the letter and the iota subscript (if present),
+// accents may be added as follows.
+//
+// ' - acute
+// ` - grave
+// ~ - circumflex
+// _ - macron
+//
+///////////////////////////////////////////////////////////////////////////
+
+public class Gtk2ClassicalGreekIM extends SWInputMethod {
+
+ //
+ // Attributes
+ //
+
+ private Hashtable characterMap = new Hashtable();
+
+ //
+ // Methods
+ //
+
+ // ---------------
+ public Gtk2ClassicalGreekIM( String name ) {
+
+ super( name );
+ init( );
+
+ }
+
+ // ---------------
+ public String translate( char input ) {
+
+ String returnValue = ( String ) characterMap.get( new Integer( input ) );
+
+ if( returnValue == null ) {
+
+ returnValue = new String() + input;
+
+ }
+
+ return returnValue;
+
+ }
+
+ // ---------------
+ private void init( ) {
+
+ // single input alphabet
+ characterMap.put( new Integer( 'a' ), new String( new char [ ] { 0x03b1 } ) );
+ characterMap.put( new Integer( 'A' ), new String( new char [ ] { 0x0391 } ) );
+ characterMap.put( new Integer( 'b' ), new String( new char [ ] { 0x03b2 } ) );
+ characterMap.put( new Integer( 'B' ), new String( new char [ ] { 0x0392 } ) );
+ characterMap.put( new Integer( 'g' ), new String( new char [ ] { 0x03b3 } ) );
+ characterMap.put( new Integer( 'G' ), new String( new char [ ] { 0x0393 } ) );
+ characterMap.put( new Integer( 'd' ), new String( new char [ ] { 0x03b4 } ) );
+ characterMap.put( new Integer( 'D' ), new String( new char [ ] { 0x0394 } ) );
+ characterMap.put( new Integer( 'e' ), new String( new char [ ] { 0x03b5 } ) );
+ characterMap.put( new Integer( 'E' ), new String( new char [ ] { 0x0395 } ) );
+ characterMap.put( new Integer( 'z' ), new String( new char [ ] { 0x03b6 } ) );
+ characterMap.put( new Integer( 'Z' ), new String( new char [ ] { 0x0396 } ) );
+ characterMap.put( new Integer( 'q' ), new String( new char [ ] { 0x03b7 } ) );
+ characterMap.put( new Integer( 'Q' ), new String( new char [ ] { 0x0397 } ) );
+
+ characterMap.put( new Integer( 'i' ), new String( new char [ ] { 0x03b9 } ) );
+ characterMap.put( new Integer( 'I' ), new String( new char [ ] { 0x0399 } ) );
+ characterMap.put( new Integer( 'k' ), new String( new char [ ] { 0x03ba } ) );
+ characterMap.put( new Integer( 'K' ), new String( new char [ ] { 0x039a } ) );
+ characterMap.put( new Integer( 'l' ), new String( new char [ ] { 0x03bb } ) );
+ characterMap.put( new Integer( 'L' ), new String( new char [ ] { 0x039b } ) );
+ characterMap.put( new Integer( 'm' ), new String( new char [ ] { 0x03bc } ) );
+ characterMap.put( new Integer( 'M' ), new String( new char [ ] { 0x039c } ) );
+ characterMap.put( new Integer( 'n' ), new String( new char [ ] { 0x03bd } ) );
+ characterMap.put( new Integer( 'v' ), new String( new char [ ] { 0x03bd } ) );
+ characterMap.put( new Integer( 'N' ), new String( new char [ ] { 0x039d } ) );
+ characterMap.put( new Integer( 'V' ), new String( new char [ ] { 0x039d } ) );
+ characterMap.put( new Integer( 'x' ), new String( new char [ ] { 0x03be } ) );
+ characterMap.put( new Integer( 'X' ), new String( new char [ ] { 0x039e } ) );
+ characterMap.put( new Integer( 'o' ), new String( new char [ ] { 0x03bf } ) );
+ characterMap.put( new Integer( 'O' ), new String( new char [ ] { 0x039f } ) );
+ characterMap.put( new Integer( 'p' ), new String( new char [ ] { 0x03c0 } ) );
+ characterMap.put( new Integer( 'P' ), new String( new char [ ] { 0x03a0 } ) );
+ characterMap.put( new Integer( 'r' ), new String( new char [ ] { 0x03c1 } ) );
+ characterMap.put( new Integer( 'R' ), new String( new char [ ] { 0x03a1 } ) );
+ characterMap.put( new Integer( 's' ), new String( new char [ ] { 0x03c3 } ) );
+ characterMap.put( new Integer( 'S' ), new String( new char [ ] { 0x03a3 } ) );
+ characterMap.put( new Integer( 't' ), new String( new char [ ] { 0x03c4 } ) );
+ characterMap.put( new Integer( 'T' ), new String( new char [ ] { 0x03a4 } ) );
+ characterMap.put( new Integer( 'u' ), new String( new char [ ] { 0x03c5 } ) );
+ characterMap.put( new Integer( 'U' ), new String( new char [ ] { 0x03a5 } ) );
+ characterMap.put( new Integer( 'f' ), new String( new char [ ] { 0x03c6 } ) );
+ characterMap.put( new Integer( 'F' ), new String( new char [ ] { 0x03a6 } ) );
+ characterMap.put( new Integer( 'w' ), new String( new char [ ] { 0x03c9 } ) );
+ characterMap.put( new Integer( 'W' ), new String( new char [ ] { 0x03a9 } ) );
+
+ // Terminal sigma
+ characterMap.put( new Integer( 'c' ), new String( new char [ ] { 0x03c2 } ) );
+
+ // theta
+ // phi
+ // chi
+ // psi
+ characterMap.put( new Integer( 't' ), new String( new char [ ] { 0xffff } ) );
+ characterMap.put( new Integer( 'p' ), new String( new char [ ] { 0xffff } ) );
+ characterMap.put( new Integer( 'c' ), new String( new char [ ] { 0xffff } ) );
+
+ // iota subscript
+ characterMap.put( new Integer( 'y' ), new String( new char [ ] { 0x0345 } ) );
+
+ // smooth breathing
+ characterMap.put( new Integer( 'j' ), new String( new char [ ] { 0x0313 } ) );
+
+ // rough breathing
+ characterMap.put( new Integer( 'h' ), new String( new char [ ] { 0x0314 } ) );
+
+ // acute
+ characterMap.put( new Integer( '\'' ), new String( new char [ ] { 0x0301 } ) );
+
+ // grave
+ characterMap.put( new Integer( '`' ), new String( new char [ ] { 0x0300 } ) );
+
+ // circumflex
+ characterMap.put( new Integer( '~' ), new String( new char [ ] { 0x0311 } ) );
+
+ // trema (diaeresis)
+ characterMap.put( new Integer( '"' ), new String( new char [ ] { 0x0308 } ) );
+
+ // comma
+ characterMap.put( new Integer( ',' ), new String( new char [ ] { 0x002c } ) );
+
+ // full stop
+ characterMap.put( new Integer( '.' ), new String( new char [ ] { 0x0387 } ) );
+
+ // question mark
+ characterMap.put( new Integer( ';' ), new String( new char [ ] { 0x037e } ) );
+
+ // colon
+ characterMap.put( new Integer( ':' ), new String( new char [ ] { 0x003a } ) );
+
+ }
+
+}
Added: trunk/app/src/org/crosswire/modedit/Ibycus4IM.java
===================================================================
--- trunk/app/src/org/crosswire/modedit/Ibycus4IM.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/modedit/Ibycus4IM.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -0,0 +1,161 @@
+///////////////////////////////////////////////////////////////////////////
+//
+// Ibycus4IM.java
+//
+// Input Method to match the Emacs cgreek package's ibycus4 input method.
+//
+// Copyright : 2004 CrossWire Bible Society http://crosswire.org
+//
+///////////////////////////////////////////////////////////////////////////
+
+package org.crosswire.modedit;
+
+import java.util.*;
+
+public class Ibycus4IM extends SWInputMethod {
+
+ //
+ // Attributes
+ //
+
+ private Hashtable characterMap = new Hashtable();
+
+ //
+ // Methods
+ //
+
+ // ---------------
+ public Ibycus4IM( String name ) {
+
+ super( name );
+ init( );
+
+ }
+
+ // ---------------
+ public String translate( char input ) {
+
+ String returnValue = ( String ) characterMap.get( new Integer( input ) );
+
+ if( returnValue == null ) {
+
+ returnValue = new String() + input;
+
+ }
+
+ return returnValue;
+
+ }
+
+ // ---------------
+ private void init( ) {
+
+ // Lower case alphabet
+ characterMap.put( new Integer( 'a' ), new String( new char [ ] { 0x03b1 } ) );
+ characterMap.put( new Integer( 'b' ), new String( new char [ ] { 0x03b2 } ) );
+ characterMap.put( new Integer( 'g' ), new String( new char [ ] { 0x03b3 } ) );
+ characterMap.put( new Integer( 'd' ), new String( new char [ ] { 0x03b4 } ) );
+ characterMap.put( new Integer( 'e' ), new String( new char [ ] { 0x03b5 } ) );
+ characterMap.put( new Integer( 'z' ), new String( new char [ ] { 0x03b6 } ) );
+ characterMap.put( new Integer( 'h' ), new String( new char [ ] { 0x03b7 } ) );
+ characterMap.put( new Integer( 'q' ), new String( new char [ ] { 0x03b8 } ) );
+ characterMap.put( new Integer( 'i' ), new String( new char [ ] { 0x03b9 } ) );
+ characterMap.put( new Integer( 'k' ), new String( new char [ ] { 0x03ba } ) );
+ characterMap.put( new Integer( 'l' ), new String( new char [ ] { 0x03bb } ) );
+ characterMap.put( new Integer( 'm' ), new String( new char [ ] { 0x03bc } ) );
+ characterMap.put( new Integer( 'n' ), new String( new char [ ] { 0x03bd } ) );
+ characterMap.put( new Integer( 'x' ), new String( new char [ ] { 0x03be } ) );
+ characterMap.put( new Integer( 'o' ), new String( new char [ ] { 0x03bf } ) );
+ characterMap.put( new Integer( 'p' ), new String( new char [ ] { 0x03c0 } ) );
+ characterMap.put( new Integer( 'r' ), new String( new char [ ] { 0x03c1 } ) );
+ characterMap.put( new Integer( 's' ), new String( new char [ ] { 0x03c3 } ) );
+ characterMap.put( new Integer( 't' ), new String( new char [ ] { 0x03c4 } ) );
+ characterMap.put( new Integer( 'u' ), new String( new char [ ] { 0x03c5 } ) );
+ characterMap.put( new Integer( 'f' ), new String( new char [ ] { 0x03c6 } ) );
+ characterMap.put( new Integer( 'c' ), new String( new char [ ] { 0x03be } ) );
+ characterMap.put( new Integer( 'y' ), new String( new char [ ] { 0x03c8 } ) );
+ characterMap.put( new Integer( 'w' ), new String( new char [ ] { 0x03c9 } ) );
+
+ // Upper case alphabet
+ characterMap.put( new Integer( 'A' ), new String( new char [ ] { 0x0391 } ) );
+ characterMap.put( new Integer( 'B' ), new String( new char [ ] { 0x0392 } ) );
+ characterMap.put( new Integer( 'C' ), new String( new char [ ] { 0x0393 } ) );
+ characterMap.put( new Integer( 'D' ), new String( new char [ ] { 0x0394 } ) );
+ characterMap.put( new Integer( 'E' ), new String( new char [ ] { 0x0395 } ) );
+ characterMap.put( new Integer( 'Z' ), new String( new char [ ] { 0x0396 } ) );
+ characterMap.put( new Integer( 'H' ), new String( new char [ ] { 0x0397 } ) );
+ characterMap.put( new Integer( 'Q' ), new String( new char [ ] { 0x0398 } ) );
+ characterMap.put( new Integer( 'I' ), new String( new char [ ] { 0x0399 } ) );
+ characterMap.put( new Integer( 'K' ), new String( new char [ ] { 0x039a } ) );
+ characterMap.put( new Integer( 'L' ), new String( new char [ ] { 0x039b } ) );
+ characterMap.put( new Integer( 'M' ), new String( new char [ ] { 0x039c } ) );
+ characterMap.put( new Integer( 'N' ), new String( new char [ ] { 0x039d } ) );
+ characterMap.put( new Integer( 'X' ), new String( new char [ ] { 0x039e } ) );
+ characterMap.put( new Integer( 'O' ), new String( new char [ ] { 0x039f } ) );
+ characterMap.put( new Integer( 'P' ), new String( new char [ ] { 0x03a0 } ) );
+ characterMap.put( new Integer( 'R' ), new String( new char [ ] { 0x03a1 } ) );
+ characterMap.put( new Integer( 'S' ), new String( new char [ ] { 0x03a3 } ) );
+ characterMap.put( new Integer( 'T' ), new String( new char [ ] { 0x03a4 } ) );
+ characterMap.put( new Integer( 'U' ), new String( new char [ ] { 0x03a5 } ) );
+ characterMap.put( new Integer( 'F' ), new String( new char [ ] { 0x03a6 } ) );
+ characterMap.put( new Integer( 'C' ), new String( new char [ ] { 0x039e } ) );
+ characterMap.put( new Integer( 'Y' ), new String( new char [ ] { 0x03a8 } ) );
+ characterMap.put( new Integer( 'W' ), new String( new char [ ] { 0x03a9 } ) );
+
+ // Terminal sigma
+ characterMap.put( new Integer( 'j' ), new String( new char [ ] { 0x03c2 } ) );
+
+ // Iota subscript
+ characterMap.put( new Integer( 'J' ), new String( new char [ ] { 0x0345 } ) );
+
+ // smooth breathing
+ characterMap.put( new Integer( '\'' ), new String( new char [ ] { 0x0313 } ) );
+ characterMap.put( new Integer( 'v' ), new String( new char [ ] { 0x0313 } ) );
+
+ // smooth breathing
+ characterMap.put( new Integer( '`' ), new String( new char [ ] { 0x0314 } ) );
+ characterMap.put( new Integer( 'V' ), new String( new char [ ] { 0x0314 } ) );
+
+ // acute
+ characterMap.put( new Integer( '/' ), new String( new char [ ] { 0x0301 } ) );
+
+ // grave
+ characterMap.put( new Integer( '?' ), new String( new char [ ] { 0x0300 } ) );
+
+ // circumflex
+ characterMap.put( new Integer( '\\' ), new String( new char [ ] { 0x0311 } ) );
+ characterMap.put( new Integer( '^' ), new String( new char [ ] { 0x0311 } ) );
+
+ // trema (diaeresis)
+ characterMap.put( new Integer( '"' ), new String( new char [ ] { 0x0308 } ) );
+
+ // comma
+ characterMap.put( new Integer( ',' ), new String( new char [ ] { 0x002c } ) );
+
+ // full stop
+ characterMap.put( new Integer( '.' ), new String( new char [ ] { 0x0387 } ) );
+
+ // question mark
+ characterMap.put( new Integer( ';' ), new String( new char [ ] { 0x037e } ) );
+
+ // colon
+ characterMap.put( new Integer( ':' ), new String( new char [ ] { 0x003a } ) );
+
+ // sampi (upper case 0x3e0, lower case 0x3e1)
+ characterMap.put( new Integer( '!' ), new String( new char [ ] { 0x03e0 } ) );
+
+ // diagamma (upper case 0x3dc, lower case 0x3dd)
+ characterMap.put( new Integer( '#' ), new String( new char [ ] { 0x03dc } ) );
+
+ // stigma (upper case 0x3da, lower case 0x3db)
+ characterMap.put( new Integer( '$' ), new String( new char [ ] { 0x03da } ) );
+
+ // qoppa (lower case)
+ characterMap.put( new Integer( '%' ), new String( new char [ ] { 0x03df } ) );
+
+ // qoppa (upper case)
+ characterMap.put( new Integer( '&' ), new String( new char [ ] { 0x03de } ) );
+
+ }
+
+}
Modified: trunk/app/src/org/crosswire/modedit/UniTextEdit.java
===================================================================
--- trunk/app/src/org/crosswire/modedit/UniTextEdit.java 2004-09-07 22:54:39 UTC (rev 10)
+++ trunk/app/src/org/crosswire/modedit/UniTextEdit.java 2004-09-08 18:26:35 UTC (rev 11)
@@ -204,6 +204,9 @@
jMenu2.add(jMenuItem5);
fontSizer.setValue(jTextArea1.getFont().getSize());
imComboBox.addItem(new GreekKeymanIM("Greek Keyman"));
+ imComboBox.addItem(new CGreekIM("CGreek"));
+ imComboBox.addItem(new Ibycus4IM("Ibycus4"));
+ imComboBox.addItem(new Gtk2ClassicalGreekIM("Gtk2 Classical Greek"));
imComboBox.addItem(new HebrewDurusauIM("Hebrew Durusau"));
imComboBox.addItem(new HebrewMCIM("Hebrew Michigan-Claremont"));
imComboBox.addItem(new NullIM("Latin"));
More information about the sword-cvs
mailing list