Added copyright boilerplate.
Now using reflection API to invoke Java 1.4-specific functionality. Thus, Savant now builds on my Java 1.3.1_04 box.
This commit is contained in:
parent
955c46a7eb
commit
eec991f735
25 changed files with 703 additions and 27 deletions
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.quilldriver;
|
package org.thdl.quilldriver;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.quilldriver;
|
package org.thdl.quilldriver;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -402,4 +420,4 @@ that should solve your pause play problems!
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.quilldriver;
|
package org.thdl.quilldriver;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
@ -156,4 +174,4 @@ class RadioListener implements ActionListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,25 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
public interface AnnotationPlayer extends java.util.EventListener
|
public interface AnnotationPlayer extends java.util.EventListener
|
||||||
{
|
{
|
||||||
public void startAnnotation(String id);
|
public void startAnnotation(String id);
|
||||||
public void stopAnnotation(String id);
|
public void stopAnnotation(String id);
|
||||||
}
|
}
|
||||||
|
|
231
source/org/thdl/savant/JdkVersionHacks.java
Normal file
231
source/org/thdl/savant/JdkVersionHacks.java
Normal file
|
@ -0,0 +1,231 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.thdl.savant;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
import java.awt.Frame;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
|
||||||
|
import org.thdl.util.ThdlLazyException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author David Chandler
|
||||||
|
*
|
||||||
|
* This class provides functionality that is not present in Java's JDK
|
||||||
|
* 1.2. Because we want to compile and run on a Java 2/1.2 system, we
|
||||||
|
* must use the Java Reflection API to provide functionality specific
|
||||||
|
* to Java 2/1.3 or later. At present, I haven't tested on a 1.2 box,
|
||||||
|
* but I have tested on a 1.3.1_04 box.
|
||||||
|
*
|
||||||
|
* If your code will break if some functionality here is not present,
|
||||||
|
* test the return value of the function and throw an exception.
|
||||||
|
* Avoid such code like the plague.
|
||||||
|
*
|
||||||
|
* This code is all written for one-shot operations thus-far. If you
|
||||||
|
* plan on executing a piece of code many times, you need to set up
|
||||||
|
* the reflection mechanism first, and then re-use it again and again.
|
||||||
|
* This is a two-step process. Three steps if you explicitly
|
||||||
|
* deconstruct the mechanism.
|
||||||
|
*
|
||||||
|
* This class is not instantiable. */
|
||||||
|
final class JdkVersionHacks {
|
||||||
|
/** Don't instantiate this class. */
|
||||||
|
private JdkVersionHacks() { }
|
||||||
|
|
||||||
|
/** Calls f.setUndecorated(true) if possible. Returns true if
|
||||||
|
successful. */
|
||||||
|
public static boolean undecorateJFrame(JFrame f) {
|
||||||
|
/* If we're using JDK 1.4, execute
|
||||||
|
f.setUndecorated(true). Otherwise, don't. */
|
||||||
|
|
||||||
|
boolean success = false;
|
||||||
|
|
||||||
|
Method setUndecoratedMethod = null;
|
||||||
|
try {
|
||||||
|
setUndecoratedMethod
|
||||||
|
= JFrame.class.getMethod("setUndecorated",
|
||||||
|
new Class[] {
|
||||||
|
Boolean.TYPE
|
||||||
|
});
|
||||||
|
} catch (NoSuchMethodException ex) {
|
||||||
|
/* We're not using JDK 1.4 or later. */
|
||||||
|
} catch (SecurityException ex) {
|
||||||
|
/* We'll never know if we're using JDK 1.4 or later. */
|
||||||
|
handleSecurityException(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (setUndecoratedMethod != null) {
|
||||||
|
try {
|
||||||
|
setUndecoratedMethod.invoke(f, new Object[] { Boolean.TRUE });
|
||||||
|
success = true;
|
||||||
|
|
||||||
|
/* We shouldn't get any of these exceptions: */
|
||||||
|
} catch (IllegalAccessException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (InvocationTargetException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Calls f.setExtendedState(Frame.MAXIMIZED_BOTH) if possible.
|
||||||
|
Returns true if successful. */
|
||||||
|
public static boolean maximizeJFrameInBothDirections(JFrame f) {
|
||||||
|
/* If we're using JDK 1.4, execute
|
||||||
|
f.setExtendedState(Frame.MAXIMIZED_BOTH). Otherwise,
|
||||||
|
don't. */
|
||||||
|
|
||||||
|
boolean success = false;
|
||||||
|
|
||||||
|
Method setExtendedStateMethod = null;
|
||||||
|
try {
|
||||||
|
setExtendedStateMethod
|
||||||
|
= JFrame.class.getMethod("setExtendedState",
|
||||||
|
new Class[] {
|
||||||
|
Integer.TYPE
|
||||||
|
});
|
||||||
|
} catch (NoSuchMethodException ex) {
|
||||||
|
/* We're not using JDK 1.4 or later. */
|
||||||
|
return false;
|
||||||
|
} catch (SecurityException ex) {
|
||||||
|
/* We'll never know if we're using JDK 1.4 or later. */
|
||||||
|
handleSecurityException(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
setExtendedStateMethod.invoke(f,
|
||||||
|
new Object[] {
|
||||||
|
maximizedBothOption()
|
||||||
|
});
|
||||||
|
success = true;
|
||||||
|
|
||||||
|
} catch (NoSuchFieldException ex) {
|
||||||
|
/* We're not using JDK 1.4 or later. */
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* We shouldn't get any of these exceptions: */
|
||||||
|
} catch (IllegalAccessException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (InvocationTargetException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns true iff maximizeJFrameInBothDirections(f) will
|
||||||
|
actually have an effect. */
|
||||||
|
public static boolean maximizedBothSupported(Toolkit tk) {
|
||||||
|
// Execute
|
||||||
|
// f.getToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)
|
||||||
|
// if possible.
|
||||||
|
|
||||||
|
boolean success = false;
|
||||||
|
|
||||||
|
Method isFSSMethod = null;
|
||||||
|
try {
|
||||||
|
isFSSMethod
|
||||||
|
= JFrame.class.getMethod("isFrameStateSupported",
|
||||||
|
new Class[] {
|
||||||
|
Integer.TYPE
|
||||||
|
});
|
||||||
|
} catch (NoSuchMethodException ex) {
|
||||||
|
/* We're not using JDK 1.4 or later. */
|
||||||
|
return false;
|
||||||
|
} catch (SecurityException ex) {
|
||||||
|
/* We'll never know if we're using JDK 1.4 or later. */
|
||||||
|
handleSecurityException(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return ((Boolean)isFSSMethod.invoke(tk,
|
||||||
|
new Object[] {
|
||||||
|
maximizedBothOption()
|
||||||
|
})).booleanValue();
|
||||||
|
|
||||||
|
} catch (NoSuchFieldException ex) {
|
||||||
|
/* We're not using JDK 1.4 or later. */
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* We shouldn't get any of these exceptions: */
|
||||||
|
} catch (IllegalAccessException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (InvocationTargetException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Coming soon: Does what the user desires (via the options he or
|
||||||
|
she has set) with this SecurityException, one encountered
|
||||||
|
during the process of reflection.
|
||||||
|
|
||||||
|
Currently: does nothing.
|
||||||
|
|
||||||
|
FIXME */
|
||||||
|
private static void handleSecurityException(SecurityException ex)
|
||||||
|
throws SecurityException
|
||||||
|
{
|
||||||
|
if (false /* FIXME: I want this exception when debugging: THDLUtils.getBooleanOption("EagerlyThrowExceptions") */)
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns the value of Frame.MAXIMIZED_BOTH, wrapped in an
|
||||||
|
Integer.
|
||||||
|
|
||||||
|
@throws NoSuchFieldException the field does not exist or
|
||||||
|
cannot be accessed because security settings are too limiting */
|
||||||
|
private static Object maximizedBothOption()
|
||||||
|
throws NoSuchFieldException
|
||||||
|
{
|
||||||
|
Field maxBothOptionField = null;
|
||||||
|
try {
|
||||||
|
maxBothOptionField = Frame.class.getField("MAXIMIZED_BOTH");
|
||||||
|
|
||||||
|
/* Don't catch NoSuchFieldException */
|
||||||
|
} catch (SecurityException ex) {
|
||||||
|
/* We'll never know if we're using JDK 1.4 or later. */
|
||||||
|
handleSecurityException(ex);
|
||||||
|
throw new NoSuchFieldException("java.awt.Frame.MAXIMIZED_BOTH");
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return maxBothOptionField.get(null);
|
||||||
|
} catch (IllegalAccessException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (NullPointerException ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
} catch (ExceptionInInitializerError ex) {
|
||||||
|
throw new ThdlLazyException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
@ -231,7 +249,10 @@ public class Savant extends JDesktopPane
|
||||||
if (fullScreen == null)
|
if (fullScreen == null)
|
||||||
{
|
{
|
||||||
fullScreen = new JFrame();
|
fullScreen = new JFrame();
|
||||||
fullScreen.setUndecorated(true);
|
|
||||||
|
/* We don't do anything special if this fails: */
|
||||||
|
JdkVersionHacks.undecorateJFrame(fullScreen);
|
||||||
|
|
||||||
fullScreen.getContentPane().setBackground(Color.black);
|
fullScreen.getContentPane().setBackground(Color.black);
|
||||||
Dimension screenSize = fullScreen.getToolkit().getScreenSize();
|
Dimension screenSize = fullScreen.getToolkit().getScreenSize();
|
||||||
Dimension videoSize = sp.getVisualComponent().getPreferredSize();
|
Dimension videoSize = sp.getVisualComponent().getPreferredSize();
|
||||||
|
@ -266,7 +287,14 @@ public class Savant extends JDesktopPane
|
||||||
} else {
|
} else {
|
||||||
visual = sp.popVisualComponent();
|
visual = sp.popVisualComponent();
|
||||||
fullScreen.show();
|
fullScreen.show();
|
||||||
fullScreen.setExtendedState(Frame.MAXIMIZED_BOTH);
|
|
||||||
|
/* FIXME: In SavantShell, we test
|
||||||
|
to see if MAXIMIZE_BOTH is
|
||||||
|
supported, but we don't
|
||||||
|
here. */
|
||||||
|
/* Ignore failure: */
|
||||||
|
JdkVersionHacks.maximizeJFrameInBothDirections(fullScreen);
|
||||||
|
|
||||||
fullScreen.getContentPane().add(visual);
|
fullScreen.getContentPane().add(visual);
|
||||||
visual.setLocation(0, (fullScreen.getSize().height - fullScreenSize.height)/2);
|
visual.setLocation(0, (fullScreen.getSize().height - fullScreenSize.height)/2);
|
||||||
visual.setSize(fullScreenSize);
|
visual.setSize(fullScreenSize);
|
||||||
|
@ -310,4 +338,4 @@ public class Savant extends JDesktopPane
|
||||||
textPanel.validate();
|
textPanel.validate();
|
||||||
textPanel.repaint();
|
textPanel.repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
@ -229,12 +247,15 @@ public class SavantShell extends JFrame
|
||||||
});
|
});
|
||||||
|
|
||||||
// Code for Merlin
|
// Code for Merlin
|
||||||
if (getToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH))
|
if (JdkVersionHacks.maximizedBothSupported(getToolkit())) {
|
||||||
{
|
|
||||||
setLocation(0,0);
|
setLocation(0,0);
|
||||||
setSize(getToolkit().getScreenSize().width,getToolkit().getScreenSize().height);
|
setSize(getToolkit().getScreenSize().width,getToolkit().getScreenSize().height);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
setExtendedState(Frame.MAXIMIZED_BOTH);
|
|
||||||
|
// call setExtendedState(Frame.MAXIMIZED_BOTH) if possible:
|
||||||
|
if (!JdkVersionHacks.maximizeJFrameInBothDirections(this)) {
|
||||||
|
throw new Error("badness at maximum: the frame state is supported, but setting that state failed. JdkVersionHacks has a bug.");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Dimension gs = getToolkit().getScreenSize();
|
Dimension gs = getToolkit().getScreenSize();
|
||||||
setLocation(0,0);
|
setLocation(0,0);
|
||||||
|
@ -327,4 +348,4 @@ public class SavantShell extends JFrame
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
|
@ -455,4 +473,4 @@ System.out.println("soundpanel - "+sound.toString());
|
||||||
parent.repaint();
|
parent.repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -101,4 +119,4 @@ public class TextHighlightPlayer extends JPanel implements AnnotationPlayer
|
||||||
highlights.remove(id);
|
highlights.remove(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -90,4 +108,4 @@ public class TextPlayer extends JPanel implements AnnotationPlayer
|
||||||
highlights.remove(id);
|
highlights.remove(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
public interface TranscriptView
|
public interface TranscriptView
|
||||||
|
@ -10,4 +28,4 @@ public interface TranscriptView
|
||||||
public String getStartOffsets();
|
public String getStartOffsets();
|
||||||
public String getEndOffsets();
|
public String getEndOffsets();
|
||||||
public org.jdom.Document getDocument();
|
public org.jdom.Document getDocument();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant;
|
package org.thdl.savant;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -103,4 +121,4 @@ public class TwoWayTextPlayer extends TextHighlightPlayer
|
||||||
{
|
{
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -193,4 +211,4 @@ public class English implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -202,4 +220,4 @@ public class Tibetan implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -210,4 +228,4 @@ public class TibetanEnglish implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -213,4 +231,4 @@ public class TibetanWylie implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -215,4 +233,4 @@ public class TibetanWylieEnglish implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -193,4 +211,4 @@ public class Wylie implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.tib;
|
package org.thdl.savant.tib;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -206,4 +224,4 @@ public class WylieEnglish implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.ucuchi;
|
package org.thdl.savant.ucuchi;
|
||||||
|
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
@ -222,4 +240,4 @@ public class All implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.ucuchi;
|
package org.thdl.savant.ucuchi;
|
||||||
|
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
@ -193,4 +211,4 @@ public class English implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.ucuchi;
|
package org.thdl.savant.ucuchi;
|
||||||
|
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
@ -192,4 +210,4 @@ public class Quechua implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.ucuchi;
|
package org.thdl.savant.ucuchi;
|
||||||
|
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
@ -214,4 +232,4 @@ public class QuechuaEnglish implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
The contents of this file are subject to the THDL Open Community License
|
||||||
|
Version 1.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License on the THDL web site
|
||||||
|
(http://www.thdl.org/).
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific terms governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Initial Developer of this software is the Tibetan and Himalayan Digital
|
||||||
|
Library (THDL). Portions created by the THDL are Copyright 2001 THDL.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): ______________________________________.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.thdl.savant.ucuchi;
|
package org.thdl.savant.ucuchi;
|
||||||
|
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
@ -214,4 +232,4 @@ public class SegmentedQuechua implements TranscriptView
|
||||||
{
|
{
|
||||||
return endBuffer.toString();
|
return endBuffer.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue