|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.Panel
com.vaadin.ui.Window
eu.livotov.tpt.gui.windows.TPTWindow
eu.livotov.tpt.gui.dialogs.AbstractDialog
eu.livotov.tpt.gui.dialogs.OptionDialog
public class OptionDialog
A modal dialog that provides some pre-defined selection options or the custom interface. In all cases, key ENTER, pressed during the dialog panel invocation, simulates the "OK" or "Yes" button click and key ESC - "No" or "Cancel" button click.
Nested Class Summary | |
---|---|
static interface |
OptionDialog.OptionDialogResultListener
Dialog result listener interface |
Nested classes/interfaces inherited from class com.vaadin.ui.Window |
---|
com.vaadin.ui.Window.CloseEvent, com.vaadin.ui.Window.CloseListener, com.vaadin.ui.Window.CloseShortcut, com.vaadin.ui.Window.Notification, com.vaadin.ui.Window.ResizeEvent, com.vaadin.ui.Window.ResizeListener |
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.terminal.URIHandler |
---|
com.vaadin.terminal.URIHandler.ErrorEvent |
Nested classes/interfaces inherited from interface com.vaadin.terminal.ParameterHandler |
---|
com.vaadin.terminal.ParameterHandler.ErrorEvent |
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 OptionDialogButtonsComponent |
buttonsArea
|
protected com.vaadin.ui.Window |
parentWindow
|
protected OptionDialog.OptionDialogResultListener |
resultReceiver
|
Fields inherited from class com.vaadin.ui.Window |
---|
BORDER_DEFAULT, BORDER_MINIMAL, BORDER_NONE, closeShortcut |
Fields inherited from class com.vaadin.ui.Panel |
---|
actionManager, STYLE_LIGHT |
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 | |
---|---|
OptionDialog(com.vaadin.Application app)
Constructs new dialog instance. |
|
OptionDialog(com.vaadin.ui.Window parent)
Constructs new dialog instance. |
Method Summary | |
---|---|
void |
buttonClick(com.vaadin.ui.Button.ClickEvent clickEvent)
|
void |
enterKeyPressed()
Called when user presses an ENTER key |
void |
escapeKeyPressed()
Called when user presses an ESC key |
protected void |
finihDialog(OptionKind result)
|
private void |
initActions()
|
private void |
initUI()
|
void |
setButtonText(OptionKind optionKind,
java.lang.String buttonTitle)
Changes the text for a button |
void |
showConfirmationDialog(java.lang.String title,
java.lang.String text,
OptionDialog.OptionDialogResultListener resultListener)
Displays the confirmation dialog, having title, info message and "OK" / "Cancel" buttons. |
void |
showCustomDialog(java.lang.String title,
com.vaadin.ui.Component content,
OptionDialog.OptionDialogResultListener resultListener,
OptionKind... dialogOptions)
Displays the custom dialog, having title, custom provided component and custom buttons. |
void |
showMessageDialog(java.lang.String title,
java.lang.String text,
OptionDialog.OptionDialogResultListener resultListener)
Displays the information only dialog, having title, info message and single "OK" button that closes the dialog. |
void |
showQuestionDialog(java.lang.String title,
java.lang.String text,
OptionDialog.OptionDialogResultListener resultListener)
Displays the question dialog, having title, info message and "Yes" / "No" buttons. |
void |
showYesNoCancelDialog(java.lang.String title,
java.lang.String text,
OptionDialog.OptionDialogResultListener resultListener)
Displays the cancellable question dialog, having title, info message, "Yes", "No" and "Cancel" buttons. |
void |
windowClose(com.vaadin.ui.Window.CloseEvent closeEvent)
Called when window is closed by pressing a close icon at the top-right corner. |
Methods inherited from class eu.livotov.tpt.gui.dialogs.AbstractDialog |
---|
hideDialog, showDialog |
Methods inherited from class eu.livotov.tpt.gui.windows.TPTWindow |
---|
applyHtmlFormatting, getActions, getURL, handleAction, showErrorMessage, showMessage, showNotification, showWarningMessage |
Methods inherited from class com.vaadin.ui.Window |
---|
addComponent, addListener, addListener, addParameterHandler, addURIHandler, addWindow, center, changeVariables, close, executeJavaScript, fireClose, fireResize, getApplication, getBorder, getChildWindows, getName, getParent, getPositionX, getPositionY, getTerminal, getTheme, getWindow, handleParameters, handleURI, isClosable, isDraggable, isModal, isResizable, open, open, open, paintContent, removeCloseShortcut, removeListener, removeListener, removeParameterHandler, removeURIHandler, removeWindow, setApplication, setBorder, setClosable, setCloseShortcut, setDraggable, setModal, setName, setParent, setPositionX, setPositionY, setResizable, setTerminal, setTheme, showNotification, showNotification, showNotification, showNotification, showNotification |
Methods inherited from class com.vaadin.ui.Panel |
---|
addAction, addActionHandler, addListener, attach, componentAttachedToContainer, componentDetachedFromContainer, detach, getActionManager, getComponentIterator, getContent, getLayout, getScrollLeft, getScrollOffsetX, getScrollOffsetY, getScrollTop, isScrollable, removeAction, removeActionHandler, removeAllActionHandlers, removeAllComponents, removeComponent, removeListener, replaceComponent, requestRepaintAll, setContent, setLayout, setScrollable, setScrollLeft, setScrollOffsetX, setScrollOffsetY, setScrollTop |
Methods inherited from class com.vaadin.ui.AbstractComponentContainer |
---|
addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeListener, removeListener, setEnabled, setHeight, setWidth |
Methods inherited from class com.vaadin.ui.AbstractComponent |
---|
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getLocale, getStyle, getStyleName, getTag, getWidth, getWidthUnits, handleError, 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, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidthUnits |
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, getCaption, getIcon, getLocale, getStyleName, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setIcon, 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, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits |
Field Detail |
---|
protected com.vaadin.ui.Window parentWindow
protected OptionDialogButtonsComponent buttonsArea
protected OptionDialog.OptionDialogResultListener resultReceiver
Constructor Detail |
---|
public OptionDialog(com.vaadin.Application app)
app
- application instance, that have a main window set and initialized.public OptionDialog(com.vaadin.ui.Window parent)
parent
- window that will act as parent for this dialogMethod Detail |
---|
private void initActions()
private void initUI()
public void showMessageDialog(java.lang.String title, java.lang.String text, OptionDialog.OptionDialogResultListener resultListener)
title
- dialog titletext
- information textresultListener
- dialog result listenerpublic void showConfirmationDialog(java.lang.String title, java.lang.String text, OptionDialog.OptionDialogResultListener resultListener)
title
- dialog titletext
- information textresultListener
- dialog result listenerpublic void showQuestionDialog(java.lang.String title, java.lang.String text, OptionDialog.OptionDialogResultListener resultListener)
title
- dialog titletext
- information textresultListener
- dialog result listenerpublic void showYesNoCancelDialog(java.lang.String title, java.lang.String text, OptionDialog.OptionDialogResultListener resultListener)
title
- dialog titletext
- information textresultListener
- dialog result listenerpublic void showCustomDialog(java.lang.String title, com.vaadin.ui.Component content, OptionDialog.OptionDialogResultListener resultListener, OptionKind... dialogOptions)
title
- dialog titlecontent
- component, to be displayed as a contentresultListener
- dialog result listenerdialogOptions
- one or more buttons to displaypublic void setButtonText(OptionKind optionKind, java.lang.String buttonTitle)
optionKind
- button to change text forbuttonTitle
- new button textpublic void buttonClick(com.vaadin.ui.Button.ClickEvent clickEvent)
buttonClick
in interface com.vaadin.ui.Button.ClickListener
protected void finihDialog(OptionKind result)
public void windowClose(com.vaadin.ui.Window.CloseEvent closeEvent)
TPTWindow
windowClose
in interface com.vaadin.ui.Window.CloseListener
windowClose
in class TPTWindow
closeEvent
- close event that came from toolkitpublic void enterKeyPressed()
TPTWindow
enterKeyPressed
in class TPTWindow
public void escapeKeyPressed()
TPTWindow
escapeKeyPressed
in class TPTWindow
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |