Skip to content

Commit 3625fe2

Browse files
author
jossonsmith
committed
Update all methods in classes *.xhtml.* with native modifier.
1 parent 2b99f42 commit 3625fe2

7 files changed

Lines changed: 37 additions & 164 deletions

File tree

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/Clazz.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44

55
public class Clazz {
66

7-
public static Runnable makeFunction(Runnable runnable) {
8-
// TODO Auto-generated method stub
9-
return null;
10-
}
7+
public native static Runnable makeFunction(Runnable runnable);
118

12-
public static Runnable makeFunction(RunnableCompatibility runnable) {
13-
// TODO Auto-generated method stub
14-
return null;
15-
}
9+
public native static Runnable makeFunction(RunnableCompatibility runnable);
1610
}

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/ContentWindow.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,7 @@ public class ContentWindow {
55
public String location;
66
public History history;
77

8-
public void reload() {
9-
// TODO Auto-generated method stub
10-
11-
}
8+
public native void reload();
129

13-
/**
14-
*
15-
*/
16-
public void stop() {
17-
// TODO Auto-generated method stub
18-
19-
}
10+
public native void stop();
2011
}

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/Element.java

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -93,47 +93,21 @@ public class Element {
9393

9494
//private String
9595

96-
public void appendChild(Element child) {
97-
//
98-
}
99-
100-
public void select() {
101-
// TODO Auto-generated method stub
102-
103-
}
104-
105-
public void focus() {
106-
// TODO Auto-generated method stub
107-
108-
}
109-
110-
public void removeChild(Element handle) {
111-
// TODO Auto-generated method stub
112-
113-
}
114-
115-
public void add(Object object) {
116-
// TODO Auto-generated method stub
117-
118-
}
119-
120-
public void insertBefore(Element newTR, Element tbodyTR) {
121-
// TODO Auto-generated method stub
122-
123-
}
96+
public native void appendChild(Element child);
97+
98+
public native void select();
99+
100+
public native void focus();
101+
102+
public native void removeChild(Element handle);
124103

125-
public Element[] getElementsByTagName(String tag) {
126-
return new Element[0];
127-
}
104+
public native void add(Object object);
105+
106+
public native void insertBefore(Element newTR, Element tbodyTR);
107+
108+
public native Element[] getElementsByTagName(String tag);
128109

129-
public Element cloneNode(boolean flag){
130-
return new Element();
131-
}
132-
133-
public Element getElementById(String id){
134-
return new Element();
135-
}
136-
// public void write(String html) {
137-
//
138-
// }
110+
public native Element cloneNode(boolean flag);
111+
112+
public native Element getElementById(String id);
139113
}

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/History.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@
1919
* 2006-4-27
2020
*/
2121
public class History {
22-
public void forward() {
23-
}
24-
public void back() {
25-
26-
}
27-
public void go(String location) {
28-
29-
}
22+
23+
public native void forward();
24+
25+
public native void back();
26+
27+
public native void go(String location);
28+
3029
}

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/TestTable.java

Lines changed: 0 additions & 54 deletions
This file was deleted.

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/document.java

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,13 @@ public class document {
1313
public static Object onkeyup;
1414

1515
public static Body body;
16-
public static Element createElement(String tag) {
17-
return new Element();
18-
}
19-
public static Element[] getElementsByTagName(String tag) {
20-
return new Element[0];
21-
}
22-
public static Element createTextNode(String string) {
23-
return null;
24-
}
2516

26-
public static Element getElementById(String id){
27-
return new Element();
28-
}
17+
public native static Element createElement(String tag);
18+
public native static Element[] getElementsByTagName(String tag);
19+
public native static Element createTextNode(String string);
2920

30-
public void write(String html) {
31-
// TODO Auto-generated method stub
32-
33-
}
34-
/**
35-
*
36-
*/
37-
public void close() {
38-
// TODO Auto-generated method stub
39-
40-
}
21+
public native static Element getElementById(String id);
22+
23+
public native void write(String html);
24+
public native void close();
4125
}

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/xhtml/window.java

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,11 @@ public class window {
1313
public static Screen screen;
1414
public static History history;
1515

16-
public static int setInterval(Runnable runnable, int milliseconds) {
17-
// TODO Auto-generated method stub
18-
return 0;
19-
}
16+
public native static int setInterval(Runnable runnable, int milliseconds);
2017

21-
public static void clearInterval(int timerId) {
22-
// TODO Auto-generated method stub
23-
24-
}
18+
public native static void clearInterval(int timerId);
2519

26-
public static int setTimeout(Runnable runnable, int i) {
27-
// TODO Auto-generated method stub
28-
return 0;
29-
}
20+
public native static int setTimeout(Runnable runnable, int i);
3021

31-
/**
32-
* @param hoverTimerID
33-
*/
34-
public static void clearTimeout(int hoverTimerID) {
35-
// TODO Auto-generated method stub
36-
37-
}
22+
public native static void clearTimeout(int hoverTimerID);
3823
}

0 commit comments

Comments
 (0)