Class Overview
Helps answer common questions that come up when displaying a month in a
6 row calendar grid format.
Not thread safe.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Constructors
public
MonthDisplayHelper
(int year, int month, int weekStartDay)
Parameters
year
| The year. |
month
| The month. |
weekStartDay
| What day of the week the week should start.
|
public
MonthDisplayHelper
(int year, int month)
Public Methods
public
int
getColumnOf
(int day)
public
int
getDayAt
(int row, int column)
Parameters
row
| The row, 0-5, starting from the top. |
column
| The column, 0-6, starting from the left. |
Returns
- The day at a particular row, column
public
int[]
getDigitsForRow
(int row)
Returns
- the digits of the month to display in one
of the 6 rows of a calendar month display.
public
int
getFirstDayOfMonth
()
Returns
- The first day of the month using a constants such as
SUNDAY
.
public
int
getNumberOfDaysInMonth
()
Returns
- The number of days in the month.
public
int
getOffset
()
Returns
- The offset from displaying everything starting on the very first
box. For example, if the calendar is set to display the first day of
the week as Sunday, and the month starts on a Wednesday, the offset is 3.
public
int
getRowOf
(int day)
public
int
getWeekStartDay
()
public
boolean
isWithinCurrentMonth
(int row, int column)
Returns
- Whether the row and column fall within the month.
public
void
previousMonth
()