fi.paatti.mobile.views.listview
Class ListView

java.lang.Object
  extended by com.vaadin.ui.AbstractComponent
      extended by com.vaadin.ui.AbstractComponentContainer
          extended by com.vaadin.ui.AbstractLayout
              extended by com.vaadin.ui.AbstractOrderedLayout
                  extended by com.vaadin.ui.VerticalLayout
                      extended by fi.paatti.mobile.views.mobilecontentview.MobileContentView
                          extended by fi.paatti.mobile.views.listview.ListView
All Implemented Interfaces:
com.vaadin.event.LayoutEvents.LayoutClickNotifier, com.vaadin.event.MethodEventSource, com.vaadin.terminal.Paintable, com.vaadin.terminal.Sizeable, com.vaadin.terminal.VariableOwner, com.vaadin.ui.Component, com.vaadin.ui.ComponentContainer, com.vaadin.ui.Layout, com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler, MobileViewButtons, Serializable, EventListener
Direct Known Subclasses:
EventListView, MessageListView, ProgressView

public abstract class ListView
extends MobileContentView

A base class for other list views.

Since:
0.0.1
Author:
Lauri Satokangas, lauri.n.satokangas@student.jyu.fi @date 16.3.2012
See Also:
Serialized Form
 

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponent.ComponentErrorEvent, com.vaadin.ui.AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.MarginInfo, com.vaadin.ui.Layout.SpacingHandler
 
Nested classes/interfaces inherited from interface com.vaadin.ui.ComponentContainer
com.vaadin.ui.ComponentContainer.ComponentAttachEvent, com.vaadin.ui.ComponentContainer.ComponentAttachListener, com.vaadin.ui.ComponentContainer.ComponentDetachEvent, com.vaadin.ui.ComponentContainer.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.ErrorListener, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.terminal.Paintable
com.vaadin.terminal.Paintable.RepaintRequestEvent, com.vaadin.terminal.Paintable.RepaintRequestListener
 
Field Summary
 
Fields inherited from class com.vaadin.ui.AbstractOrderedLayout
ALIGNMENT_DEFAULT, components
 
Fields inherited from class com.vaadin.ui.AbstractLayout
margins
 
Fields inherited from interface fi.paatti.mobile.mobileview.MobileViewButtons
FOOTER_BUTTON_LEFT, FOOTER_BUTTON_MIDDLE, FOOTER_BUTTON_RIGHT
 
Fields inherited from interface com.vaadin.ui.Layout.AlignmentHandler
ALIGNMENT_BOTTOM, ALIGNMENT_HORIZONTAL_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ALIGNMENT_TOP, ALIGNMENT_VERTICAL_CENTER
 
Fields inherited from interface com.vaadin.terminal.Sizeable
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
ListView(MobileViewHandler viewHandler)
          Constructor.
 
Method Summary
 void createListItemsFromDb(String tableName, String idColumn)
          Create the list items from database.
 void createReadOnlyListItemsFromDb(String tableName, String idColumn)
          Create a list from database.
protected  String getHeaderTextColumnName()
          Get the name of the property/columnname that will be used as item header when creating a list item.
protected  String getIDColumnName()
          Get the name of the property/columnname of the items ID.
protected  String getText1ColumnName()
          Get the name of the property/columnname that will be used as the first text trow when creating a list item.
protected  String getText2ColumnName()
          Get the name of the property/columnname that will be used as the second text trow when creating a list item.
 MobileViewHandler getViewHandler()
          Get the applications view handler.
 void setContentViewLogic(MobileViewLogic logic)
          Set the logic for the view.
protected  void setHeaderTextColumnName(String headerTextColumnName)
          Set the name of the property/columnname that will be used when creating a list item.
protected  void setIdColumnName(String idColumnName)
          Set the ID column name.
protected  void setText1ColumnName(String text1ColumnName)
          Set the first text row column name.
protected  void setText2ColumnName(String text2ColumnName)
          Set the second text row column name.
 
Methods inherited from class fi.paatti.mobile.views.mobilecontentview.MobileContentView
updateFooterAndHeader
 
Methods inherited from class com.vaadin.ui.AbstractOrderedLayout
addComponent, addComponent, addComponentAsFirst, addListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getComponentIterator, getExpandRatio, isSpacing, isSpacingEnabled, paintContent, removeComponent, removeListener, replaceComponent, setComponentAlignment, setComponentAlignment, setComponentAlignment, setExpandRatio, setSpacing
 
Methods inherited from class com.vaadin.ui.AbstractLayout
changeVariables, fireClick, getMargin, setMargin, setMargin, setMargin
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeListener, removeListener, requestRepaintAll, setEnabled, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setErrorHandler, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setWidth, setWidth, setWidthUnits, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.ComponentContainer
addListener, addListener, moveComponentsFrom, removeAllComponents, removeListener, removeListener, requestRepaintAll
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setParent, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.terminal.Paintable
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId
 
Methods inherited from interface com.vaadin.terminal.VariableOwner
isImmediate
 
Methods inherited from interface com.vaadin.terminal.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidth, setWidthUnits
 

Constructor Detail

ListView

public ListView(MobileViewHandler viewHandler)
Constructor.

Parameters:
viewHandler - The applications view handler.
Method Detail

setContentViewLogic

public void setContentViewLogic(MobileViewLogic logic)
Description copied from class: MobileContentView
Set the logic for the view.

Specified by:
setContentViewLogic in class MobileContentView
Parameters:
logic - The logic to be set.

createListItemsFromDb

public void createListItemsFromDb(String tableName,
                                  String idColumn)
Create the list items from database.

Parameters:
tableName - The table where the items will be created.
idColumn - The id column of the table.

createReadOnlyListItemsFromDb

public void createReadOnlyListItemsFromDb(String tableName,
                                          String idColumn)
Create a list from database. This list is just for showing the items. The items cannot be activated, opened or anything else.

Parameters:
tableName - The table where the items will be created.
idColumn - The id column of the table.

getViewHandler

public MobileViewHandler getViewHandler()
Get the applications view handler.

Returns:
The view handler of the application.

setHeaderTextColumnName

protected void setHeaderTextColumnName(String headerTextColumnName)
Set the name of the property/columnname that will be used when creating a list item.

Parameters:
headerTextColumnName - The name of the property/columnname containing the value for items header text.

getIDColumnName

protected String getIDColumnName()
Get the name of the property/columnname of the items ID.

Returns:
the idColumnName The property/columnname of the items ID.

getHeaderTextColumnName

protected String getHeaderTextColumnName()
Get the name of the property/columnname that will be used as item header when creating a list item.

Returns:
the headerTextColumnName The name of the property/columnname containing the value for items header text.

getText1ColumnName

protected String getText1ColumnName()
Get the name of the property/columnname that will be used as the first text trow when creating a list item.

Returns:
the tex1ColumnName The name of the property/columnname containing the value for items first text row.

getText2ColumnName

protected String getText2ColumnName()
Get the name of the property/columnname that will be used as the second text trow when creating a list item.

Returns:
the tex2ColumnName The name of the property/columnname containing the value for items second text row.

setIdColumnName

protected void setIdColumnName(String idColumnName)
Set the ID column name.

Parameters:
idColumnName - the idColumnName to set

setText1ColumnName

protected void setText1ColumnName(String text1ColumnName)
Set the first text row column name.

Parameters:
text1ColumnName - the tex1ColumnName to set

setText2ColumnName

protected void setText2ColumnName(String text2ColumnName)
Set the second text row column name.

Parameters:
text2ColumnName - the text2ColumnName to set


Copyright © 2012. All Rights Reserved.