kankan.wheel.widget.adapters
Class NumericWheelAdapter

java.lang.Object
  extended by kankan.wheel.widget.adapters.AbstractWheelAdapter
      extended by kankan.wheel.widget.adapters.AbstractWheelTextAdapter
          extended by kankan.wheel.widget.adapters.NumericWheelAdapter
All Implemented Interfaces:
WheelViewAdapter

public class NumericWheelAdapter
extends AbstractWheelTextAdapter

Numeric Wheel adapter.


Field Summary
static int DEFAULT_MAX_VALUE
          The default min value
private static int DEFAULT_MIN_VALUE
          The default max value
private  java.lang.String format
           
private  int maxValue
           
private  int minValue
           
 
Fields inherited from class kankan.wheel.widget.adapters.AbstractWheelTextAdapter
context, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_SIZE, emptyItemResourceId, inflater, itemResourceId, itemTextResourceId, LABEL_COLOR, NO_RESOURCE, TEXT_VIEW_ITEM_RESOURCE
 
Constructor Summary
NumericWheelAdapter(Context context)
          Constructor
NumericWheelAdapter(Context context, int minValue, int maxValue)
          Constructor
NumericWheelAdapter(Context context, int minValue, int maxValue, java.lang.String format)
          Constructor
 
Method Summary
 int getItemsCount()
          Gets items count
 java.lang.CharSequence getItemText(int index)
          Returns text for specified item
 
Methods inherited from class kankan.wheel.widget.adapters.AbstractWheelTextAdapter
configureTextView, getEmptyItem, getEmptyItemResource, getItem, getItemResource, getItemTextResource, getTextColor, getTextSize, setEmptyItemResource, setItemResource, setItemTextResource, setTextColor, setTextSize
 
Methods inherited from class kankan.wheel.widget.adapters.AbstractWheelAdapter
notifyDataChangedEvent, notifyDataInvalidatedEvent, registerDataSetObserver, unregisterDataSetObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_VALUE

public static final int DEFAULT_MAX_VALUE
The default min value

See Also:
Constant Field Values

DEFAULT_MIN_VALUE

private static final int DEFAULT_MIN_VALUE
The default max value

See Also:
Constant Field Values

minValue

private int minValue

maxValue

private int maxValue

format

private java.lang.String format
Constructor Detail

NumericWheelAdapter

public NumericWheelAdapter(Context context)
Constructor

Parameters:
context - the current context

NumericWheelAdapter

public NumericWheelAdapter(Context context,
                           int minValue,
                           int maxValue)
Constructor

Parameters:
context - the current context
minValue - the wheel min value
maxValue - the wheel max value

NumericWheelAdapter

public NumericWheelAdapter(Context context,
                           int minValue,
                           int maxValue,
                           java.lang.String format)
Constructor

Parameters:
context - the current context
minValue - the wheel min value
maxValue - the wheel max value
format - the format string
Method Detail

getItemText

public java.lang.CharSequence getItemText(int index)
Description copied from class: AbstractWheelTextAdapter
Returns text for specified item

Specified by:
getItemText in class AbstractWheelTextAdapter
Parameters:
index - the item index
Returns:
the text of specified items

getItemsCount

public int getItemsCount()
Description copied from interface: WheelViewAdapter
Gets items count

Returns:
the count of wheel items