|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfi.paatti.mobile.paattiapplication.MobileViewHandler
public class MobileViewHandler
Handles the opening and closing of views and setting the height of the current view.
MobileView is the base view and when a new view is opened it will be set as the content in the MobileView. TODO: Changing header icon and/or text doesn´t allways work as expected.
![]() |
![]() |
![]() |
![]() |
| Field Summary | |
|---|---|
fi.paatti.paattiloginutils.LoginHelper |
loginHelper
The login helper that is used for the user login. |
| Method Summary | |
|---|---|
void |
createAndStartEvent(com.vaadin.data.util.sqlcontainer.SQLContainer taskContainer,
com.vaadin.data.util.sqlcontainer.SQLContainer choiceContainer,
String eventName)
Set the EventView as the content and inform it to start a new event. |
fi.paatti.paattidatabaseutils.dbservice.PaattiMobileDBService |
getDbService()
Get the database service. |
HashMap<Object,com.vaadin.ui.Component> |
getFooterComponents()
Get the footer buttons. |
fi.paatti.paattiloginutils.LoginHelper |
getLoginHelper()
Get the LoginHelper. |
fi.paatti.paattidatabaseutils.dbobjects.User |
getUser()
Get the User-object. |
int |
getUserID()
Get the ID of the User. |
void |
resetFooterButtons()
Removes all text and icons from all the footer buttons. |
void |
setContentView(Object viewToBeOpened)
Set the content view. |
void |
setContentViewWithConfirmation(Object viewToBeOpened,
String confirmationMessage)
Shows a confirmation view with the possibility to open the given view or to return to the view that was open before the confirmation. |
void |
setFooterButtonEnabled(Object footerButtonId,
boolean enabled)
Enable or disable the button. |
void |
setFooterButtonIcon(Object footerButtonId,
com.vaadin.terminal.ThemeResource themeResource)
Set the icon of the footer button. |
void |
setFooterButtonPressed(Object footerButton,
boolean pressed)
Sets the button state as pressed. |
void |
setFooterButtonsEnabled(boolean enabled)
Enable all footerbuttons. |
void |
setFooterButtonsVisible(boolean visible)
Hide all the footer buttons or make them visible. |
void |
setFooterButtonText(Object footerButtonId,
String text)
Set the text of the footer button. |
void |
setHeaderIcon(com.vaadin.terminal.ThemeResource iconResource)
Set icon for the header. |
void |
setHeaderText(String headerText)
Set the text of the header label. |
void |
setMobileViewLogic(MobileViewLogic logic)
Set logic for the mobile view. |
void |
setUser(fi.paatti.paattidatabaseutils.dbobjects.User user)
Set the User-object |
void |
setWindowHeight(int height)
Set the height of the layout (which should be the height of the mobile browser). |
void |
showNotification(String notificationText,
int timeInMsec,
boolean clickToCloseNotification)
Show a notification on the screen. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final fi.paatti.paattiloginutils.LoginHelper loginHelper
| Method Detail |
|---|
public void setContentView(Object viewToBeOpened)
viewToBeOpened - ID of the view to be opened
public void setContentViewWithConfirmation(Object viewToBeOpened,
String confirmationMessage)
viewToBeOpened - ID of the view to be openedconfirmationMessage - The confirmation message
public void showNotification(String notificationText,
int timeInMsec,
boolean clickToCloseNotification)
notificationText - Text for the notificationtimeInMsec - Notification timeout in millisecondsclickToCloseNotification - Should the user click the notification to close it or will it close after 10 sec.
public void createAndStartEvent(com.vaadin.data.util.sqlcontainer.SQLContainer taskContainer,
com.vaadin.data.util.sqlcontainer.SQLContainer choiceContainer,
String eventName)
taskContainer - All the tasks that are in the event.choiceContainer - All the choices that are in tasks (that are in the event)eventName - The name of the event.public void setMobileViewLogic(MobileViewLogic logic)
logic - The logic to be set.public void setWindowHeight(int height)
height - Height of the browser window in pixels.public HashMap<Object,com.vaadin.ui.Component> getFooterComponents()
public int getUserID()
public fi.paatti.paattidatabaseutils.dbobjects.User getUser()
public fi.paatti.paattidatabaseutils.dbservice.PaattiMobileDBService getDbService()
public fi.paatti.paattiloginutils.LoginHelper getLoginHelper()
public void setUser(fi.paatti.paattidatabaseutils.dbobjects.User user)
user - public void setHeaderText(String headerText)
MobileViewHeaderAndFooterActions
setHeaderText in interface MobileViewHeaderAndFooterActionsheaderText - The text for the header.
public void setFooterButtonEnabled(Object footerButtonId,
boolean enabled)
MobileViewHeaderAndFooterActions
setFooterButtonEnabled in interface MobileViewHeaderAndFooterActionsfooterButtonId - Wich button will be enabled/disabledenabled - Will the button be enabled or disabled
public void setFooterButtonIcon(Object footerButtonId,
com.vaadin.terminal.ThemeResource themeResource)
MobileViewHeaderAndFooterActions
setFooterButtonIcon in interface MobileViewHeaderAndFooterActionsfooterButtonId - On which button the icon will be set.themeResource - ThemeResource containing the icon
public void setFooterButtonText(Object footerButtonId,
String text)
MobileViewHeaderAndFooterActions
setFooterButtonText in interface MobileViewHeaderAndFooterActionsfooterButtonId - On which button the text will be settext - The new text of the button
public void setFooterButtonPressed(Object footerButton,
boolean pressed)
MobileViewHeaderAndFooterActions
setFooterButtonPressed in interface MobileViewHeaderAndFooterActionsfooterButton - Wich button will be pressed/unpressedpressed - Will the button be pressed or not.public void setHeaderIcon(com.vaadin.terminal.ThemeResource iconResource)
MobileViewHeaderAndFooterActions
setHeaderIcon in interface MobileViewHeaderAndFooterActionsiconResource - ThemeResource containing the iconpublic void resetFooterButtons()
MobileViewHeaderAndFooterActions
resetFooterButtons in interface MobileViewHeaderAndFooterActionspublic void setFooterButtonsEnabled(boolean enabled)
MobileViewHeaderAndFooterActions
setFooterButtonsEnabled in interface MobileViewHeaderAndFooterActionsenabled - Will the buttons be set to enabled or disabled.public void setFooterButtonsVisible(boolean visible)
MobileViewHeaderAndFooterActions
setFooterButtonsVisible in interface MobileViewHeaderAndFooterActionsvisible - Will the buttons be visible or hidden.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||