public class MonthDisplayHelper extends Object
Constructor and Description |
---|
MonthDisplayHelper(int year,
int month) |
MonthDisplayHelper(int year,
int month,
int weekStartDay) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnOf(int day) |
int |
getDayAt(int row,
int column) |
int[] |
getDigitsForRow(int row) |
int |
getFirstDayOfMonth() |
int |
getMonth() |
int |
getNumberOfDaysInMonth() |
int |
getOffset() |
int |
getRowOf(int day) |
int |
getWeekStartDay() |
int |
getYear() |
boolean |
isWithinCurrentMonth(int row,
int column) |
void |
nextMonth()
Increment the month.
|
void |
previousMonth()
Decrement the month.
|
public MonthDisplayHelper(int year, int month, int weekStartDay)
year
- The year.month
- The month.weekStartDay
- What day of the week the week should start.public MonthDisplayHelper(int year, int month)
public int getYear()
public int getMonth()
public int getWeekStartDay()
public int getFirstDayOfMonth()
Calendar.SUNDAY
.public int getNumberOfDaysInMonth()
public int getOffset()
public int[] getDigitsForRow(int row)
row
- Which row (0-5).public int getDayAt(int row, int column)
row
- The row, 0-5, starting from the top.column
- The column, 0-6, starting from the left.public int getRowOf(int day)
public int getColumnOf(int day)
public void previousMonth()
public void nextMonth()
public boolean isWithinCurrentMonth(int row, int column)