Skip to content

Commit 738d8b4

Browse files
committed
Initial state of combit List & Label 23 Java strongly-typed wrapper.
1 parent ba477b8 commit 738d8b4

35 files changed

+1408
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<project default="build_jar" name="Create Jar for combit.ListLabel23">
3+
<!--ANT 1.7 is required -->
4+
<!--define folder properties-->
5+
<property name="dir.buildfile" value="."/>
6+
<property name="dir.workspace" value="${dir.buildfile}/.."/>
7+
<property name="dir.jarfile" value="${dir.buildfile}/target"/>
8+
<target name="build_jar">
9+
<jar destfile="${dir.jarfile}/combit.ListLabel23.jar" filesetmanifest="merge" manifest="${dir.workspace}/combit.ListLabel23/manifest.mf">
10+
<fileset dir="${dir.workspace}/combit.ListLabel23/bin"/>
11+
</jar>
12+
</target>
13+
</project>

combit.ListLabel23/manifest.mf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Name: combit/ListLabel23
2+
Class-Path: javonet-1.5.jar combit.ListLabel23.dll
3+
Specification-Title: combit List&Label 23
4+
Specification-Version: 23
5+
Specification-Vendor: combit
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package Microsoft.Win32;
2+
3+
import com.javonet.Javonet;
4+
import com.javonet.JavonetException;
5+
import com.javonet.api.NType;
6+
7+
public class Registry {
8+
private static NType staticHandle;
9+
public static RegistryKey getCurrentUser() {
10+
try {
11+
return new RegistryKey(staticHandle.getRef("CurrentUser"));
12+
} catch (JavonetException e) {
13+
e.printStackTrace();
14+
return null;
15+
}
16+
}
17+
18+
static {
19+
try {
20+
staticHandle=Javonet.getType("Registry");
21+
} catch (JavonetException e) {
22+
e.printStackTrace();
23+
}
24+
}
25+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package Microsoft.Win32;
2+
3+
import com.javonet.JavonetException;
4+
import com.javonet.api.NObject;
5+
6+
public class RegistryKey {
7+
private NObject handle;
8+
9+
RegistryKey(NObject handle) {
10+
this.handle=handle;
11+
}
12+
13+
public Object GetValue(String name, Object defaultValue) {
14+
try {
15+
return this.handle.invoke("GetValue",name,defaultValue);
16+
} catch (JavonetException e) {
17+
e.printStackTrace();
18+
return null;
19+
}
20+
}
21+
22+
public RegistryKey CreateSubKey(String subkey) {
23+
try {
24+
return new RegistryKey(this.handle.invoke("CreateSubKey",subkey));
25+
} catch (JavonetException e) {
26+
e.printStackTrace();
27+
return null;
28+
}
29+
}
30+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package System.Data.OleDb;
2+
3+
import com.javonet.Javonet;
4+
import com.javonet.JavonetException;
5+
import com.javonet.api.NObject;
6+
7+
public class OleDbCommand {
8+
@SuppressWarnings("unused")
9+
private NObject handle;
10+
11+
public OleDbCommand(String command, OleDbConnection connection) {
12+
try {
13+
handle = Javonet.New(OleDbCommand.class.getName(),command,connection);
14+
} catch (JavonetException e) {
15+
e.printStackTrace();
16+
}
17+
}
18+
}
19+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package System.Data.OleDb;
2+
3+
import com.javonet.Javonet;
4+
import com.javonet.JavonetException;
5+
import com.javonet.api.NException;
6+
import com.javonet.api.NObject;
7+
8+
public class OleDbConnection {
9+
private NObject handle;
10+
11+
public OleDbConnection(String connectionString) {
12+
try {
13+
handle = Javonet.New(OleDbConnection.class.getName(), connectionString);
14+
} catch (JavonetException e) {
15+
e.printStackTrace();
16+
}
17+
}
18+
19+
public void Open() {
20+
try {
21+
handle.invoke("Open");
22+
} catch (NException e) {
23+
e.printStackTrace();
24+
if (e.getInnerException()!=null)
25+
e.getInnerException().printStackTrace();
26+
} catch (JavonetException e) {
27+
e.printStackTrace();
28+
29+
}
30+
}
31+
32+
public void Close() {
33+
try {
34+
handle.invoke("Close");
35+
} catch (JavonetException e) {
36+
e.printStackTrace();
37+
}
38+
}
39+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package System.Drawing;
2+
3+
import com.javonet.api.NObject;
4+
5+
public class Color {
6+
@SuppressWarnings("unused")
7+
private static NObject handle;
8+
9+
public Color(NObject instance) {
10+
handle=instance;
11+
}
12+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package System.Drawing;
2+
import com.javonet.Javonet;
3+
import com.javonet.JavonetException;
4+
import com.javonet.api.NObject;
5+
import com.javonet.api.NType;
6+
7+
public class SystemColors {
8+
@SuppressWarnings("unused")
9+
private static NObject handle;
10+
private static NType typeHandle;
11+
12+
public SystemColors() {
13+
try {
14+
handle = Javonet.New(SystemColors.class.getName());
15+
} catch (JavonetException e) {
16+
e.printStackTrace();
17+
}
18+
}
19+
20+
public static Color getWindow() {
21+
try {
22+
return new Color(typeHandle.get("Window"));
23+
} catch (JavonetException e) {
24+
e.printStackTrace();
25+
return null;
26+
}
27+
}
28+
29+
static {
30+
try {
31+
typeHandle = Javonet.getType(SystemColors.class.getName());
32+
} catch (JavonetException e) {
33+
e.printStackTrace();
34+
}
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package System.Windows.Forms;
2+
3+
public enum DockStyle {
4+
None(0),
5+
//
6+
// Summary:
7+
// The control's top edge is docked to the top of its containing control.
8+
Top(1),
9+
//
10+
// Summary:
11+
// The control's bottom edge is docked to the bottom of its containing control.
12+
Bottom(2),
13+
//
14+
// Summary:
15+
// The control's left edge is docked to the left edge of its containing control.
16+
Left(3),
17+
//
18+
// Summary:
19+
// The control's right edge is docked to the right edge of its containing control.
20+
Right(4),
21+
//
22+
// Summary:
23+
// All the control's edges are docked to the all edges of its containing control
24+
// and sized appropriately.
25+
Fill(5);
26+
27+
private int numVal;
28+
29+
DockStyle(int numVal) {
30+
this.numVal = numVal;
31+
}
32+
33+
public int getNumVal() {
34+
return numVal;
35+
}
36+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package combit.ListLabel23;
2+
3+
public enum DataBindingMode {
4+
DelayLoad
5+
}

0 commit comments

Comments
 (0)