You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2006/10/31 15:25:57 UTC
svn commit: r469497 [2/2] - in
/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt:
./ datatransfer/ gl/ gl/color/ gl/font/ gl/image/ gl/opengl/ gl/render/ im/
internal/nls/ nativebridge/ text/ theme/ wtk/
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextMetricsCalculator.java Tue Oct 31 06:25:53 2006
@@ -28,6 +28,8 @@
import java.util.HashMap;
import java.util.ArrayList;
+import org.apache.harmony.awt.internal.nls.Messages;
+
/**
* This class operates with an arbitrary text string which can include
* any number of style, font and direction runs. It is responsible for computation
@@ -67,7 +69,8 @@
} else if (baselineIndex == GraphicAttribute.TOP_ALIGNMENT) {
return -ascent;
} else {
- throw new IllegalArgumentException("Invalid baseline index");
+ // awt.3F=Invalid baseline index
+ throw new IllegalArgumentException(Messages.getString("awt.3F")); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunBreaker.java Tue Oct 31 06:25:53 2006
@@ -34,6 +34,7 @@
import java.util.*;
import org.apache.harmony.awt.gl.font.TextDecorator.Decoration;
+import org.apache.harmony.awt.internal.nls.Messages;
import org.apache.harmony.misc.HashCode;
// TODO - bidi not implemented yet
@@ -569,7 +570,8 @@
res.runSegments = newSegments;
return res;
} catch (CloneNotSupportedException e) {
- throw new UnsupportedOperationException("Clone not supported");
+ // awt.3E=Clone not supported
+ throw new UnsupportedOperationException(Messages.getString("awt.3E")); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunSegmentImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunSegmentImpl.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunSegmentImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/TextRunSegmentImpl.java Tue Oct 31 06:25:53 2006
@@ -32,6 +32,8 @@
//import java.text.Bidi;
import java.util.Arrays;
+import org.apache.harmony.awt.internal.nls.Messages;
+
/**
* Date: Apr 25, 2005
* Time: 4:33:18 PM
@@ -102,10 +104,9 @@
this.metrics = new BasicMetrics(lm, i.font);
if (lm.getNumChars() != i.length) { // XXX todo - This should be handled
+ // awt.41=Font returned unsupported type of line metrics. This case is known, but not supported yet.
throw new UnsupportedOperationException(
- "Font returned unsupported type of line metrics. " +
- "This case is known, but not supported yet."
- );
+ Messages.getString("awt.41")); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java Tue Oct 31 06:25:53 2006
@@ -38,7 +38,7 @@
private static native void initIDs();
static {
- System.loadLibrary("gl");
+ System.loadLibrary("gl"); //$NON-NLS-1$
initIDs();
}
@@ -298,12 +298,12 @@
}
void setComment(String newComment) {
- Object currComment = properties.get("comment");
+ Object currComment = properties.get("comment"); //$NON-NLS-1$
if (currComment == null) {
- properties.put("comment", newComment);
+ properties.put("comment", newComment); //$NON-NLS-1$
} else {
- properties.put("comment", (String) currComment + "\n" + newComment);
+ properties.put("comment", (String) currComment + "\n" + newComment); //$NON-NLS-1$ //$NON-NLS-2$
}
setProperties(properties);
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java Tue Oct 31 06:25:53 2006
@@ -27,6 +27,8 @@
import java.io.InputStream;
import java.util.Hashtable;
+import org.apache.harmony.awt.internal.nls.Messages;
+
public class JpegDecoder extends ImageDecoder {
// Only 2 output colorspaces expected. Others are converted into
// these ones.
@@ -78,7 +80,7 @@
private ColorModel cm = null;
static {
- System.loadLibrary("jpegdecoder");
+ System.loadLibrary("jpegdecoder"); //$NON-NLS-1$
cmGray = new ComponentColorModel(
ColorSpace.getInstance(ColorSpace.CS_GRAY),
@@ -192,7 +194,9 @@
switch (jpegColorSpace) {
case JCS_GRAYSCALE: cm = cmGray; break;
case JCS_RGB: cm = cmRGB; break;
- default: throw new IllegalArgumentException("Unknown colorspace");
+ default:
+ // awt.3D=Unknown colorspace
+ throw new IllegalArgumentException(Messages.getString("awt.3D")); //$NON-NLS-1$
}
setColorModel(cm);
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/OffscreenImage.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/OffscreenImage.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/OffscreenImage.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/OffscreenImage.java Tue Oct 31 06:25:53 2006
@@ -41,6 +41,7 @@
import java.util.Vector;
import org.apache.harmony.awt.gl.ImageSurface;
+import org.apache.harmony.awt.internal.nls.Messages;
/**
@@ -75,7 +76,8 @@
@Override
public Object getProperty(String name, ImageObserver observer) {
if(name == null) {
- throw new NullPointerException("Property name is not defined");
+ // awt.38=Property name is not defined
+ throw new NullPointerException(Messages.getString("awt.38")); //$NON-NLS-1$
}
if(properties == null){
addObserver(observer);
@@ -122,8 +124,8 @@
@Override
public Graphics getGraphics() {
- throw new UnsupportedOperationException("This method is not " +
- "implemented for image obtained from ImageProducer");
+ // awt.39=This method is not implemented for image obtained from ImageProducer
+ throw new UnsupportedOperationException(Messages.getString("awt.39")); //$NON-NLS-1$
}
@Override
@@ -164,7 +166,8 @@
if(raster == null){
if(cm == null){
if(model == null) {
- throw new NullPointerException("Color Model is null");
+ // awt.3A=Color Model is null
+ throw new NullPointerException(Messages.getString("awt.3A")); //$NON-NLS-1$
}
cm = model;
}
@@ -224,7 +227,8 @@
if(raster == null){
if(cm == null){
if(model == null) {
- throw new NullPointerException("Color Model is null");
+ // awt.3A=Color Model is null
+ throw new NullPointerException(Messages.getString("awt.3A")); //$NON-NLS-1$
}
cm = model;
}
@@ -320,8 +324,8 @@
flag = ImageObserver.ALLBITS;
break;
default:
- throw new IllegalArgumentException("Incorrect ImageConsumer "
- + "completion status");
+ // awt.3B=Incorrect ImageConsumer completion status
+ throw new IllegalArgumentException(Messages.getString("awt.3B")); //$NON-NLS-1$
}
imageUpdate(this, flag, 0, 0, width, height);
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java Tue Oct 31 06:25:53 2006
@@ -30,12 +30,14 @@
import java.awt.image.*;
import java.awt.*;
+import org.apache.harmony.awt.internal.nls.Messages;
+
public class PngDecoder extends ImageDecoder {
// initializes proper field IDs
private static native void initIDs();
static {
- System.loadLibrary("gl");
+ System.loadLibrary("gl"); //$NON-NLS-1$
initIDs();
}
@@ -138,7 +140,8 @@
switch (colorType) {
case PNG_COLOR_TYPE_GRAY: {
if (bitDepth != 8 && bitDepth != 4 && bitDepth != 2 && bitDepth != 1) {
- throw new IllegalArgumentException("Unknown PNG color type");
+ // awt.3C=Unknown PNG color type
+ throw new IllegalArgumentException(Messages.getString("awt.3C")); //$NON-NLS-1$
}
// Create gray color model
@@ -156,7 +159,8 @@
case PNG_COLOR_TYPE_RGB: {
if (bitDepth != 8) {
- throw new IllegalArgumentException("Unknown PNG color type");
+ // awt.3C=Unknown PNG color type
+ throw new IllegalArgumentException(Messages.getString("awt.3C")); //$NON-NLS-1$
}
cm = new DirectColorModel(24, 0xFF0000, 0xFF00, 0xFF);
@@ -167,7 +171,8 @@
case PNG_COLOR_TYPE_PLTE: {
if (bitDepth != 8 && bitDepth != 4 && bitDepth != 2 && bitDepth != 1) {
- throw new IllegalArgumentException("Unknown PNG color type");
+ // awt.3C=Unknown PNG color type
+ throw new IllegalArgumentException(Messages.getString("awt.3C")); //$NON-NLS-1$
}
cm = new IndexColorModel(/*bitDepth*/8, cmap.length / 3, cmap, 0, false);
@@ -178,7 +183,8 @@
case PNG_COLOR_TYPE_GRAY_ALPHA: {
if (bitDepth != 8) {
- throw new IllegalArgumentException("Unknown PNG color type");
+ // awt.3C=Unknown PNG color type
+ throw new IllegalArgumentException(Messages.getString("awt.3C")); //$NON-NLS-1$
}
cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_GRAY),
@@ -193,7 +199,8 @@
case PNG_COLOR_TYPE_RGBA: {
if (bitDepth != 8) {
- throw new IllegalArgumentException("Unknown PNG color type");
+ // awt.3C=Unknown PNG color type
+ throw new IllegalArgumentException(Messages.getString("awt.3C")); //$NON-NLS-1$
}
cm = ColorModel.getRGBdefault();
@@ -202,7 +209,8 @@
break;
}
default:
- throw new IllegalArgumentException("Unknown PNG color type");
+ // awt.3C=Unknown PNG color type
+ throw new IllegalArgumentException(Messages.getString("awt.3C")); //$NON-NLS-1$
}
// Create output buffer
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java Tue Oct 31 06:25:53 2006
@@ -38,7 +38,7 @@
}
private GL() {
- System.loadLibrary("oglwrapper");
+ System.loadLibrary("oglwrapper"); //$NON-NLS-1$
init();
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaBlitter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaBlitter.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaBlitter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaBlitter.java Tue Oct 31 06:25:53 2006
@@ -37,6 +37,7 @@
import org.apache.harmony.awt.gl.MultiRectArea;
import org.apache.harmony.awt.gl.Surface;
import org.apache.harmony.awt.gl.XORComposite;
+import org.apache.harmony.awt.internal.nls.Messages;
/**
* Java implenetation of the Blitter interface. Using when we can't
@@ -458,8 +459,9 @@
break;
default:
- throw new IllegalArgumentException("Unknown composite type " +
- comp.getClass());
+ // awt.37=Unknown composite type {0}
+ throw new IllegalArgumentException(Messages.getString("awt.37", //$NON-NLS-1$
+ comp.getClass()));
}
}
sx += hx;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaShapeRasterizer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaShapeRasterizer.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaShapeRasterizer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/render/JavaShapeRasterizer.java Tue Oct 31 06:25:53 2006
@@ -24,6 +24,7 @@
import java.awt.geom.PathIterator;
import org.apache.harmony.awt.gl.MultiRectArea;
+import org.apache.harmony.awt.internal.nls.Messages;
public class JavaShapeRasterizer {
@@ -224,7 +225,8 @@
closed = true;
break;
default:
- throw new RuntimeException("Wrong segment");
+ // awt.36=Wrong segment
+ throw new RuntimeException(Messages.getString("awt.36")); //$NON-NLS-1$
}
path.next();
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMJFrame.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMJFrame.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMJFrame.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMJFrame.java Tue Oct 31 06:25:53 2006
@@ -33,7 +33,7 @@
}
IMJFrame() {
- this("Input Window", null);
+ this("Input Window", null); //$NON-NLS-1$
}
@Override
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java Tue Oct 31 06:25:53 2006
@@ -55,10 +55,10 @@
* window, etc
*/
public class IMManager {
- private static final String SEL_KEY_NODE = "java/awt/im/selectionKey";
- private static final String INPUT_STYLE_PROP = "java.awt.im.style";
- private static final String BELOW_THE_SPOT = "below-the-spot";
- private static final String SERVICES = "META-INF/services/";
+ private static final String SEL_KEY_NODE = "java/awt/im/selectionKey"; //$NON-NLS-1$
+ private static final String INPUT_STYLE_PROP = "java.awt.im.style"; //$NON-NLS-1$
+ private static final String BELOW_THE_SPOT = "below-the-spot"; //$NON-NLS-1$
+ private static final String SERVICES = "META-INF/services/"; //$NON-NLS-1$
/**
* Input method selection popup menu
@@ -87,8 +87,8 @@
@Override
public String paramString() {
- return super.paramString() + ",desc=" +
- getDesc() + ",locale=" + locale;
+ return super.paramString() + ",desc=" + //$NON-NLS-1$
+ getDesc() + ",locale=" + locale; //$NON-NLS-1$
}
}
@@ -107,7 +107,7 @@
@Override
public String paramString() {
- return super.paramString() + ",desc=" + desc;
+ return super.paramString() + ",desc=" + desc; //$NON-NLS-1$
}
private void addLocales() {
@@ -161,7 +161,7 @@
if (it.hasNext()) {
addIM(it);
}
- add(new MenuItem("-")); //separator
+ add(new MenuItem("-")); //separator //$NON-NLS-1$
}
public void itemStateChanged(ItemEvent e) {
@@ -234,13 +234,13 @@
while (en.hasMoreElements()) {
URL url = en.nextElement();
InputStreamReader isr = new InputStreamReader(url.openStream(),
- "UTF-8");
+ "UTF-8"); //$NON-NLS-1$
BufferedReader br = new BufferedReader(isr);
String str = br.readLine();
while (str != null) {
str = str.trim();
- int comPos = str.indexOf("#");
+ int comPos = str.indexOf("#"); //$NON-NLS-1$
if (comPos >= 0) {
str = str.substring(0, comPos);
}
@@ -289,9 +289,9 @@
static void selectIM(KeyEvent ke, InputMethodContext imc, Window parent) {
int def = KeyEvent.VK_UNDEFINED;
- int keyCode = getPref("keyCode", def);
+ int keyCode = getPref("keyCode", def); //$NON-NLS-1$
if (keyCode != def) {
- int modifiers = getPref("modifiers", 0);
+ int modifiers = getPref("modifiers", 0); //$NON-NLS-1$
if ((ke.getKeyCode() == keyCode)
&& (ke.getModifiers() == modifiers)) {
IMManager.showIMPopup(imc, parent);
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMWindow.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMWindow.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMWindow.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMWindow.java Tue Oct 31 06:25:53 2006
@@ -32,7 +32,7 @@
}
IMWindow() {
- this("Input Window", null);
+ this("Input Window", null); //$NON-NLS-1$
}
@Override
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties Tue Oct 31 06:25:53 2006
@@ -46,6 +46,65 @@
awt.1C=Failure to create JavaWindow GetLastError returned {0}
awt.1D=Cannot get data from OLE clipboard
awt.1E=Attempt to replace WindowProc handler
+awt.1F=Waiting for resource access thread interrupted not from unlock method.
+awt.20=Can't unlock not locked resource.
+awt.21=Not owner can't unlock resource.
+awt.22=Not owner can't free resource.
+awt.23=One thread can't store state several times in a row.
+awt.24=Owner can't overwrite resource state. Lock operations may be lost.
+awt.25=No state stored for current thread.
+awt.26=Shutdown thread was interrupted while starting
+awt.27=Shutdown thread was interrupted while stopping
+awt.28=bad index: {0}
+awt.29=Invalid range
+awt.2A=Position not represented by view
+awt.2B=No word at {0}
+awt.2C=Invalid position: {0}
+awt.2D=Invalid direction
+awt.2E={0} not in range {1},{2}
+awt.2F=No more words
+awt.30=wrong number of elements to copy: {0}, size: {1}
+awt.31=no room to copy: {0}, size: {1}
+awt.32=String: '{0}' does not fit
+awt.33=index is out of range
+awt.34=Initial offset in the destination array is wrong: {0}
+awt.35=Wrong number of elements to copy: {0}
+awt.36=Wrong segment
+awt.37=Unknown composite type {0}
+awt.38=Property name is not defined
+awt.39=This method is not implemented for image obtained from ImageProducer
+awt.3A=Color Model is null
+awt.3B=Incorrect ImageConsumer completion status
+awt.3C=Unknown PNG color type
+awt.3D=Unknown colorspace
+awt.3E=Clone not supported
+awt.3F=Invalid baseline index
+awt.40=Wrong number of metrics\!
+awt.41=Font returned unsupported type of line metrics. This case is known, but not supported yet.
+awt.42=TextHitInfo out of range
+awt.43=glyphIndex is out of vector's limits
+awt.44=beginGlyphIndex is out of vector's range
+awt.45=numEntries is out of vector's range
+awt.46=length of setPositions array differs from the length of positions array
+awt.47=First argument should be byte or short array
+awt.48=The srcIn raster is incompatible with src ColorModel
+awt.49=The dstIn raster is incompatible with dst ColorModel
+awt.4A=The dstOut raster is incompatible with dst ColorModel
+awt.4B=Iterator out of bounds
+awt.4C=Invalid MultiRectArea in method {0}
+awt.4D=The raster is incompatible with this ColorModel
+awt.4E=Unknown native platform.
+awt.4F=Data is not available
+awt.50=Iterator is read-only
+awt.51=Component expected to be a parent
+awt.52=Time interval can't be <= 0
+awt.53=Handler can't be null
+awt.54=Key event for unfocused component
+awt.55=Double mouse enter event for component
+awt.56=Double mouse exit event for component
+awt.57=Double focus gained event for component
+awt.58=Double focus lost event for component
+awt.59=Application has run out of context thread group
awt.err.00=file dialog {0} error!
awt.err.01=error: {0}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/ByteBase.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/ByteBase.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/ByteBase.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/ByteBase.java Tue Oct 31 06:25:53 2006
@@ -22,6 +22,7 @@
import java.util.Arrays;
+import org.apache.harmony.awt.internal.nls.Messages;
import org.apache.harmony.misc.accessors.AccessorFactory;
import org.apache.harmony.misc.accessors.ArrayAccessor;
import org.apache.harmony.misc.accessors.LockedArray;
@@ -209,10 +210,12 @@
*/
void copy(ByteBase src, int dstOffset, int length) {
if (src.size != -1 && src.size < length) {
- throw new IndexOutOfBoundsException("wrong number of elements to copy: " + length + ", size: " + src.size);
+ // awt.30=wrong number of elements to copy: {0}, size: {1}
+ throw new IndexOutOfBoundsException(Messages.getString("awt.30", length, src.size)); //$NON-NLS-1$
}
if (size != -1 && size - dstOffset < length) {
- throw new IndexOutOfBoundsException("no room to copy: " + length + ", size: " + src.size);
+ // awt.31=no room to copy: {0}, size: {1}
+ throw new IndexOutOfBoundsException(Messages.getString("awt.31", length, src.size)); //$NON-NLS-1$
}
byte[] tmp = new byte[length];
@@ -868,7 +871,8 @@
*/
public void setString(String str){
if (str.length() * 2 > size - 2) { // 2 times lager than str.length and 2 bytes for termination zeroes
- throw new IndexOutOfBoundsException("String: '" + str + "' does not fit");
+ // awt.32=String: '{0}' does not fit
+ throw new IndexOutOfBoundsException(Messages.getString("awt.32", str)); //$NON-NLS-1$
}
if (addr == 0) {
setStringInArray(str);
@@ -1101,7 +1105,8 @@
return;
}
if (index < 0 || index + numBytes - 1 > size) {
- throw new IndexOutOfBoundsException("index is out of range");
+ // awt.33=index is out of range
+ throw new IndexOutOfBoundsException(Messages.getString("awt.33")); //$NON-NLS-1$
}
}
@@ -1110,10 +1115,12 @@
return;
}
if (toIdx < 0 || toIdx > srcDstLengh) {
- throw new IndexOutOfBoundsException("Initial offset in the destination array is wrong: " + toIdx);
+ // awt.34=Initial offset in the destination array is wrong: {0}
+ throw new IndexOutOfBoundsException(Messages.getString("awt.34", toIdx)); //$NON-NLS-1$
}
if (copyLength < 0 || copyLength > srcDstLengh - toIdx || copyLength * bytesInData > size) {
- throw new IndexOutOfBoundsException("Wrong number of elements to copy: " + copyLength);
+ // awt.35=Wrong number of elements to copy: {0}
+ throw new IndexOutOfBoundsException(Messages.getString("awt.35", copyLength)); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/Int16Pointer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/Int16Pointer.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/Int16Pointer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/Int16Pointer.java Tue Oct 31 06:25:53 2006
@@ -109,7 +109,7 @@
if (byteBase != null) {
byteBase.getChar(dst, offset, length);
} else {
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
@@ -126,7 +126,7 @@
if (byteBase != null) {
byteBase.setChar(src, offset, length);
} else {
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
@@ -143,7 +143,7 @@
if (byteBase != null) {
byteBase.getInt16(dst, offset, length);
} else {
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
@@ -160,7 +160,7 @@
if (byteBase != null) {
byteBase.setInt16(src, offset, length);
} else {
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
@@ -171,7 +171,7 @@
if (byteBase != null) {
return new Int16Pointer(byteBase.getBytesBaseElementPointer(index * INT16_SIZE_FACTOR, INT16_SIZE_FACTOR));
}
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
/**
@@ -187,7 +187,7 @@
if(byteBase != null) {
return byteBase.getString();
}
- throw new UnsupportedOperationException("not implemented");
+ throw new UnsupportedOperationException("not implemented"); //$NON-NLS-1$
}
/** convert UTF16 bytes to String */
@@ -195,7 +195,7 @@
if(byteBase != null) {
return byteBase.getString(strlen);
}
- throw new UnsupportedOperationException("not implemented");
+ throw new UnsupportedOperationException("not implemented"); //$NON-NLS-1$
}
/**
@@ -206,7 +206,7 @@
if (byteBase != null) {
byteBase.setString(str);
} else {
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
@@ -217,7 +217,7 @@
byteBase.setInt16(i * INT16_SIZE_FACTOR, value);
}
} else {
- throw new UnsupportedOperationException("not inmplemented");
+ throw new UnsupportedOperationException("not inmplemented"); //$NON-NLS-1$
}
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/PointerPointer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/PointerPointer.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/PointerPointer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/PointerPointer.java Tue Oct 31 06:25:53 2006
@@ -91,12 +91,12 @@
*/
public void get(VoidPointer[] dst, int offset, int length) {
// TODO Implement
- throw new UnsupportedOperationException("Not implemented");
+ throw new UnsupportedOperationException("Not implemented"); //$NON-NLS-1$
}
public void getAddress(long[] dst, int offset, int length) {
// TODO Implement
- throw new UnsupportedOperationException("Not implemented");
+ throw new UnsupportedOperationException("Not implemented"); //$NON-NLS-1$
}
/**
@@ -110,12 +110,12 @@
*/
public void set(VoidPointer[] src, int offset, int length) {
// TODO Implement
- throw new UnsupportedOperationException("Not implemented");
+ throw new UnsupportedOperationException("Not implemented"); //$NON-NLS-1$
}
public void setAddress(long[] src, int offset, int length) {
// TODO Implement
- throw new UnsupportedOperationException("Not implemented");
+ throw new UnsupportedOperationException("Not implemented"); //$NON-NLS-1$
}
/**
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/AWTHighlighter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/AWTHighlighter.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/AWTHighlighter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/AWTHighlighter.java Tue Oct 31 06:25:53 2006
@@ -31,6 +31,8 @@
import javax.swing.text.Position;
import javax.swing.text.View;
+import org.apache.harmony.awt.internal.nls.Messages;
+
/**
*
* That's a simple highlighter for a text component.
@@ -51,7 +53,8 @@
public Object addHighlight(final int p0, final int p1)
throws BadLocationException {
if (p0 < 0 || p1 < p0 || p1 > getDocumentLength()) {
- throw new BadLocationException("invalid range", 0);
+ // awt.29=Invalid range
+ throw new BadLocationException(Messages.getString("awt.29"), 0); //$NON-NLS-1$
}
start = document.createPosition(p0);
end = document.createPosition(p1);
@@ -62,7 +65,8 @@
public void changeHighlight(final int p0, final int p1)
throws BadLocationException {
if (p0 < 0 || p1 < p0 || p1 > getDocumentLength()) {
- throw new BadLocationException("invalid range", 0);
+ // awt.29=Invalid range
+ throw new BadLocationException(Messages.getString("awt.29"), 0); //$NON-NLS-1$
}
int oldStart = getStartOffset();
int oldEnd = getEndOffset();
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionNames.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionNames.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionNames.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionNames.java Tue Oct 31 06:25:53 2006
@@ -25,111 +25,111 @@
* Containts names of text actions.
*/
public interface ActionNames {
- String backwardAction = "caret-backward";
+ String backwardAction = "caret-backward"; //$NON-NLS-1$
- String beepAction = "beep";
+ String beepAction = "beep"; //$NON-NLS-1$
- String beginAction = "caret-begin";
+ String beginAction = "caret-begin"; //$NON-NLS-1$
- String beginLineAction = "caret-begin-line";
+ String beginLineAction = "caret-begin-line"; //$NON-NLS-1$
- String beginParagraphAction = "caret-begin-paragraph";
+ String beginParagraphAction = "caret-begin-paragraph"; //$NON-NLS-1$
- String beginWordAction = "caret-begin-word";
+ String beginWordAction = "caret-begin-word"; //$NON-NLS-1$
- String copyAction = "copy-to-clipboard";
+ String copyAction = "copy-to-clipboard"; //$NON-NLS-1$
- String cutAction = "cut-to-clipboard";
+ String cutAction = "cut-to-clipboard"; //$NON-NLS-1$
- String defaultKeyTypedAction = "default-typed";
+ String defaultKeyTypedAction = "default-typed"; //$NON-NLS-1$
- String deleteNextCharAction = "delete-next";
+ String deleteNextCharAction = "delete-next"; //$NON-NLS-1$
- String deletePrevCharAction = "delete-previous";
+ String deletePrevCharAction = "delete-previous"; //$NON-NLS-1$
- String downAction = "caret-down";
+ String downAction = "caret-down"; //$NON-NLS-1$
- String dumpModelAction = "dump-model";
+ String dumpModelAction = "dump-model"; //$NON-NLS-1$
- String endAction = "caret-end";
+ String endAction = "caret-end"; //$NON-NLS-1$
- String endLineAction = "caret-end-line";
+ String endLineAction = "caret-end-line"; //$NON-NLS-1$
- String endParagraphAction = "caret-end-paragraph";
+ String endParagraphAction = "caret-end-paragraph"; //$NON-NLS-1$
- String endWordAction = "caret-end-word";
+ String endWordAction = "caret-end-word"; //$NON-NLS-1$
- String forwardAction = "caret-forward";
+ String forwardAction = "caret-forward"; //$NON-NLS-1$
- String insertBreakAction = "insert-break";
+ String insertBreakAction = "insert-break"; //$NON-NLS-1$
- String insertContentAction = "insert-content";
+ String insertContentAction = "insert-content"; //$NON-NLS-1$
- String insertTabAction = "insert-tab";
+ String insertTabAction = "insert-tab"; //$NON-NLS-1$
- String nextWordAction = "caret-next-word";
+ String nextWordAction = "caret-next-word"; //$NON-NLS-1$
- String pageDownAction = "page-down";
+ String pageDownAction = "page-down"; //$NON-NLS-1$
- String pageUpAction = "page-up";
+ String pageUpAction = "page-up"; //$NON-NLS-1$
- String pasteAction = "paste-from-clipboard";
+ String pasteAction = "paste-from-clipboard"; //$NON-NLS-1$
- String previousWordAction = "caret-previous-word";
+ String previousWordAction = "caret-previous-word"; //$NON-NLS-1$
- String readOnlyAction = "set-read-only";
+ String readOnlyAction = "set-read-only"; //$NON-NLS-1$
- String selectAllAction = "select-all";
+ String selectAllAction = "select-all"; //$NON-NLS-1$
- String selectionBackwardAction = "selection-backward";
+ String selectionBackwardAction = "selection-backward"; //$NON-NLS-1$
- String selectionBeginAction = "selection-begin";
+ String selectionBeginAction = "selection-begin"; //$NON-NLS-1$
- String selectionBeginLineAction = "selection-begin-line";
+ String selectionBeginLineAction = "selection-begin-line"; //$NON-NLS-1$
- String selectionBeginParagraphAction = "selection-begin-paragraph";
+ String selectionBeginParagraphAction = "selection-begin-paragraph"; //$NON-NLS-1$
- String selectionBeginWordAction = "selection-begin-word";
+ String selectionBeginWordAction = "selection-begin-word"; //$NON-NLS-1$
- String selectionDownAction = "selection-down";
+ String selectionDownAction = "selection-down"; //$NON-NLS-1$
- String selectionEndAction = "selection-end";
+ String selectionEndAction = "selection-end"; //$NON-NLS-1$
- String selectionEndLineAction = "selection-end-line";
+ String selectionEndLineAction = "selection-end-line"; //$NON-NLS-1$
- String selectionEndParagraphAction = "selection-end-paragraph";
+ String selectionEndParagraphAction = "selection-end-paragraph"; //$NON-NLS-1$
- String selectionEndWordAction = "selection-end-word";
+ String selectionEndWordAction = "selection-end-word"; //$NON-NLS-1$
- String selectionForwardAction = "selection-forward";
+ String selectionForwardAction = "selection-forward"; //$NON-NLS-1$
- String selectionNextWordAction = "selection-next-word";
+ String selectionNextWordAction = "selection-next-word"; //$NON-NLS-1$
- String selectionPageDownAction = "selection-page-down";
+ String selectionPageDownAction = "selection-page-down"; //$NON-NLS-1$
- String selectionPageLeftAction = "selection-page-left";
+ String selectionPageLeftAction = "selection-page-left"; //$NON-NLS-1$
- String selectionPageRightAction = "selection-page-right";
+ String selectionPageRightAction = "selection-page-right"; //$NON-NLS-1$
- String selectionPageUpAction = "selection-page-up";
+ String selectionPageUpAction = "selection-page-up"; //$NON-NLS-1$
- String selectionPreviousWordAction = "selection-previous-word";
+ String selectionPreviousWordAction = "selection-previous-word"; //$NON-NLS-1$
- String selectionUpAction = "selection-up";
+ String selectionUpAction = "selection-up"; //$NON-NLS-1$
- String selectLineAction = "select-line";
+ String selectLineAction = "select-line"; //$NON-NLS-1$
- String selectParagraphAction = "select-paragraph";
+ String selectParagraphAction = "select-paragraph"; //$NON-NLS-1$
- String selectWordAction = "select-word";
+ String selectWordAction = "select-word"; //$NON-NLS-1$
- String toggleComponentOrientationAction = "toggle-componentOrientation";
+ String toggleComponentOrientationAction = "toggle-componentOrientation"; //$NON-NLS-1$
- String unselectAction = "unselect";
+ String unselectAction = "unselect"; //$NON-NLS-1$
- String upAction = "caret-up";
+ String upAction = "caret-up"; //$NON-NLS-1$
- String writableAction = "set-writable";
+ String writableAction = "set-writable"; //$NON-NLS-1$
int NONE = 0;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionSet.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionSet.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionSet.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/ActionSet.java Tue Oct 31 06:25:53 2006
@@ -49,7 +49,7 @@
}
@Override
public void internalPerformAction(final TextKit tk) {
- tk.replaceSelectedText("\n");
+ tk.replaceSelectedText("\n"); //$NON-NLS-1$
}
}
@@ -59,7 +59,7 @@
}
@Override
public void internalPerformAction(final TextKit tk) {
- tk.replaceSelectedText("\t");
+ tk.replaceSelectedText("\t"); //$NON-NLS-1$
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/InputMethodRequestsImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/InputMethodRequestsImpl.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/InputMethodRequestsImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/InputMethodRequestsImpl.java Tue Oct 31 06:25:53 2006
@@ -37,6 +37,8 @@
import javax.swing.text.Element;
import javax.swing.text.Position;
+import org.apache.harmony.awt.internal.nls.Messages;
+
public class InputMethodRequestsImpl implements InputMethodRequests {
private TextKit textKit;
public InputMethodRequestsImpl(final TextKit textKit) {
@@ -162,7 +164,8 @@
public char setIndex(final int ind) {
if (!inRange(ind)) {
- throw new IllegalArgumentException("bad index: " + ind);
+ // awt.28=bad index: {0}
+ throw new IllegalArgumentException(Messages.getString("awt.28", ind)); //$NON-NLS-1$
}
return changeIndex(ind, BACKWARD);
}
@@ -226,7 +229,8 @@
attributes) {
if (beginIndex < 0 || endIndex < beginIndex
|| endIndex > textKit.getDocument().getLength()) {
- throw new IllegalArgumentException("Invalid range");
+ // awt.29=Invalid range
+ throw new IllegalArgumentException(Messages.getString("awt.29")); //$NON-NLS-1$
}
AttributedCharacterIterator result = null;
ComposedTextParams composedTextParams = getComposedTextParams();
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/PropertyNames.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/PropertyNames.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/PropertyNames.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/PropertyNames.java Tue Oct 31 06:25:53 2006
@@ -22,8 +22,8 @@
package org.apache.harmony.awt.text;
public interface PropertyNames {
- String FILTER_NEW_LINES = "filterNewlines";
- String COMPOSED_TEXT_PROPERTY = "composedText";
- String AWT_DOCUMENT = "IsAwtDocument";
- String LOAD_PRIORITY = "load priority";
+ String FILTER_NEW_LINES = "filterNewlines"; //$NON-NLS-1$
+ String COMPOSED_TEXT_PROPERTY = "composedText"; //$NON-NLS-1$
+ String AWT_DOCUMENT = "IsAwtDocument"; //$NON-NLS-1$
+ String LOAD_PRIORITY = "load priority"; //$NON-NLS-1$
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextFactory.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextFactory.java Tue Oct 31 06:25:53 2006
@@ -31,7 +31,7 @@
public abstract class TextFactory {
private static final String FACTORY_IMPL_CLS_NAME =
- "javax.swing.text.TextFactoryImpl";
+ "javax.swing.text.TextFactoryImpl"; //$NON-NLS-1$
private static final TextFactory viewFactory = createTextFactory();
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextUtils.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextUtils.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextUtils.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextUtils.java Tue Oct 31 06:25:53 2006
@@ -72,6 +72,7 @@
import javax.swing.text.Position.Bias;
import org.apache.harmony.awt.ComponentInternals;
+import org.apache.harmony.awt.internal.nls.Messages;
public class TextUtils {
@@ -132,7 +133,8 @@
BreakIterator bi = BreakIterator.getWordInstance();
int length = doc.getLength();
if (pos < 0 || pos > length) {
- throwException("No more words", pos);
+ // awt.2F=No more words
+ throwException(Messages.getString("awt.2F"), pos); //$NON-NLS-1$
}
String content = null;
@@ -158,7 +160,8 @@
BreakIterator bi = BreakIterator.getWordInstance();
int length = doc.getLength();
if (pos < 0 || pos > length) {
- throwException("No more words", pos);
+ // awt.2F=No more words
+ throwException(Messages.getString("awt.2F"), pos); //$NON-NLS-1$
}
String content = null;
@@ -223,7 +226,7 @@
final TabExpander t,
final int pos,
final boolean round) {
- String str = "";
+ String str = ""; //$NON-NLS-1$
int segmentOffset = pos - s.getBeginIndex();
boolean isTab = false;
boolean isNullTabExpander = (t == null);
@@ -237,7 +240,7 @@
if (isTab && !isNullTabExpander) {
tabEnd = (int)t.nextTabStop(currentEnd, s.getIndex()
+ segmentOffset);
- str = "";
+ str = ""; //$NON-NLS-1$
} else {
str += (isTab) ? ' ' : c;
isTab = false;
@@ -311,7 +314,8 @@
}
int length = tk.getDocument().getLength();
if (pos < 0 || pos > length) {
- throwException("Position not represented by view", pos);
+ // awt.2A=Position not represented by view
+ throwException(Messages.getString("awt.2A"), pos); //$NON-NLS-1$
}
int y = tk.modelToView(pos).y;
Rectangle tmp = null;
@@ -330,7 +334,8 @@
BreakIterator bi = BreakIterator.getWordInstance();
int length = doc.getLength();
if (pos < 0 || pos > length) {
- throwException("No word at " + pos, pos);
+ // awt.2B=No word at {0}
+ throwException(Messages.getString("awt.2B", pos), pos); //$NON-NLS-1$
}
String content = doc.getText(0, doc.getLength());
bi.setText(content);
@@ -343,7 +348,8 @@
BreakIterator bi = BreakIterator.getWordInstance();
int length = doc.getLength();
if (pos < 0 || pos > length) {
- throwException("No word at " + pos, pos);
+ // awt.2B=No word at {0}
+ throwException(Messages.getString("awt.2B", pos), pos); //$NON-NLS-1$
}
String content = null;
@@ -441,7 +447,8 @@
}
int length = tk.getDocument().getLength();
if (pos < 0 || pos > length) {
- throwException("Position not represented by view", pos);
+ // awt.2A=Position not represented by view
+ throwException(Messages.getString("awt.2A"), pos); //$NON-NLS-1$
}
int y = tk.modelToView(pos).y;
@@ -513,10 +520,10 @@
int x1 = x < 0 ? x : 0;
int res = x < 0 ? 0 : x;
String buffer = s.toString();
- int tabIndex = buffer.indexOf("\t");
+ int tabIndex = buffer.indexOf("\t"); //$NON-NLS-1$
int currentIndex = pos - s.getBeginIndex() + s.offset;
if (t == null) {
- String buf = buffer.replaceAll("\t", " ");
+ String buf = buffer.replaceAll("\t", " "); //$NON-NLS-1$ //$NON-NLS-2$
drawString(buf, needDraw, g, x, y);
return fm.stringWidth(buf) + x;
}
@@ -528,7 +535,7 @@
res = (int)t.nextTabStop(res + fm.stringWidth(substr),
tabIndex + currentIndex);
lastTabIndex = tabIndex;
- tabIndex = buffer.indexOf("\t", tabIndex + 1);
+ tabIndex = buffer.indexOf("\t", tabIndex + 1); //$NON-NLS-1$
}
int tmp = res + x1;
substr = buffer.substring(lastTabIndex + 1, buffer.length());
@@ -573,7 +580,8 @@
throws BadLocationException {
int length = v.getDocument().getLength();
if (pos < 0 || pos > length) {
- throwException("Invalid position: " + pos, pos);
+ // awt.2C=Invalid position: {0}
+ throwException(Messages.getString("awt.2C", pos), pos); //$NON-NLS-1$
}
biasRet[0] = Position.Bias.Forward;
if (direction == SwingConstants.WEST
@@ -590,7 +598,8 @@
: v.modelToView(pos, shape, bias).getBounds().x);
}
- throw new IllegalArgumentException("Invalid direction");
+ // awt.2D=Invalid direction
+ throw new IllegalArgumentException(Messages.getString("awt.2D")); //$NON-NLS-1$
}
@@ -883,7 +892,7 @@
final Transferable transferable,
final int action) {
if (textKit != null && (action & ActionNames.MOVE) > 0) {
- textKit.replaceSelectedText("");
+ textKit.replaceSelectedText(""); //$NON-NLS-1$
}
}
@@ -922,7 +931,7 @@
public static int getSourceActions(final TextKit textKit) {
if (textKit != null
- && !"javax.swing.JPasswordField".equals(textKit.getClass())) {
+ && !"javax.swing.JPasswordField".equals(textKit.getClass())) { //$NON-NLS-1$
return (textKit.isEditable()) ? ActionNames.COPY_OR_MOVE
: ActionNames.COPY;
@@ -1125,9 +1134,10 @@
throws BadLocationException {
if (pos < view.getStartOffset() || pos > view.getEndOffset()) {
- throw new BadLocationException(pos + " not in range "
- + view.getStartOffset() + ","
- + view.getEndOffset(), pos);
+ // awt.2E={0} not in range {1},{2}
+ throw new BadLocationException(Messages.getString("awt.2E", //$NON-NLS-1$
+ new Object[] { pos, view.getStartOffset(),
+ view.getEndOffset() }), pos);
}
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java Tue Oct 31 06:25:53 2006
@@ -71,7 +71,7 @@
public DefaultFileDialog(FileDialog fd) {
fileDialog = fd;
- filterStr = "*";
+ filterStr = "*"; //$NON-NLS-1$
}
public void actionPerformed(ActionEvent e) {
@@ -208,12 +208,12 @@
}
private void updateFilter() {
- filterStr = filter.getText().replaceAll("\\.", "\\\\.");
- filterStr = filterStr.replaceAll("\\*", ".*");
+ filterStr = filter.getText().replaceAll("\\.", "\\\\."); //$NON-NLS-1$ //$NON-NLS-2$
+ filterStr = filterStr.replaceAll("\\*", ".*"); //$NON-NLS-1$ //$NON-NLS-2$
}
private void resetFilter() {
- filterStr = "*";
+ filterStr = "*"; //$NON-NLS-1$
filter.setText(filterStr);
updateFilter();
}
@@ -222,14 +222,14 @@
if (folders.getItemCount() > 0) {
folders.removeAll();
}
- folders.add("..");
+ folders.add(".."); //$NON-NLS-1$
if (files.getItemCount() > 0) {
files.removeAll();
}
}
private File getDefaultFolder() {
- return new File(System.getProperty("user.dir"));
+ return new File(System.getProperty("user.dir")); //$NON-NLS-1$
}
private void addListeners() {
@@ -255,9 +255,9 @@
filter = new TextField(filterStr);
folders = new List();
files = new List();
- okButton = new Button("OK");
- filterButton = new Button("Filter");
- cancelButton = new Button("Cancel");
+ okButton = new Button("OK"); //$NON-NLS-1$
+ filterButton = new Button("Filter"); //$NON-NLS-1$
+ cancelButton = new Button("Cancel"); //$NON-NLS-1$
}
private Choice createCustomChoice() {
@@ -294,14 +294,14 @@
addPath(gbc);
- fileDialog.add(new Label("Filter"), gbc);
+ fileDialog.add(new Label("Filter"), gbc); //$NON-NLS-1$
fileDialog.add(filter, gbc);
addLists(gbc);
gbc.weighty = 0.0;
gbc.weightx = 0.0;
- fileDialog.add(new Label("Enter file name:"), gbc);
+ fileDialog.add(new Label("Enter file name:"), gbc); //$NON-NLS-1$
fileDialog.add(fileName, gbc);
Separator sep = new Separator();
@@ -317,7 +317,7 @@
private void addPath(GridBagConstraints gbc) {
gbc.weightx = 1.0;
gbc.gridwidth = GridBagConstraints.REMAINDER;
- fileDialog.add(new Label("Enter path or folder name:"), gbc);
+ fileDialog.add(new Label("Enter path or folder name:"), gbc); //$NON-NLS-1$
Panel pathPanel = new Panel(new BorderLayout());
pathPanel.add(path); // CENTER
int cSize = DefaultScrollbar.BUTTON_SIZE + BORDER.top;
@@ -330,9 +330,9 @@
private void addLists(GridBagConstraints gbc) {
gbc.weightx = 1.0;
gbc.gridwidth = 1;
- fileDialog.add(new Label("Folders"), gbc);
+ fileDialog.add(new Label("Folders"), gbc); //$NON-NLS-1$
gbc.gridwidth = GridBagConstraints.REMAINDER;
- fileDialog.add(new Label("Files"), gbc);
+ fileDialog.add(new Label("Files"), gbc); //$NON-NLS-1$
gbc.gridwidth = 1;
gbc.weighty = 1.0;
fileDialog.add(folders, gbc);
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultMenu.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultMenu.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultMenu.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultMenu.java Tue Oct 31 06:25:53 2006
@@ -66,7 +66,7 @@
MenuItemState is = s.getItem(index);
String label = is.getText();
- if (!label.equals("-")) {
+ if (!label.equals("-")) { //$NON-NLS-1$
int dy = verticalPadding * 2 + itemHeight;
y += dy;
@@ -136,7 +136,7 @@
int dx = 0, dy = 0;
MenuItemState is = s.getItem(index);
String label = is.getText();
- if (!label.equals("-")) {
+ if (!label.equals("-")) { //$NON-NLS-1$
dy = verticalPadding * 2 + itemHeight;
dx = fm.stringWidth(label);
} else {
@@ -174,7 +174,7 @@
for (int index=0; index < s.getItemCount(); index++) {
String label = s.getItem(index).getText();
- if (!label.equals("-")) {
+ if (!label.equals("-")) { //$NON-NLS-1$
int dy = verticalPadding * 2 + itemHeight;
if ((p.y <= y + dy) && (p.y > y)) {
return index;
@@ -203,7 +203,7 @@
for (int i=0; i < index; i++) {
String label = s.getItem(i).getText();
- if (!label.equals("-")) {
+ if (!label.equals("-")) { //$NON-NLS-1$
int dy = verticalPadding * 2 + itemHeight;
y += dy;
} else {
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventThread.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventThread.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventThread.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventThread.java Tue Oct 31 06:25:53 2006
@@ -36,7 +36,7 @@
private WTK wtk;
public NativeEventThread() {
- super("AWT-NativeEventThread");
+ super("AWT-NativeEventThread"); //$NON-NLS-1$
setDaemon(true);
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeIM.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeIM.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeIM.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeIM.java Tue Oct 31 06:25:53 2006
@@ -111,7 +111,7 @@
public String getInputMethodDisplayName(Locale inputLocale,
Locale displayLanguage) {
- return "System input methods";
+ return "System input methods"; //$NON-NLS-1$
}
public Image getInputMethodIcon(Locale inputLocale) {
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/ShutdownThread.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/ShutdownThread.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/ShutdownThread.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/ShutdownThread.java Tue Oct 31 06:25:53 2006
@@ -20,13 +20,15 @@
*/
package org.apache.harmony.awt.wtk;
+import org.apache.harmony.awt.internal.nls.Messages;
+
public final class ShutdownThread extends Thread {
public static final class Watchdog {
}
public ShutdownThread() {
- setName("AWT-Shutdown");
+ setName("AWT-Shutdown"); //$NON-NLS-1$
setDaemon(false);
}
@@ -58,8 +60,9 @@
try {
wait();
} catch (InterruptedException e) {
+ // awt.26=Shutdown thread was interrupted while starting
throw new RuntimeException(
- "Shutdown thread was interrupted while starting");
+ Messages.getString("awt.26")); //$NON-NLS-1$
}
}
}
@@ -71,8 +74,9 @@
try {
wait();
} catch (InterruptedException e) {
+ // awt.27=Shutdown thread was interrupted while stopping
throw new RuntimeException(
- "Shutdown thread was interrupted while stopping");
+ Messages.getString("awt.27")); //$NON-NLS-1$
}
}
}
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java?view=diff&rev=469497&r1=469496&r2=469497
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java Tue Oct 31 06:25:53 2006
@@ -23,6 +23,8 @@
import java.util.Hashtable;
import java.util.LinkedList;
+import org.apache.harmony.awt.internal.nls.Messages;
+
/**
* Class synchronizer is to protect AWT state integrity in multithreading environment.
* It is supposed to have a child class per native platform.
@@ -92,8 +94,9 @@
} catch (InterruptedException e) {
if (owner != curThread) {
waitQueue.remove(curThread);
- throw new RuntimeException(
- "Waiting for resource access thread interrupted not from unlock method.");
+ // awt.1F=Waiting for resource access thread interrupted not from unlock method.
+ throw new RuntimeException(Messages
+ .getString("awt.1F")); //$NON-NLS-1$
}
}
}
@@ -109,10 +112,12 @@
public void unlock() {
synchronized (this) {
if (acquestCounter == 0) {
- throw new RuntimeException("Can't unlock not locked resource.");
+ // awt.20=Can't unlock not locked resource.
+ throw new RuntimeException(Messages.getString("awt.20")); //$NON-NLS-1$
}
if (owner != Thread.currentThread()) {
- throw new RuntimeException("Not owner can't unlock resource.");
+ // awt.21=Not owner can't unlock resource.
+ throw new RuntimeException(Messages.getString("awt.21")); //$NON-NLS-1$
}
acquestCounter--;
@@ -139,10 +144,12 @@
Thread curThread = Thread.currentThread();
if (owner != curThread) {
- throw new RuntimeException("Not owner can't free resource.");
+ // awt.22=Not owner can't free resource.
+ throw new RuntimeException(Messages.getString("awt.22")); //$NON-NLS-1$
}
if (storedStates.containsKey(curThread)) {
- throw new RuntimeException("One thread can't store state several times in a row.");
+ // awt.23=One thread can't store state several times in a row.
+ throw new RuntimeException(Messages.getString("awt.23")); //$NON-NLS-1$
}
storedStates.put(curThread, new Integer(acquestCounter));
@@ -162,11 +169,13 @@
Thread curThread = Thread.currentThread();
if (owner == curThread) {
+ // awt.24=Owner can't overwrite resource state. Lock operations may be lost.
throw new RuntimeException(
- "Owner can't overwrite resource state. Lock operations may be lost.");
+ Messages.getString("awt.24")); //$NON-NLS-1$
}
if (!storedStates.containsKey(curThread)) {
- throw new RuntimeException("No state stored for current thread.");
+ // awt.25=No state stored for current thread.
+ throw new RuntimeException(Messages.getString("awt.25")); //$NON-NLS-1$
}
lock();