|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.configuration.Config
com.livescribe.configuration.SystemConfig
public class SystemConfig
This class provides the ability to access and modify system configuration values.
Certain properties can be set by any application and others can only be set by the system. If a property is disallowed from being set then that set method (currently) will do nothing.
| Field Summary | |
|---|---|
static int |
DEFAULT_COORDINATE_FREQUENCY_DIVIDER
The default frequency divider when streaming coordinates. |
static Object |
DEFAULT_VALUE_AUDIO_MUTED
Object to maintain the system default value (on/off) for audio mute. |
static Object |
DEFAULT_VALUE_AUDIO_QUALITY
Object to maintain the system default value for audio quality. |
static Object |
DEFAULT_VALUE_AUDIO_VOLUME
Object to maintain the system default value for audio volume. |
static Object |
DEFAULT_VALUE_DATE_FORMAT
Object to maintain the system default value for date format. |
static Object |
DEFAULT_VALUE_DISPLAY_BRIGHTNESS
Object to maintain the system default value for display brightness. |
static Object |
DEFAULT_VALUE_DISPLAY_ORIENTATION
Object to maintain the system default value for display orientation. |
static Object |
DEFAULT_VALUE_LAUNCHLINE
Object to maintain the system default value (on/off) for LaunchLine. |
static Object |
DEFAULT_VALUE_MIC_SENSITIVITY
Object to maintain the system default value for microphone sensitivity. |
static Object |
DEFAULT_VALUE_PLAYBACK_LATENCY
Object to maintain the system default value (on/off) for playback latency. |
static Object |
DEFAULT_VALUE_SCROLL_SPEED
Object to maintain the system default value for scroll speed. |
static Object |
DEFAULT_VALUE_TIME_FORMAT
Object to maintain the system default value for date format. |
static Object |
DEFAULT_VALUE_VOICE_MENUS
Object to maintain the system default value (on/off) for voice menus. |
protected static Hashtable |
DEFAULT_VALUES
Hashtable to maintain the system default values. |
protected Locale |
locale
Contains the current locale. |
static String |
PROPERTY_BOOL_AUDIO_MUTED
String to query the current value for audio mute on/off |
static String |
PROPERTY_BOOL_DISPLAY_ORIENTATION
String to query the current value for display orientation. |
static String |
PROPERTY_BOOL_LAUNCHLINE
String to query the current value (on/off) for LaunchLine. |
static String |
PROPERTY_BOOL_PLAYBACK_LATENCY
String to query the current value (on/off) for playback latency. |
static String |
PROPERTY_BOOL_VOICE_MENUS
String to query the current value for voice menus on/off. |
static String |
PROPERTY_BYTE_AUDIO_QUALITY
String to query the current value for audio quality. |
static String |
PROPERTY_BYTE_AUDIO_VOLUME
String to query the current value for audio volume. |
static String |
PROPERTY_BYTE_DATE_FORMAT
String to query the current value for date format |
static String |
PROPERTY_BYTE_DISPLAY_BRIGHTNESS
String to query the current value for display brightness. |
static String |
PROPERTY_BYTE_MIC_SENSITIVITY
String to query the current value for microphone sensitivity. |
static String |
PROPERTY_BYTE_TIME_FORMAT
String to query the current value for time format |
static String |
PROPERTY_LONG_SCROLL_SPEED
String to query the current value for scroll speed. |
static String |
PROPERTY_STRING_FWVERSION
String to query the current firmware version number. |
static String |
PROPERTY_STRING_LOCALE
String to query the current value for the system locale. |
static String |
PROPERTY_STRING_PEN_NAME
Pen property: Pen name. |
static byte |
VALUE_AUDIO_QUALITY_HIGH
Constant representing high quality audio. |
static byte |
VALUE_AUDIO_QUALITY_LOW
Constant representing low quality audio. |
static byte |
VALUE_AUDIO_QUALITY_MEDIUM
Constant representing medium quality audio. |
static byte |
VALUE_DATE_FORMAT_DDMMYY
Constant representing date format of DD.MM.YY (European-like) |
static byte |
VALUE_DATE_FORMAT_MMDDYY
Constant representing date format of MM.DD.YY (US-like) |
static byte |
VALUE_MIC_SENSITIVITY_AUTO
Constant representing auto microphone sensitivity. |
static byte |
VALUE_MIC_SENSITIVITY_HIGH
Constant representing high microphone sensitivity. |
static byte |
VALUE_MIC_SENSITIVITY_LOW
Constant representing low microphone sensitivity. |
| Fields inherited from class com.livescribe.configuration.Config |
|---|
VALUE_BOOLEAN, VALUE_DOUBLE, VALUE_LONG, VALUE_STRING |
| Constructor Summary | |
|---|---|
protected |
SystemConfig()
|
| Method Summary | |
|---|---|
void |
changeDisplayBrightness(short brightness)
Sets the brightness of the smartpen display. |
void |
enableLaunchLine(boolean value)
Sets LaunchLine on/off. |
int |
getAudioBitrate()
Returns the audio bitrate, based on the audio quality and the binaural mode. |
byte |
getAudioQuality()
Returns the system audio quality setting. |
byte |
getAudioVolume()
Returns the system volume. |
int |
getAutoPowerOffTime()
Gets the automatic power-off time, in seconds. |
int |
getBatteryLevel()
Returns the current level of charge of the battery. |
boolean |
getBooleanValue(String property)
Gets the value of the specified property as a boolean. |
byte |
getByteValue(String property)
|
int |
getCoordinateFrequencyDivider()
Gets the current value for the coordinate streaming frequency divider. |
byte |
getDateFormat()
Returns the system date format setting. |
byte |
getDisplayBrightness()
Returns the brightness of the smartpen display. |
boolean |
getDisplayOrientation()
Returns whether the smartpen display currently has left-handed display orientation. |
double |
getDoubleValue(String property)
Gets the value of the specified property as a double. |
int |
getFailedCoordinateCount()
Gets the total number of failed coordinates since the pen was turned on. |
int |
getFileSystemAvailableSize()
Returns the available space on the smartpen file system. |
long |
getFileSystemAvailableSize64()
|
int |
getFileSystemTotalSize()
Returns the total size of the smartpen file system, both used and unused. |
long |
getFileSystemTotalSize64()
|
String |
getFirmwareVersion()
Returns the system firmware version. |
static SystemConfig |
getInstance()
|
static long |
getInternalTime()
Returns the system time. |
Locale |
getLocale()
Returns the current locale. |
long |
getLongValue(String property)
Gets the value of the specified property as a long. |
byte |
getMicSensitivity()
Returns the microphone sensitivity. |
String |
getPenName()
Returns the pen name |
int |
getRawBatteryVoltage()
Returns the raw battery voltage. |
int |
getRecordingAvailableSize()
Gets the available space to store new audio recordings. |
long |
getRecordingAvailableSize64()
|
long |
getScrollSpeed()
Returns the system scroll speed. |
String |
getStringValue(String property)
Gets the value of the specified property as a string. |
int |
getSuccessfulCoordinateCount()
Gets the total number of successful coordinates since the pen was turned on. |
static Locale[] |
getSupportedLocales()
Returns the list of locales support by the system. |
byte |
getTimeFormat()
Returns the system time format setting. |
long |
getTimeOfDay()
Deprecated. use {System.currentTimeMillis} |
boolean |
getVoiceMenus()
Returns the state of voice menus (on/off). |
boolean |
isHeadPhonesPluggedIn()
Indicates if the headphones are plugged in. |
boolean |
isLaunchLineEnabled()
Determines if LaunchLine is enabled. |
boolean |
isMicsPluggedIn()
Indicates if the binaural microphones are plugged in. |
boolean |
isMuted()
Determines if system audio is muted. |
boolean |
isSystemTimeSet()
Returns the state of the system time (set/unset) |
void |
setAudioQuality(byte quality)
Sets the audio quality (low/high/medium). |
void |
setAutoPowerOffTime(int time)
Sets the automatic power-off time. |
void |
setBooleanValue(String property,
boolean value)
This method does nothing because applications cannot change the system configuration. |
protected void |
setByteValue(String property,
byte value)
This method does nothing. |
void |
setCoordinateFrequencyDivider(int divider)
Sets the coordinate streaming frequency divider. |
void |
setDateFormat(byte format)
Sets the system date format. |
void |
setDisplayBrightness(byte percent)
Sets brightness of the smartpen display. |
void |
setDisplayOrientation(boolean leftHanded)
Sets the display orientation. |
void |
setDoubleValue(String property,
double value)
This method does nothing because applications cannot change the system configuration. |
void |
setHoverModeEnabled(boolean flag)
Turns hover mode on or off. |
void |
setLocale(Locale locale)
Sets the system's locale. |
void |
setLongValue(String property,
long value)
This method does nothing because applications cannot change the system configuration. |
void |
setMicSensitivity(byte sensitivity)
Sets the microphone sensitivity (low/high/auto). |
void |
setMute(boolean on)
Sets system mute on/off. |
void |
setScrollSpeed(long value)
Sets the scroll speed. |
void |
setStringValue(String property,
String value)
This method does nothing because applications cannot change the system configuration. |
void |
setTimeFormat(byte format)
Sets the system time format. |
void |
setTimeOfDay(long value)
This method does nothing because applications cannot change the system time. |
void |
setVoiceMenus(boolean on)
Sets voice menus on/off. |
void |
setVolume(byte percent)
Sets the system volume |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte VALUE_AUDIO_QUALITY_LOW
public static final byte VALUE_AUDIO_QUALITY_MEDIUM
public static final byte VALUE_AUDIO_QUALITY_HIGH
public static final byte VALUE_MIC_SENSITIVITY_LOW
public static final byte VALUE_MIC_SENSITIVITY_HIGH
public static final byte VALUE_MIC_SENSITIVITY_AUTO
public static final byte VALUE_DATE_FORMAT_MMDDYY
public static final byte VALUE_DATE_FORMAT_DDMMYY
public static final String PROPERTY_BOOL_DISPLAY_ORIENTATION
String to query the current value for display orientation.
public static final String PROPERTY_LONG_SCROLL_SPEED
String to query the current value for scroll speed.
public static final String PROPERTY_BOOL_VOICE_MENUS
String to query the current value for voice menus on/off.
public static final String PROPERTY_STRING_FWVERSION
String to query the current firmware version number.
public static final String PROPERTY_STRING_PEN_NAME
public static final String PROPERTY_BYTE_DISPLAY_BRIGHTNESS
String to query the current value for display brightness.
public static final String PROPERTY_BYTE_AUDIO_QUALITY
String to query the current value for audio quality.
public static final String PROPERTY_BYTE_MIC_SENSITIVITY
String to query the current value for microphone sensitivity.
public static final String PROPERTY_BYTE_AUDIO_VOLUME
String to query the current value for audio volume.
public static final String PROPERTY_BYTE_DATE_FORMAT
String to query the current value for date format
public static final String PROPERTY_BYTE_TIME_FORMAT
String to query the current value for time format
public static final String PROPERTY_BOOL_AUDIO_MUTED
String to query the current value for audio mute on/off
public static final String PROPERTY_BOOL_PLAYBACK_LATENCY
String to query the current value (on/off) for playback latency.
public static final String PROPERTY_STRING_LOCALE
String to query the current value for the system locale.
public static final String PROPERTY_BOOL_LAUNCHLINE
String to query the current value (on/off) for LaunchLine.
public static final Object DEFAULT_VALUE_DISPLAY_ORIENTATION
Object to maintain the system default value for display orientation.
public static final Object DEFAULT_VALUE_SCROLL_SPEED
Object to maintain the system default value for scroll speed.
public static final Object DEFAULT_VALUE_VOICE_MENUS
Object to maintain the system default value (on/off) for voice menus.
public static final Object DEFAULT_VALUE_DISPLAY_BRIGHTNESS
Object to maintain the system default value for display brightness.
public static final Object DEFAULT_VALUE_AUDIO_QUALITY
Object to maintain the system default value for audio quality.
public static final Object DEFAULT_VALUE_MIC_SENSITIVITY
Object to maintain the system default value for microphone sensitivity.
public static final Object DEFAULT_VALUE_AUDIO_VOLUME
Object to maintain the system default value for audio volume.
public static final Object DEFAULT_VALUE_DATE_FORMAT
Object to maintain the system default value for date format.
public static final Object DEFAULT_VALUE_TIME_FORMAT
Object to maintain the system default value for date format.
public static final Object DEFAULT_VALUE_AUDIO_MUTED
Object to maintain the system default value (on/off) for audio mute.
public static final Object DEFAULT_VALUE_PLAYBACK_LATENCY
Object to maintain the system default value (on/off) for playback latency.
public static final Object DEFAULT_VALUE_LAUNCHLINE
Object to maintain the system default value (on/off) for LaunchLine.
protected static Hashtable DEFAULT_VALUES
public static final int DEFAULT_COORDINATE_FREQUENCY_DIVIDER
protected Locale locale
| Constructor Detail |
|---|
protected SystemConfig()
| Method Detail |
|---|
public static SystemConfig getInstance()
public void setDisplayOrientation(boolean leftHanded)
leftHanded - true if the display should orient for a
left handed user; false for a right handed user.public void setScrollSpeed(long value)
value - long value ranging from 0 to 10.public void setVoiceMenus(boolean on)
on - boolean value. true to enable voice menus ;
false to disable voice menus.public void setDisplayBrightness(byte percent)
percent - byte value greater than 0. If greater than 100, this
sets the value to 100, and then calls
changeDisplayBrightness(short)public void setAudioQuality(byte quality)
quality - byte. Value is: VALUE_AUDIO_QUALITY_LOW,
VALUE_AUDIO_QUALITY_MEDIUM, or VALUE_AUDIO_QUALITY_HIGH.
java.lang.IllegalStateException - if recording is in progresspublic void setDateFormat(byte format)
DATE_*
constants in Formatter.
format - the new format valueFormatterpublic void setTimeFormat(byte format)
TIME_*
constants in Formatter.
format - the new format valueFormatterpublic void setMicSensitivity(byte sensitivity)
sensitivity - byte. Value is: VALUE_MIC_SENSITIVITY_LOW,
VALUE_MIC_SENSITIVITY_HIGH, or VALUE_MIC_SENSITIVITY_AUTO.
java.lang.IllegalStateException - if recording is in progresspublic void setVolume(byte percent)
percent - byte value ranging from 0 to 100.public void setMute(boolean on)
on - boolean value true if audio is to be muted
and false if audio is to be not muted.public void enableLaunchLine(boolean value)
value - boolean value true if LaunchLine is to be enabled
and false if LaunchLine is to be disabled.public long getTimeOfDay()
public int getAutoPowerOffTime()
setAutoPowerOffTime(int)public void setAutoPowerOffTime(int time)
time - the new automatic power-off time, in secondsgetAutoPowerOffTime()public static long getInternalTime()
public boolean isSystemTimeSet()
true if system time set;
false if system time is not set.public boolean getDisplayOrientation()
true if left handed orientation;
false if right handed orientation.public boolean getVoiceMenus()
true if voice menus are enabled;
false if voice menus are not enabled.public long getScrollSpeed()
public String getFirmwareVersion()
String representing the firmware version.public String getPenName()
String representing the pen name.public byte getDisplayBrightness()
public final int getAudioBitrate()
public final boolean isMuted()
true if system audio is muted;
false if system audio is not muted.public final boolean isLaunchLineEnabled()
true if LaunchLine is enabled;
false if LaunchLine is disabled.public final byte getAudioVolume()
public byte getAudioQuality()
public byte getDateFormat()
Formatter.formatDateTime(Calendar, int) method.
Formatter.Formatter.formatDateTime(Calendar, int)public byte getTimeFormat()
Formatter.formatDateTime(Calendar, int) method.
Formatter.Formatter.formatDateTime(Calendar, int)public byte getMicSensitivity()
public Locale getLocale()
Locale object representing current locale.public void setLocale(Locale locale)
locale - a Locale object. If the value of locale
null, the method returns without doing anything.public static Locale[] getSupportedLocales()
Locale objects, one for each locale supported.public byte getByteValue(String property)
public boolean getBooleanValue(String property)
Configboolean. It
is up to the implementation to decide what to do if the specified
property name is null, if the property does not exist, or
if the value cannot be represented as a boolean.
getBooleanValue in class Configproperty - the property name
boolean.public String getStringValue(String property)
Confignull, if the property does not exist, or
if the value cannot be represented as a string.
getStringValue in class Configproperty - the property name
public long getLongValue(String property)
Configlong. It
is up to the implementation to decide what to do if the specified
property name is null, if the property does not exist, or
if the value cannot be represented as a long.
getLongValue in class Configproperty - the property name
long.public double getDoubleValue(String property)
Configdouble. It
is up to the implementation to decide what to do if the specified
property name is null, if the property does not exist, or
if the value cannot be represented as a double.
getDoubleValue in class Configproperty - the property name
double.public int getRecordingAvailableSize()
public long getRecordingAvailableSize64()
public int getFileSystemAvailableSize()
public long getFileSystemAvailableSize64()
public int getFileSystemTotalSize()
public long getFileSystemTotalSize64()
public int getRawBatteryVoltage()
public int getBatteryLevel()
public void setTimeOfDay(long value)
value - unused
public void setLongValue(String property,
long value)
setLongValue in class Configvalue - unusedproperty - the property name
public void setDoubleValue(String property,
double value)
setDoubleValue in class Configvalue - unusedproperty - the property name
public void setBooleanValue(String property,
boolean value)
setBooleanValue in class Configvalue - unusedproperty - the property name
public void setStringValue(String property,
String value)
setStringValue in class Configvalue - unusedproperty - the property name
protected void setByteValue(String property,
byte value)
property - unusedvalue - unusedpublic void changeDisplayBrightness(short brightness)
setDisplayBrightness(byte).
brightness - short value ranging from 0 to 100public boolean isMicsPluggedIn()
true if the mics are plugged in and
false otherwise.public boolean isHeadPhonesPluggedIn()
true if the head phones are plugged in and
false otherwise.public int getFailedCoordinateCount()
int nSucc = config.getSuccessfulCoordinateCount(); int nFail = config.getFailedCoordinateCount(); float perf = 100.0f * (float)nSuc / (float)( nSucc + nFail );
getSuccessfulCoordinateCount()public int getSuccessfulCoordinateCount()
getFailedCoordinateCount()public void setHoverModeEnabled(boolean flag)
flag - whether to enable or disable hover modeCoordinateListenerpublic void setCoordinateFrequencyDivider(int divider)
The values are as follows:
| Divider Value | Frequency (coordinates/s) |
|---|---|
| 1 | 75 |
| 2 | 37.5 |
| 3 | 25 |
| 4 | 18.75 |
| 5 | 15 |
Values ≤ zero are considered to be 1. Higher values will work as expected.
The default value is 4.
divider - the new divider valueCoordinateListener,
DEFAULT_COORDINATE_FREQUENCY_DIVIDERpublic int getCoordinateFrequencyDivider()
setCoordinateFrequencyDivider(int)
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||