App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
mhr.appandroid.views.LabelledSeekBar.ExponencialTranslator Class Reference
Inheritance diagram for mhr.appandroid.views.LabelledSeekBar.ExponencialTranslator:

## Public Member Functions
| ExponencialTranslator ()
float | getValue ()
void | setValue (float v)

## Detailed Description

Definition at line 46 of file LabelledSeekBar.java.

## Constructor & Destructor Documentation

mhr.appandroid.views.LabelledSeekBar.ExponencialTranslator.ExponencialTranslator | ( |  | ) |
| inline

Definition at line 50 of file LabelledSeekBar.java.

{
factor = (max - min);
baseFactor = factor / base;
}

## Member Function Documentation

float mhr.appandroid.views.LabelledSeekBar.ExponencialTranslator.getValue | ( |  | ) |
| inline

Implements mhr.appandroid.views.LabelledSeekBar.SBValueTranslator.

Definition at line 56 of file LabelledSeekBar.java.

{
// return (float) (factor * (Math.pow(2.0, valueSB.getProgress() / (double) count) - 1) + min);
return (float) (factor * ((Math.pow(base, valueSB.getProgress() / (double) count) - 1) / base) + min);
}

void mhr.appandroid.views.LabelledSeekBar.ExponencialTranslator.setValue | ( | float | v | ) |
| inline

Implements mhr.appandroid.views.LabelledSeekBar.SBValueTranslator.

Definition at line 62 of file LabelledSeekBar.java.

{
// valueSB.setProgress((int) Math.round(count * (Math.log((v + factor - min) / factor) / Math.log(2))));
valueSB.setProgress((int) Math.round(count * (Math.log((v + baseFactor - min) / baseFactor) / Math.log(base))));
}

The documentation for this class was generated from the following file:

- /home/xxx/eclipse_workspaces/app/appandroid/src/mhr/appandroid/views/LabelledSeekBar.java