fi.paatti.mobile.views.eventlistview
Class EventListViewLogic

java.lang.Object
  extended by fi.paatti.mobile.views.listview.ListViewLogic
      extended by fi.paatti.mobile.views.eventlistview.EventListViewLogic
All Implemented Interfaces:
MobileViewLogic
Direct Known Subclasses:
VoluntaryEventListViewLogic

public class EventListViewLogic
extends ListViewLogic

The logic for the event list view.

Author:
Lauri Satokangas, lauri.n.satokangas@student.jyu.fi @date 16.3.2012
 

Constructor Summary
EventListViewLogic(MobileViewHandler viewHandler, EventListView eventListView)
          Constructor.
 
Method Summary
 void footerButtonAction(Object buttonId)
          What will be done when footer (left, middle, right) button has been clicked.
 String getEstimatedTimeAsString(com.vaadin.data.Item eventItem)
          Get the estimated time of the event as a String.
 int getEventStatus(com.vaadin.data.Item eventItem)
          Checks the event time and returns the correct status for the event based on its time.
 String getEventTimeAsString(com.vaadin.data.Item eventItem)
          Get the event time as String.
 HashMap<Object,com.vaadin.ui.Component> getFooterComponents()
          Get all the footer components (buttons).
 void listItemClicked(Object eventId)
          This event is thrown when the button of the list item is clicked.
 
Methods inherited from class fi.paatti.mobile.views.listview.ListViewLogic
getViewHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventListViewLogic

public EventListViewLogic(MobileViewHandler viewHandler,
                          EventListView eventListView)
Constructor.

Parameters:
viewHandler - The apllication´s view handler.
eventListView - The event list view.
Method Detail

footerButtonAction

public void footerButtonAction(Object buttonId)
Description copied from interface: MobileViewLogic
What will be done when footer (left, middle, right) button has been clicked.

Parameters:
buttonId - The id of the button.

getFooterComponents

public HashMap<Object,com.vaadin.ui.Component> getFooterComponents()
Description copied from interface: MobileViewLogic
Get all the footer components (buttons).

Specified by:
getFooterComponents in interface MobileViewLogic
Overrides:
getFooterComponents in class ListViewLogic
Returns:
The footer components.

listItemClicked

public void listItemClicked(Object eventId)
Description copied from class: ListViewLogic
This event is thrown when the button of the list item is clicked.

Specified by:
listItemClicked in class ListViewLogic
Parameters:
eventId - The ID of the clicked item.

getEventTimeAsString

public String getEventTimeAsString(com.vaadin.data.Item eventItem)
Get the event time as String.

Format: weekday dd.mm.yyyy [klo] hh:mm.

Parameters:
eventItem - The event item

Returns:
The event time as String or empty String if the time string could not be created.

getEventStatus

public int getEventStatus(com.vaadin.data.Item eventItem)
Checks the event time and returns the correct status for the event based on its time.

Parameters:
eventItem - The item that holds the events (time) values.

Returns:
The status of the event.

getEstimatedTimeAsString

public String getEstimatedTimeAsString(com.vaadin.data.Item eventItem)
Get the estimated time of the event as a String.

The format of the returned String is hh:mm.

Parameters:
eventItem - The event item.

Returns:
The estimated time as a String or empty String if EVENT_estimated time was null.


Copyright © 2012. All Rights Reserved.