public class CalendarScrollManager extends CalendarElement
BOTTOM, CENTER, CENTER_HORIZONTAL, CENTER_VERTICAL, LEFT, RIGHT, TOP
Constructor and Description |
---|
CalendarScrollManager(RadCalendarView owner)
Creates a new instance of the
CalendarScrollManager class. |
Modifier and Type | Method and Description |
---|---|
void |
arrange(int left,
int top,
int right,
int bottom)
Used to arrange the current element instance according to the given dimensions.
|
CalendarFragment |
currentFragment()
The current or center fragment.
|
int |
currentSnapOffsetX()
Calculates the current offset along the x axis that needs to be addressed so that the appropriate fragment according to the current scroll mode snaps to the screen.
|
int |
currentSnapOffsetY()
Calculates the current offset along the y axis that needs to be addressed so that the appropriate fragment according to the current scroll mode snaps to the screen.
|
long |
getActiveDate()
Gets the current active date.
|
CalendarCell |
getCellForDate(long date)
Returns an instance of the
CalendarCell class representing the date cell
for the provided Long date. |
List<CalendarCell> |
getCellsAtLocation(int x,
int y)
Returns a collection of cells that are located at a specific coordinates.
|
int |
getMaxScrollOffset()
Deprecated.
|
CalendarFragment |
nextFragment()
The fragment that comes after the current fragment.
|
void |
onDateChanged()
Used to update the manager after the display date of the owning calendar has been changed.
|
void |
onSnapComplete()
Handles the update of the fragments after snapping to the screen.
|
void |
postRender(Canvas canvas)
This method is called after calling the
CalendarElement.render(android.graphics.Canvas) method. |
CalendarFragment |
previousFragment()
The fragment that comes before the current fragment.
|
void |
render(Canvas canvas)
This method is called at onDraw() call from the main calendar view instance and is used for drawing all custom elements building the calendar structure.
|
void |
reset()
Used to reset all the fragments of the manager.
|
void |
reset(boolean force)
Used to reset all the fragments of the manager in either forced or normal mode.
|
boolean |
scroll(int offsetX,
int offsetY)
Scrolls the fragment with a specified offset according to the current position and the current scroll mode.
|
void |
setActiveDate(long activeDate)
Gets the current active date.
|
void |
setMaxScrollOffset(int maxScrollOffset)
Deprecated.
|
void |
updateActiveFragment()
Used to update the active state of the fragment.
|
void |
updateDecorations() |
void |
updateEventsForFragments()
Used to update the events of the calendar fragments.
|
calcBorderRect, getAlpha, getBackgroundColorDisabled, getBackgroundColorEnabled, getBitmap, getBitmapPosition, getBottom, getHeight, getLeft, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getRight, getTop, getVirtualOffsetX, getVirtualOffsetY, getVisibility, getWidth, isEnabled, pointIsInsideElement, setAlpha, setBackgroundColor, setBackgroundColorDisabled, setBackgroundColorEnabled, setBitmap, setBitmapPosition, setEnabled, setPadding, setPaddingHorizontal, setPaddingVertical, setParent, setVirtualOffsets, setVirtualOffsetX, setVirtualOffsetY, setVisibility, translate, virtualBottom, virtualLeft, virtualRight, virtualTop, virtualTranslate
public CalendarScrollManager(RadCalendarView owner)
CalendarScrollManager
class.owner
- the calendar view instance that owns this instance.public int getMaxScrollOffset()
public void setMaxScrollOffset(int maxScrollOffset)
maxScrollOffset
- the new max scroll offset.public long getActiveDate()
public void setActiveDate(long activeDate)
updateActiveFragment()
will be made, so that the change
can be completed.activeDate
- the new active date.public CalendarFragment currentFragment()
public CalendarFragment nextFragment()
public CalendarFragment previousFragment()
public void arrange(int left, int top, int right, int bottom)
CalendarElement
arrange
in class CalendarElement
left
- the left border.top
- the top border.right
- the right border.bottom
- the bottom border.public CalendarCell getCellForDate(long date)
CalendarCell
class representing the date cell
for the provided Long
date.date
- the date to return the cell for.CalendarCell
displaying the provided date.public List<CalendarCell> getCellsAtLocation(int x, int y)
x
- the x coordinate.y
- the y coordinate.public boolean scroll(int offsetX, int offsetY)
offsetX
- the offset along the x axis.offsetY
- the offset along the y axis.true
if scroll was performed, false
otherwise.public void onDateChanged()
public int currentSnapOffsetX()
public int currentSnapOffsetY()
public void reset()
CalendarFragment.reset()
public void reset(boolean force)
force
- true
if the reset should be forced, false
otherwise.CalendarFragment.reset()
public void updateActiveFragment()
public void render(Canvas canvas)
CalendarElement
render
in class CalendarElement
canvas
- the canvas of the main calendar view instance.public void postRender(Canvas canvas)
CalendarElement
CalendarElement.render(android.graphics.Canvas)
method.postRender
in class CalendarElement
canvas
- the canvas of the main calendar view instance.public void onSnapComplete()
public void updateEventsForFragments()
public void updateDecorations()