|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.server.AbstractClientConnector com.vaadin.ui.AbstractComponent com.vaadin.ui.AbstractSingleComponentContainer com.vaadin.ui.Panel com.vaadin.ui.Window com.vaadin.addon.touchkit.ui.Popover
public class Popover
The Popover is a modal sub window suitable for mobile devices. It is often used to quickly display more options or small form related to an action. Popover does not support dragging or resizing by the end user.
An example of a typical use case would be the following: In a mobile mail
application when you hit an icon, you'll see a Popover
with actions:
"Reply", "Forward" and "Print". E.g. on the iPad the actions would be shown
next to the touched icon so they are close to the users finger (the related
button can be set with showRelativeTo(Component)
), while on smaller
screens (e.g. the iPhone) this kind of UI element fills the whole width of
the screen.
A Popover can also be made full screen with AbstractComponent.setSizeFull()
. In this
case, all borders will be hidden and the window will block all other content
of the main window. Using a full screen subwindow, instead of changing the
whole content of the main window may cause a slightly faster return to the
original view.
Finally, on a pad-sized device, if the window is not full screen nor related to a component, it will be completely undecorated by default, allowing the content to dictate the look.
Nested Class Summary |
---|
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 |
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.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.server.Sizeable |
---|
com.vaadin.server.Sizeable.Unit |
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 |
Field Summary |
---|
Fields inherited from class com.vaadin.ui.Window |
---|
closeShortcut |
Fields inherited from class com.vaadin.ui.Panel |
---|
actionManager |
Fields inherited from interface com.vaadin.server.Sizeable |
---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
---|---|
Popover()
Constructs a new Popover. |
|
Popover(com.vaadin.ui.ComponentContainer content)
Constructs a new Popover with the given content. |
Method Summary | |
---|---|
void |
addComponent(com.vaadin.ui.Button b)
A convenience method that adds a button to the bottom of the popover's content. |
void |
beforeClientResponse(boolean initial)
|
PopoverState |
getState()
|
void |
removeFromParent()
Removes the popover from the UI. |
void |
setClosable(boolean closable)
Sets whether the Popover is automatically closed when the user clicks (taps) outside of it. |
void |
showRelativeTo(com.vaadin.ui.Component relatedComponent)
This method will add the Popover to the top level window so that it is aligned below or on top of the given component, unless this is a small screen device, e.g a smart phone. |
Methods inherited from class com.vaadin.ui.Window |
---|
addBlurListener, addCloseListener, addFocusListener, addListener, addListener, addListener, addListener, addResizeListener, addWindowModeChangeListener, bringToFront, center, changeVariables, close, fireClose, fireResize, fireWindowWindowModeChange, focus, getAssistiveDescription, getAssistivePostfix, getAssistivePrefix, getAssistiveRole, getPositionX, getPositionY, getState, getTabStopBottomAssistiveText, getTabStopTopAssistiveText, getWindowMode, isClosable, isDraggable, isModal, isResizable, isResizeLazy, isTabStopEnabled, paintContent, removeBlurListener, removeCloseListener, removeCloseShortcut, removeFocusListener, removeListener, removeListener, removeListener, removeListener, removeResizeListener, removeWindowModeChangeListener, setAssistiveDescription, setAssistivePostfix, setAssistivePrefix, setAssistiveRole, setCloseShortcut, setDraggable, setModal, setParent, setPositionX, setPositionY, setResizable, setResizeLazy, setTabStopBottomAssistiveText, setTabStopEnabled, setTabStopTopAssistiveText, setWindowMode |
Methods inherited from class com.vaadin.ui.Panel |
---|
addAction, addActionHandler, addClickListener, addListener, getActionManager, getScrollLeft, getScrollTop, getTabIndex, removeAction, removeActionHandler, removeAllActionHandlers, removeClickListener, removeListener, 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 |
---|
addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setLocale, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
---|
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
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.LegacyComponent |
---|
markAsDirty |
Methods inherited from interface com.vaadin.server.VariableOwner |
---|
isEnabled, isImmediate |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setPrimaryStyleName, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth |
Constructor Detail |
---|
public Popover()
public Popover(com.vaadin.ui.ComponentContainer content)
content
- the content for the popover.Method Detail |
---|
public void beforeClientResponse(boolean initial)
beforeClientResponse
in interface com.vaadin.server.ClientConnector
beforeClientResponse
in class com.vaadin.ui.AbstractComponent
public PopoverState getState()
getState
in class com.vaadin.ui.Window
public void showRelativeTo(com.vaadin.ui.Component relatedComponent)
On a small screen device, a 100% wide overlay will slide in from the bottom or top depending on the given related components position (in an attempt to leave the related component visible, though this is not guaranteed).
relatedComponent
- the component next to which the popover is shown.public void setClosable(boolean closable)
false
.
setClosable
in class com.vaadin.ui.Window
closable
- true to allow the user to close the Popover by tapping outside
of itpublic void removeFromParent()
public void addComponent(com.vaadin.ui.Button b)
b
- the button to add.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |