Skip to content

Commit 988869e

Browse files
committed
Updating java.util maps and others for qualified names
1 parent 57466b2 commit 988869e

21 files changed

+17075
-13016
lines changed

sources/net.sf.j2s.java.core/src/java/awt/Component.java

Lines changed: 8273 additions & 8176 deletions
Large diffs are not rendered by default.

sources/net.sf.j2s.java.core/src/java/awt/Container.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,6 @@ public void invalidate() {
14921492
* @see javax.swing.JComponent#revalidate()
14931493
* @see #validateTree
14941494
*
1495-
* @j2sOverride
14961495
*
14971496
*/
14981497
@Override
@@ -1806,7 +1805,6 @@ public float getAlignmentY() {
18061805
* @param g the specified Graphics window
18071806
* @see Component#update(Graphics)
18081807
*
1809-
* @j2sOverride
18101808
*
18111809
*/
18121810
@Override

sources/net.sf.j2s.java.core/src/java/awt/RenderingHints.java

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
package java.awt;
3030

31-
import java.util.Map;
32-
import java.util.Set;
3331
import java.util.Collection;
3432
import java.util.Collections;
3533
import java.util.HashMap;
34+
import java.util.Map;
35+
import java.util.Set;
3636

3737
/**
3838
* The {@code RenderingHints} class defines and manages collections of
@@ -79,6 +79,7 @@
7979
* Other hints may be created by other packages by defining new objects
8080
* which subclass the {@code Key} class and defining the associated values.
8181
*/
82+
@SuppressWarnings({"rawtypes", "unchecked"})
8283
public class RenderingHints
8384
implements Map<Object,Object>, Cloneable
8485
{
@@ -1144,24 +1145,14 @@ public int hashCode() {
11441145
*
11451146
* @return a clone of this instance.
11461147
*
1147-
* @j2sOverride
11481148
*/
11491149
@Override
11501150
public Object clone() {
11511151
RenderingHints rh;
11521152
try {
1153-
/**
1154-
* @j2sNative
1155-
*
1156-
* rh = Clazz.clone(this);
1157-
* if (this.hintmap != null) { rh.hintmap =
1158-
* this.hintmap.cloneHM(); }
1159-
*/
1160-
{
1161-
rh = (RenderingHints) super.clone();
1162-
if (hintmap != null) {
1163-
rh.hintmap = (HashMap) hintmap.clone();
1164-
}
1153+
rh = (RenderingHints) super.clone();
1154+
if (hintmap != null) {
1155+
rh.hintmap = (HashMap) hintmap.clone();
11651156
}
11661157
} catch (CloneNotSupportedException e) {
11671158
// this shouldn't happen, since we are Cloneable

sources/net.sf.j2s.java.core/src/java/awt/geom/AffineTransform.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,15 +2201,6 @@ public void setToShear(double shx, double shy) {
22012201
* @since 1.2
22022202
*/
22032203
public void setTransform(AffineTransform t) {
2204-
setTransformImpl(t);
2205-
}
2206-
2207-
/**
2208-
* allows for no overhead
2209-
*
2210-
* @param t
2211-
*/
2212-
public void setTransformImpl(AffineTransform t) {
22132204
this.m00 = t.m00;
22142205
this.m10 = t.m10;
22152206
this.m01 = t.m01;

sources/net.sf.j2s.java.core/src/java/lang/Thread.java

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -284,26 +284,30 @@ public static Thread currentThread() {
284284
*/
285285
{}
286286
if (thisThread == null) {
287-
/**
288-
*
289-
* technically, JSThread is an abstract class, but we go ahead and
290-
* instantialize it anyway in JavaScript. The reason it is abstract is
291-
* to force generation of necessary methods when using it.
292-
*
293-
* @j2sNative
294-
*
295-
* java.lang.Thread.thisThread = "working";
296-
* java.lang.Thread.thisThread = new java.lang.Thread ("master");
297-
* var name = J2S._applets["master"]._id;
298-
* var g = new swingjs.JSThreadGroup(null, name);
299-
* java.lang.Thread.thisThread = new javajs.util.JSThread(g, name);
300-
*
301-
*/
287+
/**
288+
*
289+
* technically, JSThread is an abstract class, but we go ahead and
290+
* instantialize it anyway in JavaScript. The reason it is abstract
291+
* is to force generation of necessary methods when using it.
292+
*
293+
* @j2sNative
294+
*
295+
*
296+
* java.lang.Thread.thisThread = "working";
297+
* java.lang.Thread.thisThread =
298+
* Clazz.$new(java.lang.Thread.construct$S, ["master"]);
299+
* var name = J2S._applets["master"]._id; var g =
300+
* Clazz.$new(swingjs.JSThreadGroup.construct$ThreadGroup$S,
301+
* [null, name]); java.lang.Thread.thisThread =
302+
* Clazz.$new(javajs.util.JSThread.construct$ThreadGroup$S,
303+
* [g, name]);
304+
*
305+
*/
302306
{
303307
// these are for reference only -- not used in JavaScript
304308
JSThread.interrupted();
305309
new swingjs.JSThreadGroup(null, null);
306-
thisThread = new Thread("master");
310+
thisThread = new Thread("master");
307311
}
308312
thisThread.setPriority(NORM_PRIORITY);
309313
}

sources/net.sf.j2s.java.core/src/java/lang/ThreadGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler {
7373

7474
int ngroups;
7575
ThreadGroup groups[];
76-
private HTML5Applet html5Applet;
76+
protected HTML5Applet html5Applet;
7777

7878
// /**
7979
// * Creates an empty Thread group that is not in any Thread group.

0 commit comments

Comments
 (0)