Package org.opennms.netmgt.vaadin.core
Class KeyValueInputDialogWindow
- 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.KeyValueInputDialogWindow
-
- 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 KeyValueInputDialogWindow 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
KeyValueInputDialogWindow.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 KeyValueInputDialogWindow()
Default constructorKeyValueInputDialogWindow(java.lang.String caption, java.lang.String keyName, java.lang.String valueName)
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)
KeyValueInputDialogWindow
disableKey()
Disables the field.KeyValueInputDialogWindow
disableValue()
Disables the field.KeyValueInputDialogWindow
enableKey()
Enables the field.KeyValueInputDialogWindow
enableValue()
Enables the field.KeyValueInputDialogWindow
focusKey()
Sets the focus to the key field.KeyValueInputDialogWindow
focusValue()
Sets the focus to the value field.java.lang.String
getKey()
Returns the value of the key input field.java.lang.String
getValue()
Returns the value of the value input field.void
open()
void
windowClose(com.vaadin.ui.Window.CloseEvent e)
KeyValueInputDialogWindow
withCancelAction(KeyValueInputDialogWindow.Action cancelAction)
Sets the action to be performed when the dialog is cancelled.KeyValueInputDialogWindow
withCancelLabel(java.lang.String cancelLabel)
Sets the label of the cancel button.KeyValueInputDialogWindow
withCaption(java.lang.String caption)
Sets the caption of the window.KeyValueInputDialogWindow
withKey(java.lang.String key)
Add key.KeyValueInputDialogWindow
withKeyFieldName(java.lang.String fieldName)
Sets the label of the key input field.KeyValueInputDialogWindow
withKeyValidator(com.vaadin.v7.data.Validator validator)
Sets the key validator to be used.KeyValueInputDialogWindow
withOkAction(KeyValueInputDialogWindow.Action okAction)
Sets the action to be performed when the dialog is confirmed.KeyValueInputDialogWindow
withOkLabel(java.lang.String okLabel)
Sets the label of the ok button.KeyValueInputDialogWindow
withValue(java.lang.String value)
Add value.KeyValueInputDialogWindow
withValueFieldName(java.lang.String fieldName)
Sets the label of the value input field.KeyValueInputDialogWindow
withValueValidator(com.vaadin.v7.data.Validator validator)
Sets the value 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
-
KeyValueInputDialogWindow
public KeyValueInputDialogWindow()
Default constructor
-
KeyValueInputDialogWindow
public KeyValueInputDialogWindow(java.lang.String caption, java.lang.String keyName, java.lang.String valueName)
Constructor responsible for creating new instances of this class- Parameters:
caption
- the window's titlekeyName
- the title of the key input fieldvalueName
- the title of the value input field
-
-
Method Detail
-
withKeyValidator
public KeyValueInputDialogWindow withKeyValidator(com.vaadin.v7.data.Validator validator)
Sets the key validator to be used.- Parameters:
validator
- the validator- Returns:
- the instance itself
-
withValueValidator
public KeyValueInputDialogWindow withValueValidator(com.vaadin.v7.data.Validator validator)
Sets the value validator to be used.- Parameters:
validator
- the validator- Returns:
- the instance itself
-
getValue
public java.lang.String getValue()
Returns the value of the value input field.- Returns:
- the current value
-
getKey
public java.lang.String getKey()
Returns the value of the key input field.- Returns:
- the current value
-
withValue
public KeyValueInputDialogWindow withValue(java.lang.String value)
Add value.- Parameters:
value
- the value to be used- Returns:
- the instance itself
-
withKey
public KeyValueInputDialogWindow withKey(java.lang.String key)
Add key.- Parameters:
key
- the key to be used- Returns:
- the instance itself
-
withCaption
public KeyValueInputDialogWindow withCaption(java.lang.String caption)
Sets the caption of the window.- Parameters:
caption
- the caption to be used- Returns:
- the instance itself
-
withKeyFieldName
public KeyValueInputDialogWindow withKeyFieldName(java.lang.String fieldName)
Sets the label of the key input field.- Parameters:
fieldName
- the field name to be used- Returns:
- the instance itself
-
withValueFieldName
public KeyValueInputDialogWindow withValueFieldName(java.lang.String fieldName)
Sets the label of the value input field.- Parameters:
fieldName
- the field name to be used- Returns:
- the instance itself
-
withOkAction
public KeyValueInputDialogWindow withOkAction(KeyValueInputDialogWindow.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 KeyValueInputDialogWindow withCancelAction(KeyValueInputDialogWindow.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 KeyValueInputDialogWindow 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 KeyValueInputDialogWindow 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
-
focusKey
public KeyValueInputDialogWindow focusKey()
Sets the focus to the key field.- Returns:
- the instance itself
-
focusValue
public KeyValueInputDialogWindow focusValue()
Sets the focus to the value field.- Returns:
- the instance itself
-
enableKey
public KeyValueInputDialogWindow enableKey()
Enables the field.- Returns:
- the instance itself
-
disableKey
public KeyValueInputDialogWindow disableKey()
Disables the field.- Returns:
- the instance itself
-
enableValue
public KeyValueInputDialogWindow enableValue()
Enables the field.- Returns:
- the instance itself
-
disableValue
public KeyValueInputDialogWindow disableValue()
Disables the field.- Returns:
- the instance itself
-
-