Build 1.0_r1(from source)

android.util
Class DayOfMonthCursor

java.lang.Object
  extended by android.util.MonthDisplayHelper
      extended by android.util.DayOfMonthCursor

public class DayOfMonthCursor
extends MonthDisplayHelper

Helps control and display a month view of a calendar that has a current selected day.

This should be used by anyone who presents a month view to users and wishes to behave consistently with other widgets and apps; if we ever change our mind about when to flip the month, we can change it here only.


Constructor Summary
DayOfMonthCursor(int year, int month, int dayOfMonth, int weekStartDay)
           
 
Method Summary
 boolean down()
          Move down one box, potentially flipping to the next month.
 int getSelectedColumn()
           
 int getSelectedDayOfMonth()
           
 int getSelectedRow()
           
 boolean isSelected(int row, int column)
           
 boolean left()
          Move left one box, potentially flipping to the previous month.
 boolean right()
          Move right one box, potentially flipping to the next month.
 void setSelectedDayOfMonth(int dayOfMonth)
           
 void setSelectedRowColumn(int row, int col)
           
 boolean up()
          Move up one box, potentially flipping to the previous month.
 
Methods inherited from class android.util.MonthDisplayHelper
getColumnOf, getDayAt, getDigitsForRow, getFirstDayOfMonth, getMonth, getNumberOfDaysInMonth, getOffset, getRowOf, getWeekStartDay, getYear, isWithinCurrentMonth, nextMonth, previousMonth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DayOfMonthCursor

public DayOfMonthCursor(int year,
                        int month,
                        int dayOfMonth,
                        int weekStartDay)
Parameters:
year - The initial year.
month - The initial month.
dayOfMonth - The initial dayOfMonth.
weekStartDay - What dayOfMonth of the week the week should start, in terms of Calendar constants such as Calendar.SUNDAY.
Method Detail

getSelectedRow

public int getSelectedRow()

getSelectedColumn

public int getSelectedColumn()

setSelectedRowColumn

public void setSelectedRowColumn(int row,
                                 int col)

getSelectedDayOfMonth

public int getSelectedDayOfMonth()

setSelectedDayOfMonth

public void setSelectedDayOfMonth(int dayOfMonth)

isSelected

public boolean isSelected(int row,
                          int column)

up

public boolean up()
Move up one box, potentially flipping to the previous month.

Returns:
Whether the month was flipped to the previous month due to the move.

down

public boolean down()
Move down one box, potentially flipping to the next month.

Returns:
Whether the month was flipped to the next month due to the move.

left

public boolean left()
Move left one box, potentially flipping to the previous month.

Returns:
Whether the month was flipped to the previous month due to the move.

right

public boolean right()
Move right one box, potentially flipping to the next month.

Returns:
Whether the month was flipped to the next month due to the move.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature