|
JSR-234 1.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FocusControl
FocusControl
controls the focus of the camera device.
Please note, that (optical) zooming might affect the focusing settings. See
ZoomControl.setOpticalZoom
for details.
Field Summary | |
---|---|
static int |
AUTO
Autofocus. |
static int |
AUTO_LOCK
Locks the autofocus. |
static int |
NEXT
Moves the setting to the next supported level. |
static int |
PREVIOUS
Moves the setting to the previous supported level. |
static int |
UNKNOWN
Unknown value. |
Method Summary | |
---|---|
int |
getFocus()
Returns the focus setting of the camera device. |
int |
getFocusSteps()
Tells how many steps the focus has. |
boolean |
getMacro()
Gets the current macro focus mode. |
int |
getMinFocus()
Returns the minimum focus distance supported (either manual or AUTO). |
boolean |
isAutoFocusSupported()
Returns true if the automatic focus is supported by being able to set AUTO as a parameter for the setFocus method. |
boolean |
isMacroSupported()
Returns true if the macro focus mode is supported. |
boolean |
isManualFocusSupported()
Returns true if the manual focus is supported by being able to set the distance (or NEXT or PREVIOUS or Integer.MAX_VALUE) with setFocus method. |
int |
setFocus(int distance)
Sets the focus distance. |
void |
setMacro(boolean enable)
Toggles the macro focus mode. |
Field Detail |
---|
static final int AUTO
static final int AUTO_LOCK
static final int NEXT
static final int PREVIOUS
static final int UNKNOWN
Method Detail |
---|
int setFocus(int distance) throws javax.microedition.media.MediaException
distance
- in millimeters orAUTO
for autofocus orAUTO_LOCK
for locking the autofocus orInterger.MAX_VALUE
for focus to infinity orNEXT
for next supported distance (further from the camera) orPREVIOUS
for previous supported distance (closer to the camera).
Setting a value other than AUTO
, AUTO_LOCK
or Integer.MAX_VALUE
might
be rounded to the closest distance supported.
If the current focus setting is other than AUTO
then setFocus(AUTO_LOCK)
will not affect anything.
If the current focus setting is AUTO
and either setFocus(PREVIOUS)
or
setFocus(NEXT)
is called then focus is set to previous or next supported distance, respectively,
and automatic focus is turned off.
Integer.MAX_VALUE
for infinity
javax.microedition.media.MediaException
- if the given focus setting is not supportedisManualFocusSupported()
,
isAutoFocusSupported()
int getFocus()
Integer.MAX_VALUE
for focus to infinity
or UNKNOWN if the focus setting is unknown.int getMinFocus()
int getFocusSteps()
boolean isManualFocusSupported()
true
if the manual focus is supported,
false
otherwiseboolean isAutoFocusSupported()
setFocus
method.
true
if the automatic focus is supported,
false
otherwiseboolean isMacroSupported()
true
if the macro focus is supported,
false
otherwisevoid setMacro(boolean enable) throws javax.microedition.media.MediaException
Toggles the macro focus mode. With this mode on, you can focus closer to the camera compared to a normal focusing mode. On the contrary, the range of available optical zoom settings might be more limited in the macro mode.
Please note, that this method might affect all optical
zoom settings in the ZoomControl
.
This method might also change all the settings
in this FocusControl
.
enable
- true
to turn the macro mode on,
false
to turn it off
javax.microedition.media.MediaException
- if the given mode is not supportedboolean getMacro()
true
if the macro focus is enabled,
false
otherwise
|
JSR-234 1.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |