fi.paatti.research.paattiapplication.views
Class ApplicationView

java.lang.Object
  extended by com.vaadin.ui.AbstractComponent
      extended by com.vaadin.ui.AbstractComponentContainer
          extended by com.vaadin.ui.CustomComponent
              extended by fi.paatti.research.paattiapplication.views.ApplicationView
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.terminal.Paintable, com.vaadin.terminal.Sizeable, com.vaadin.terminal.VariableOwner, com.vaadin.ui.Component, com.vaadin.ui.ComponentContainer, Serializable, EventListener
Direct Known Subclasses:
EventView, GroupView, ResearchView, ScheduleView, UserView

public abstract class ApplicationView
extends com.vaadin.ui.CustomComponent

Base class for the views of the application.

Author:
Tapio Keränen, t.tapio.keranen@student.jyu.fi, Toni Salminen, toni.a.j.salminen@student.jyu.fi
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.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
protected  ApplicationTabSheet applicationTabSheet
           
protected  SearchComponent searchComponent
           
 
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
ApplicationView(ApplicationTabSheet applicationTabSheet, String tableName, String tableColumnId)
          Constructor of the class.
 
Method Summary
 void addTab(com.vaadin.ui.CustomComponent tab, String caption)
          Add tab to applicationView.
protected abstract  String createInfoString(com.vaadin.data.Item item)
          Create basic information string from item.
 fi.paatti.paattidatabaseutils.dbservice.PaattiResearchDBService getDBConnection()
          Return database connection.
 String getSelectedItemId()
          Returns currently selected items ID.
 void refresh(Object reSelectableId)
          Refresh search-component with wanted itemID.
abstract  void saveContents()
          Save selected items information.
 void setActiveTab(int tabIndex, Object itemId)
          Activates wanted tab.
 void setContents(com.vaadin.data.Item item)
          Sets item for applicationViewTabs.
 void setSelectedInfoLabel(String itemDescription)
          Sets caption for label which identifies current selection.
 void setTabsEnabled(boolean enabled)
          Enables or disables all the added tabs.
 
Methods inherited from class com.vaadin.ui.CustomComponent
addComponent, getComponentCount, getComponentIterator, getComponentType, getCompositionRoot, moveComponentsFrom, paintContent, removeAllComponents, removeComponent, replaceComponent, setComponentType, setCompositionRoot
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, removeListener, removeListener, requestRepaintAll, setEnabled, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addListener, addStyleName, changeVariables, 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.Component
addListener, addStyleName, childRequestedRepaint, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, 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
changeVariables, isImmediate
 
Methods inherited from interface com.vaadin.terminal.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits
 

Field Detail

applicationTabSheet

protected ApplicationTabSheet applicationTabSheet

searchComponent

protected SearchComponent searchComponent
Constructor Detail

ApplicationView

public ApplicationView(ApplicationTabSheet applicationTabSheet,
                       String tableName,
                       String tableColumnId)
Constructor of the class.

Parameters:
applicationTabSheet - a handler to the tabsheet containing the view
tableName - the name of the db table related to the view
tableColumnId - the name of the related table's id column
Method Detail

addTab

public void addTab(com.vaadin.ui.CustomComponent tab,
                   String caption)
Add tab to applicationView.

Parameters:
tab -
caption -

setContents

public void setContents(com.vaadin.data.Item item)
Sets item for applicationViewTabs.

Parameters:
item -

saveContents

public abstract void saveContents()
Save selected items information.


setTabsEnabled

public void setTabsEnabled(boolean enabled)
Enables or disables all the added tabs.

Parameters:
enabled -

refresh

public void refresh(Object reSelectableId)
Refresh search-component with wanted itemID.

Parameters:
reSelectableId -

setActiveTab

public void setActiveTab(int tabIndex,
                         Object itemId)
Activates wanted tab.


getSelectedItemId

public String getSelectedItemId()
Returns currently selected items ID.

Returns:
itemID null if none selected.

getDBConnection

public fi.paatti.paattidatabaseutils.dbservice.PaattiResearchDBService getDBConnection()
Return database connection.

Returns:
db connection

setSelectedInfoLabel

public void setSelectedInfoLabel(String itemDescription)
Sets caption for label which identifies current selection.

Parameters:
itemDescription - selected item description

createInfoString

protected abstract String createInfoString(com.vaadin.data.Item item)
Create basic information string from item.

Parameters:
item - db item
Returns:
Created string


Copyright © 2012. All Rights Reserved.