net.neurowork.mobile.android.fw.activities
Class CalendarView

java.lang.Object
  extended by android.view.View
      extended by android.widget.ImageView
          extended by net.neurowork.mobile.android.fw.activities.CalendarView
All Implemented Interfaces:
android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback

public class CalendarView
extends android.widget.ImageView


Nested Class Summary
 class CalendarView.GrayCell
           
static interface CalendarView.OnCellTouchListener
           
 class CalendarView.PushCell
           
 
Nested classes/interfaces inherited from class android.widget.ImageView
android.widget.ImageView.ScaleType
 
Nested classes/interfaces inherited from class android.view.View
android.view.View.BaseSavedState, android.view.View.MeasureSpec, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnFocusChangeListener, android.view.View.OnKeyListener, android.view.View.OnLongClickListener, android.view.View.OnTouchListener
 
Field Summary
 
Fields inherited from class android.view.View
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, VISIBLE
 
Constructor Summary
CalendarView(android.content.Context context)
           
CalendarView(android.content.Context context, android.util.AttributeSet attrs)
           
CalendarView(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
           
 
Method Summary
 boolean firstDay(int day)
           
 java.util.Calendar getDate()
           
 java.util.Map<java.lang.String,java.util.TreeSet<EventDataItem>> getEvents()
           
 int getMonth()
           
 int getYear()
           
 void goToday()
           
 boolean lastDay(int day)
           
 void nextMonth()
           
 void onLayout(boolean changed, int left, int top, int right, int bottom)
           
 boolean onTouchEvent(android.view.MotionEvent event)
           
 void previousMonth()
           
 void setEvents(java.util.Map<java.lang.String,java.util.TreeSet<EventDataItem>> events)
          Paint a collections of events in the calendar
 void setOnCellTouchListener(CalendarView.OnCellTouchListener p)
           
 void setTimeInMillis(long milliseconds)
           
 
Methods inherited from class android.widget.ImageView
clearColorFilter, getBaseline, getDrawable, getImageMatrix, getScaleType, invalidateDrawable, onCreateDrawableState, setAdjustViewBounds, setAlpha, setColorFilter, setColorFilter, setColorFilter, setImageBitmap, setImageDrawable, setImageLevel, setImageMatrix, setImageResource, setImageState, setImageURI, setMaxHeight, setMaxWidth, setScaleType, setSelected
 
Methods inherited from class android.view.View
addFocusables, addFocusables, addTouchables, bringToFront, buildDrawingCache, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, clearFocus, computeScroll, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBottom, getContentDescription, getContext, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getKeepScreenOn, getKeyDispatcherState, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getTag, getTag, getTop, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasFocus, hasFocusable, hasWindowFocus, inflate, invalidate, invalidate, invalidate, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onCheckIsTextEditor, onCreateInputConnection, onFinishTemporaryDetach, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayoutParams, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPadding, setPressed, setSaveEnabled, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setSoundEffectsEnabled, setTag, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarView

public CalendarView(android.content.Context context)

CalendarView

public CalendarView(android.content.Context context,
                    android.util.AttributeSet attrs)

CalendarView

public CalendarView(android.content.Context context,
                    android.util.AttributeSet attrs,
                    int defStyle)
Method Detail

getEvents

public java.util.Map<java.lang.String,java.util.TreeSet<EventDataItem>> getEvents()

onLayout

public void onLayout(boolean changed,
                     int left,
                     int top,
                     int right,
                     int bottom)
Overrides:
onLayout in class android.view.View

setTimeInMillis

public void setTimeInMillis(long milliseconds)

getYear

public int getYear()

getMonth

public int getMonth()

nextMonth

public void nextMonth()

previousMonth

public void previousMonth()

firstDay

public boolean firstDay(int day)

lastDay

public boolean lastDay(int day)

goToday

public void goToday()

getDate

public java.util.Calendar getDate()

onTouchEvent

public boolean onTouchEvent(android.view.MotionEvent event)
Overrides:
onTouchEvent in class android.view.View

setOnCellTouchListener

public void setOnCellTouchListener(CalendarView.OnCellTouchListener p)

setEvents

public void setEvents(java.util.Map<java.lang.String,java.util.TreeSet<EventDataItem>> events)
Paint a collections of events in the calendar

Parameters:
events - Map with key that is a String of date with format like dd/mm/yy