public class ContextHelp
extends com.vaadin.server.AbstractExtension
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
Constructor and Description |
---|
ContextHelp() |
Modifier and Type | Method and Description |
---|---|
void |
addHelpForComponent(com.vaadin.ui.Component component,
String help)
Registers a help text for a given component.
|
void |
addHelpForComponent(com.vaadin.ui.Component component,
String help,
Placement placement)
Registers a help text for a given component.
|
void |
extend(com.vaadin.ui.UI ui)
Add this extension to the target UI.
|
int |
getHelpKey() |
HelpProvider |
getHelpProvider() |
ContextHelpState |
getState() |
void |
hideHelp()
Programmatically hide the help bubble.
|
boolean |
isFollowFocus() |
boolean |
isHideOnBlur() |
void |
setFollowFocus(boolean followFocus)
This setting causes the help bubble to be displayed when a field is
focused, and removed when the focus moves away from the field.
|
void |
setHelpKey(int helpKey)
Sets the key that is used for opening the help bubble.
|
void |
setHelpProvider(HelpProvider helpProvider)
Sets the
HelpProvider to be used for looking up help texts for
components. |
void |
setHideOnBlur(boolean hideOnBlur)
Set whether the bubble should be automatically hidden when the field is
unfocused.
|
void |
setPlacement(com.vaadin.ui.Component component,
Placement placement)
Specifies where the help bubble should be placed in relation to the
component.
|
void |
showHelpFor(com.vaadin.ui.Component component)
Programmatically show the help bubble for a given component.
|
extend, getParent, getSupportedParentType, remove, setParent
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
public ContextHelpState getState()
getState
in class com.vaadin.server.AbstractClientConnector
public void addHelpForComponent(com.vaadin.ui.Component component, String help)
HelpProvider
.component
- the component for which to register the help text.help
- the help text in HTML.public void addHelpForComponent(com.vaadin.ui.Component component, String help, Placement placement)
HelpProvider
.component
- the component for which to register the help text.help
- the help text in HTML.placement
- where the help bubble should be placed.public void showHelpFor(com.vaadin.ui.Component component)
component
- the component for which to show the help bubble.public void hideHelp()
public void setFollowFocus(boolean followFocus)
followFocus
- true (enabled) or false (disabled).public boolean isFollowFocus()
public void setPlacement(com.vaadin.ui.Component component, Placement placement)
HelpProvider
.component
- the component for which to define the placement of the help
bubble.placement
- the placement of the help bubble.public void setHelpKey(int helpKey)
ShortcutAction.KeyCode
helpKey
- the key code for the key that opens the help bubble.public int getHelpKey()
public boolean isHideOnBlur()
public void setHideOnBlur(boolean hideOnBlur)
hideOnBlur
- public void setHelpProvider(HelpProvider helpProvider)
HelpProvider
to be used for looking up help texts for
components. By default the DefaultHelpProvider
is used.helpProvider
- the HelpProvider.public HelpProvider getHelpProvider()
public void extend(com.vaadin.ui.UI ui)
ui
- the connector to attach this extension toCopyright © 2020 Magnolia International Ltd.. All rights reserved.