Lines Matching refs:Event
22 // This is the space from the grid line to the event rectangle.
46 // Computes the rectangle coordinates of the given event on the screen.
48 public boolean computeEventRect(int date, int left, int top, int cellWidth, Event event) {
49 if (event.drawAsAllday()) {
54 int startDay = event.startDay;
55 int endDay = event.endDay;
61 int startTime = event.startTime;
62 int endTime = event.endTime;
64 // If the event started on a previous day, then show it starting
70 // If the event ends on a future day, then show it extending to
76 int col = event.getColumn();
77 int maxCols = event.getMaxColumns();
87 event.top = top;
88 event.top += (int) (startTime * cellMinuteHeight);
89 event.top += startHour * mHourGap;
91 event.bottom = top;
92 event.bottom += (int) (endTime * cellMinuteHeight);
93 event.bottom += endHour * mHourGap - 1;
96 if (event.bottom < event.top + mMinEventHeight) {
97 event.bottom = event.top + mMinEventHeight;
101 event.left = left + col * (colWidth + mCellMargin);
102 event.right = event.left + colWidth;
107 * Returns true if this event intersects the selection region.
109 boolean eventIntersectsSelection(Event event, Rect selection) {
110 if (event.left < selection.right && event.right >= selection.left
111 && event.top < selection.bottom && event.bottom >= selection.top) {
118 * Computes the distance from the given point to the given event.
120 float pointToEvent(float x, float y, Event event) {
121 float left = event.left;
122 float right = event.right;
123 float top = event.top;
124 float bottom = event.bottom;
130 // x,y is inside the event rectangle
133 // x,y is below the event rectangle
136 // x,y is above the event rectangle
152 // x,y is to the right of the event rectangle
167 // x,y is to the left of the event rectangle