use of javax.microedition.amms.control.camera.FocusControl in project CodenameOne by codenameone.
the class AdvancedMultimediaManager method setFocus.
public void setFocus(Controllable player) {
FocusControl focusControl = (FocusControl) getControl(player, "javax.microedition.amms.control.camera.FocusControl");
if (focusControl != null) {
try {
if (focusControl.isMacroSupported() && !focusControl.getMacro()) {
focusControl.setMacro(true);
}
if (focusControl.isAutoFocusSupported()) {
focusControl.setFocus(FocusControl.AUTO);
try {
// let it focus...
Thread.sleep(FOCUS_TIME_MS);
} catch (InterruptedException ie) {
// continue
}
focusControl.setFocus(FocusControl.AUTO_LOCK);
}
} catch (MediaException me) {
// continue
}
}
}
use of javax.microedition.amms.control.camera.FocusControl in project CodenameOne by codenameone.
the class AdvancedMultimediaManager method setFocus.
public void setFocus(Controllable player) {
FocusControl focusControl = (FocusControl) getControl(player, "javax.microedition.amms.control.camera.FocusControl");
if (focusControl != null) {
try {
if (focusControl.isMacroSupported() && !focusControl.getMacro()) {
focusControl.setMacro(true);
}
if (focusControl.isAutoFocusSupported()) {
focusControl.setFocus(FocusControl.AUTO);
try {
// let it focus...
Thread.sleep(FOCUS_TIME_MS);
} catch (InterruptedException ie) {
// continue
}
focusControl.setFocus(FocusControl.AUTO_LOCK);
}
} catch (MediaException me) {
// continue
}
}
}
Aggregations