public class PopupButton
extends com.vaadin.ui.AbstractComponent
implements com.vaadin.ui.HasComponents
Vaadin components can be added inside the pop-up.
By default, the pop-up displays a close-button and a header containing the current value of the cell that the pop-up button belongs to.
A button can be marked with "active" style with markActive(boolean).
To add the pop-up button to a specific spreadsheet, call
Spreadsheet.setPopup(CellReference, PopupButton),
Spreadsheet.setPopup(String, PopupButton) or
Spreadsheet.setPopup(int, int, PopupButton). The button can be
removed from the target cell by giving null as the PopupButton
parameter to one of the previously mentioned methods.
| Modifier and Type | Class and Description |
|---|---|
static class |
PopupButton.PopupCloseEvent
An event fired after the pop-up for the
PopupButton returned by
PopupButton.PopupCloseEvent.getPopupButton() has been closed. |
static interface |
PopupButton.PopupCloseListener
Interface for listening for a
PopupButton.PopupCloseEvent fired by a
PopupButton. |
static class |
PopupButton.PopupOpenEvent
An event fired after the pop-up button returned by
PopupButton.PopupOpenEvent.getPopupButton() has been clicked and the pop-up has been
opened. |
static interface |
PopupButton.PopupOpenListener
Interface for listening for a
PopupButton.PopupOpenEvent fired by a
PopupButton. |
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenercom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listenercom.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 |
|---|
PopupButton()
Constructs a new PopupButton.
|
PopupButton(com.vaadin.ui.Component content)
Constructs a new PopupButton with the given content.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPopupCloseListener(PopupButton.PopupCloseListener listener)
Adds a
PopupButton.PopupCloseListener to this pop-up button. |
void |
addPopupOpenListener(PopupButton.PopupOpenListener listener)
Adds a
PopupButton.PopupOpenListener to this pop-up button. |
void |
closePopup()
Closes the pop-up if it is open.
|
void |
detach() |
org.apache.poi.ss.util.CellReference |
getCellReference()
Gets the cell reference for the cell that contains this pop-up button.
|
int |
getColumn()
Gets the column for this pop-up button.
|
com.vaadin.ui.Component |
getContent()
Get the contents of the popup.
|
String |
getPopupHeight()
Gets the height for this pop-up button's pop-up.
|
String |
getPopupWidth()
Gets the width for this pop-up button's pop-up.
|
int |
getRow()
Gets the row for this pop-up button.
|
protected PopupButtonState |
getState() |
protected PopupButtonState |
getState(boolean markAsDirty) |
boolean |
isActive() |
boolean |
isHeaderHidden()
Tells if the pop-up header is currently hidden.
|
Iterator<com.vaadin.ui.Component> |
iterator() |
void |
markActive(boolean active)
Mark the button with "active" - style.
|
void |
openPopup()
Opens the pop-up if the button is currently rendered in the visible area
of the Spreadsheet.
|
void |
removePopupCloseListener(PopupButton.PopupCloseListener listener)
Removes the given
PopupButton.PopupCloseListener from this pop-up button. |
void |
removePopupOpenListener(PopupButton.PopupOpenListener listener)
Removes the given
PopupButton.PopupOpenListener from this pop-up button. |
void |
setContent(com.vaadin.ui.Component content)
Set the contents of the popup.
|
void |
setHeaderHidden(boolean headerHidden)
Sets the pop-up header visible or hidden.
|
void |
setPopupHeight(String height)
Set the height for this pop-up button's pop-up.
|
void |
setPopupWidth(String width)
Set the width for this pop-up button's pop-up.
|
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined, writeDesignaddAttachListener, 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, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesignaddAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefinedforEach, spliteratorpublic PopupButton()
public PopupButton(com.vaadin.ui.Component content)
content - Content of the pop-uppublic org.apache.poi.ss.util.CellReference getCellReference()
public int getColumn()
public int getRow()
public void openPopup()
public void closePopup()
public boolean isHeaderHidden()
public void setHeaderHidden(boolean headerHidden)
headerHidden - true for hidden, false for visible.public void setPopupWidth(String width)
width - New width for the pop-uppublic String getPopupWidth()
public void setPopupHeight(String height)
height - New height for the pop-uppublic String getPopupHeight()
protected PopupButtonState getState()
getState in class com.vaadin.ui.AbstractComponentprotected PopupButtonState getState(boolean markAsDirty)
getState in class com.vaadin.ui.AbstractComponentpublic void setContent(com.vaadin.ui.Component content)
public com.vaadin.ui.Component getContent()
public Iterator<com.vaadin.ui.Component> iterator()
public void markActive(boolean active)
PopupButtonWidget for
the CSS class name.active - true to add "active" style, false to remove itpublic boolean isActive()
public void addPopupOpenListener(PopupButton.PopupOpenListener listener)
PopupButton.PopupOpenListener to this pop-up button.listener - The listener to addpublic void removePopupOpenListener(PopupButton.PopupOpenListener listener)
PopupButton.PopupOpenListener from this pop-up button.listener - The listener to removepublic void addPopupCloseListener(PopupButton.PopupCloseListener listener)
PopupButton.PopupCloseListener to this pop-up button.listener - public void removePopupCloseListener(PopupButton.PopupCloseListener listener)
PopupButton.PopupCloseListener from this pop-up button.listener - public void detach()
detach in interface com.vaadin.server.ClientConnectordetach in class com.vaadin.ui.AbstractComponentCopyright © 2013–2026 Vaadin Ltd. All rights reserved.