Add LCDUIUtils.java, LocalDevice.java and more

This commit is contained in:
Pin Zhang 2014-10-10 10:33:23 +08:00
Родитель c532ecc145
Коммит 375c58566b
9 изменённых файлов: 73 добавлений и 17 удалений

Просмотреть файл

@ -186,12 +186,13 @@ public class TextEditor extends CanvasItem {
// Sets the input constraints of this TextEditor.
public void setConstraints(int constraints) {
throw new RuntimeException("TextEditor::setConstraints(int) not implemented");
System.out.println("TextEditor::setConstraints(int) not implemented");
}
// Gets the current input constraints of this TextEditor.
public int getConstraints() {
throw new RuntimeException("TextEditor::getConstraints() not implemented");
System.out.println("TextEditor::getConstraints() not implemented");
return 0;
}
// Sets a hint to the implementation as to the input mode that should be used when the user initiates editing of this TextEditor.

Просмотреть файл

@ -43,7 +43,7 @@ public class VirtualKeyboard {
}
public static void setVisibilityListener(KeyboardVisibilityListener keyboardVisibilityListener) {
throw new RuntimeException("CustomKeyboardControl::setVisibilityListener(KeyboardVisibilityListener) not implemented");
System.out.println("CustomKeyboardControl::setVisibilityListener(KeyboardVisibilityListener) not implemented");
}
public static void suppressSizeChanged(boolean bl) {

Просмотреть файл

@ -10,4 +10,8 @@ public class Indicator {
public void setActive(boolean active) {
System.out.println("Indicator.setActive(Z)V not implemented (" + active + ")");
}
public void setIcon(Image image) {
System.out.println("Indicator.setIcon(IL...Image;)V not implemented.");
}
}

Просмотреть файл

@ -0,0 +1,25 @@
package com.nokia.mid.ui.lcdui;
import javax.microedition.lcdui.Display;
import com.nokia.mid.ui.lcdui.DisplayStateListener;
public class LCDUIUtils {
static java.lang.Object getObjectTrait(java.lang.Object target, java.lang.String traitName) {
System.out.println("LCDUIUtils::getObjectTrait(Object,String) not implemented");
return null;
}
static boolean setObjectTrait(java.lang.Object target, java.lang.String traitName, java.lang.Object value) {
System.out.println("LCDUIUtils::setObjectTrait(Object,String) not implemented");
return false;
}
static boolean isDisplayActive(Display display) {
System.out.println("LCDUIUtils::isDisplayActive(Display) not implemented");
return true;
}
static void setDisplayStateListener(Display display, DisplayStateListener listener) {
System.out.println("LCDUIUtils::setDisplayStateListener(Dispay,DisplayStateListener) not implemented");
}
}

Просмотреть файл

@ -0,0 +1,8 @@
package javax.bluetooth;
public class LocalDevice {
public static String getProperty(String property) {
System.out.println("LocalDevice::getProperty(String) not implemented.");
return null;
}
}

Просмотреть файл

@ -0,0 +1,4 @@
package javax.microedition.io.file;
public interface FileSystemListener {
}

Просмотреть файл

@ -0,0 +1,25 @@
package javax.microedition.io.file;
import java.util.Enumeration;
import java.util.Vector;
public class FileSystemRegistry {
private FileSystemRegistry() {
}
public static boolean addFileSystemListener(FileSystemListener listener) {
System.out.println("FileSystemRegistry::addFileSystemListener(FileSystemListener) not implemented.");
return false;
}
public static boolean removeFileSystemListener(FileSystemListener listener) {
System.out.println("FileSystemRegistry::removeFileSystemListener(FileSystemListener) not implemented.");
return false;
}
public static Enumeration listRoots() {
System.out.println("FileSystemRegistry::listRoots() not implemented.");
return new Vector().elements();
}
}

Просмотреть файл

@ -37,7 +37,7 @@ casper.test.begin("unit tests", 5 + gfxTests.length, function(test) {
casper
.start("http://localhost:8000/index.html")
.waitForText("DONE", function() {
test.assertTextExists("DONE: 4947 pass, 0 fail, 168 known fail, 0 unknown pass", "run unit tests");
test.assertTextExists("DONE: 4946 pass, 0 fail, 168 known fail, 0 unknown pass", "run unit tests");
});
casper

Просмотреть файл

@ -13,19 +13,8 @@ public class TestTextEditor extends Canvas implements Testlet {
th.check(textEditor.getContent(), "Hello, world!");
th.check(textEditor.getMaxSize(), 20);
try {
textEditor.getConstraints();
th.fail("TextEditor::getConstraints() not implemented");
} catch(RuntimeException ex) {
th.check(ex.getMessage(), "TextEditor::getConstraints() not implemented");
}
try {
textEditor.setConstraints(0);
th.fail("TextEditor::setConstraints(int) not implemented");
} catch(RuntimeException ex) {
th.check(ex.getMessage(), "TextEditor::setConstraints(int) not implemented");
}
textEditor.setConstraints(0);
th.check(textEditor.getConstraints(), 0);
th.check(textEditor.getWidth(), 100);
th.check(textEditor.getHeight(), 24);