net.rim.device.api.amms.control.camera
Interface EnhancedFocusControl

All Superinterfaces:
FocusControl, Control

public interface EnhancedFocusControl
extends FocusControl

EnhancedFocusControl extends the functionality provided by FocusControl to provide more functionality over the camera focus.

Sample Code

 Player player = javax.microedition.media.Manager.createPlayer( "capture://video?encoding=image/jpeg" );
 EnhancedFocusControl efc = (EnhancedFocusControl) player.getControl("net.rim.device.api.amms.control.camera.EnhancedFocusControl");
 

Since:
BlackBerry API 6.0.0

Field Summary
 
Fields inherited from interface javax.microedition.amms.control.camera.FocusControl
AUTO, AUTO_LOCK, NEXT, PREVIOUS, UNKNOWN
 
Method Summary
 boolean isAutoFocusLocked()
          Returns whether or not the autofocus is locked.
 void startAutoFocus()
          Locks the camera autofocus.
 void stopAutoFocus()
          Unlocks the camera autofocus.
 
Methods inherited from interface javax.microedition.amms.control.camera.FocusControl
getFocus, getFocusSteps, getMacro, getMinFocus, isAutoFocusSupported, isMacroSupported, isManualFocusSupported, setFocus, setMacro
 



Method Detail

startAutoFocus

void startAutoFocus()
                    throws MediaException
Locks the camera autofocus. The camera viewfinder will remain focused until EnhancedFocusControl.stopAutoFocus() is called, until a picture is taken (via burst shooting with a SnapshotControl or a call to VideoControl.getSnapshot(String)), or until the viewfinder is stopped or closed. If the autofocus is already locked, this method does nothing.

Throws:
UnsupportedOperationException - If autofocus is not supported.
MediaException - If locking the autofocus fails.
Since:
BlackBerry API 6.0.0

stopAutoFocus

void stopAutoFocus()
                   throws MediaException
Unlocks the camera autofocus. If the focus is unlocked, this method does nothing. Note that taking a picture when the focus is unlocked will still lock focus momentarily to capture the image.

Throws:
MediaException - If unlocking the autofocus fails.
Since:
BlackBerry API 6.0.0

isAutoFocusLocked

boolean isAutoFocusLocked()
Returns whether or not the autofocus is locked.

Returns:
true if autofocus is locked, false otherwise.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.