Package org.opennms.netmgt.vaadin.core
Class StringInputDialogWindow
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractSingleComponentContainer
-
- com.vaadin.ui.Panel
-
- com.vaadin.ui.Window
-
- org.opennms.netmgt.vaadin.core.StringInputDialogWindow
-
- All Implemented Interfaces:
com.vaadin.event.Action.Container
,com.vaadin.event.Action.Notifier
,com.vaadin.event.ConnectorEventListener
,com.vaadin.event.ContextClickEvent.ContextClickNotifier
,com.vaadin.event.FieldEvents.BlurNotifier
,com.vaadin.event.FieldEvents.FocusNotifier
,com.vaadin.event.MethodEventSource
,com.vaadin.event.SerializableEventListener
,com.vaadin.server.ClientConnector
,com.vaadin.server.Scrollable
,com.vaadin.server.Sizeable
,com.vaadin.server.VariableOwner
,com.vaadin.shared.Connector
,com.vaadin.ui.Button.ClickListener
,com.vaadin.ui.Component
,com.vaadin.ui.Component.Focusable
,com.vaadin.ui.HasComponents
,com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
,com.vaadin.ui.LegacyComponent
,com.vaadin.ui.SingleComponentContainer
,com.vaadin.ui.Window.CloseListener
,java.io.Serializable
,java.lang.Iterable<com.vaadin.ui.Component>
,java.util.EventListener
public class StringInputDialogWindow extends com.vaadin.ui.Window implements com.vaadin.ui.Window.CloseListener, com.vaadin.ui.Button.ClickListener
Vaadin dialog window to query for a single String value.- Author:
- Christian Pape
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
StringInputDialogWindow.Action
The callback 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.ResizeEvent, com.vaadin.ui.Window.ResizeListener, com.vaadin.ui.Window.WindowModeChangeEvent, com.vaadin.ui.Window.WindowModeChangeListener, com.vaadin.ui.Window.WindowOrderChangeEvent, com.vaadin.ui.Window.WindowOrderChangeListener
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
-
-
Constructor Summary
Constructors Constructor Description StringInputDialogWindow()
Default constructorStringInputDialogWindow(java.lang.String caption, java.lang.String fieldName)
Constructor responsible for creating new instances of this class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buttonClick(com.vaadin.ui.Button.ClickEvent event)
java.lang.String
getValue()
Returns the value of the input field.void
open()
void
windowClose(com.vaadin.ui.Window.CloseEvent e)
StringInputDialogWindow
withCancelAction(StringInputDialogWindow.Action cancelAction)
Sets the action to be performed when the dialog is cancelled.StringInputDialogWindow
withCancelLabel(java.lang.String cancelLabel)
Sets the label of the cancel button.StringInputDialogWindow
withCaption(java.lang.String caption)
Sets the caption of the window.StringInputDialogWindow
withFieldName(java.lang.String fieldName)
Sets the label of the input field.StringInputDialogWindow
withOkAction(StringInputDialogWindow.Action okAction)
Sets the action to be performed when the dialog is confirmed.StringInputDialogWindow
withOkLabel(java.lang.String okLabel)
Sets the label of the ok button.StringInputDialogWindow
withValidator(com.vaadin.v7.data.Validator validator)
Sets the validator to be used.-
Methods inherited from class com.vaadin.ui.Window
addBlurListener, addCloseListener, addCloseShortcut, addFocusListener, addResizeListener, addWindowModeChangeListener, addWindowOrderChangeListener, bringToFront, center, changeVariables, close, fireClose, fireResize, fireWindowOrderChange, fireWindowWindowModeChange, focus, getAssistiveDescription, getAssistivePostfix, getAssistivePrefix, getAssistiveRole, getCloseShortcuts, getCustomAttributes, getOrderPosition, getPositionX, getPositionY, getState, getState, getTabStopBottomAssistiveText, getTabStopTopAssistiveText, getWindowMode, hasCloseShortcut, isClosable, isDraggable, isModal, isResizable, isResizeLazy, isTabStopEnabled, paintContent, readDesign, readDesignChildren, removeAllCloseShortcuts, removeCloseListener, removeCloseShortcut, removeCloseShortcut, removeResizeListener, removeWindowModeChangeListener, setAssistiveDescription, setAssistivePostfix, setAssistivePrefix, setAssistiveRole, setClosable, setCloseShortcut, setDraggable, setModal, setParent, setPosition, setPositionX, setPositionY, setResizable, setResizeLazy, setTabStopBottomAssistiveText, setTabStopEnabled, setTabStopTopAssistiveText, setWindowMode, writeDesign
-
Methods inherited from class com.vaadin.ui.Panel
addAction, addActionHandler, addClickListener, getActionManager, getScrollLeft, getScrollTop, getTabIndex, removeAction, removeActionHandler, removeAllActionHandlers, removeClickListener, setCaption, setScrollLeft, setScrollTop, setTabIndex
-
Methods inherited from class com.vaadin.ui.AbstractSingleComponentContainer
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentCount, getContent, iterator, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setContent, setHeight, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setEnabled, setIcon, setId, setPrimaryStyleName, setStyleName, setStyleName, setVisible
-
-
-
-
Constructor Detail
-
StringInputDialogWindow
public StringInputDialogWindow()
Default constructor
-
StringInputDialogWindow
public StringInputDialogWindow(java.lang.String caption, java.lang.String fieldName)
Constructor responsible for creating new instances of this class- Parameters:
caption
- the window's titlefieldName
- the title of the input field
-
-
Method Detail
-
withValidator
public StringInputDialogWindow withValidator(com.vaadin.v7.data.Validator validator)
Sets the validator to be used.- Parameters:
validator
- the validator- Returns:
- the instance itself
-
getValue
public java.lang.String getValue()
Returns the value of the input field.- Returns:
- the current value
-
withCaption
public StringInputDialogWindow withCaption(java.lang.String caption)
Sets the caption of the window.- Parameters:
caption
- the caption to be used- Returns:
- the instance itself
-
withFieldName
public StringInputDialogWindow withFieldName(java.lang.String fieldName)
Sets the label of the input field.- Parameters:
fieldName
- the field name to be used- Returns:
- the instance itself
-
withOkAction
public StringInputDialogWindow withOkAction(StringInputDialogWindow.Action okAction)
Sets the action to be performed when the dialog is confirmed.- Parameters:
okAction
- the action to be executed- Returns:
- the instance itself
-
withCancelAction
public StringInputDialogWindow withCancelAction(StringInputDialogWindow.Action cancelAction)
Sets the action to be performed when the dialog is cancelled.- Parameters:
cancelAction
- the action to be executed- Returns:
- the instance itself
-
open
public void open()
-
withOkLabel
public StringInputDialogWindow withOkLabel(java.lang.String okLabel)
Sets the label of the ok button.- Parameters:
okLabel
- the label to be used- Returns:
- the instance itself
-
withCancelLabel
public StringInputDialogWindow withCancelLabel(java.lang.String cancelLabel)
Sets the label of the cancel button.- Parameters:
cancelLabel
- the label to be used- Returns:
- the instance itself
-
windowClose
public void windowClose(com.vaadin.ui.Window.CloseEvent e)
- Specified by:
windowClose
in interfacecom.vaadin.ui.Window.CloseListener
-
buttonClick
public void buttonClick(com.vaadin.ui.Button.ClickEvent event)
- Specified by:
buttonClick
in interfacecom.vaadin.ui.Button.ClickListener
-
-