com.vaadin.ui.
Class PopupView
java.lang.Object
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.PopupView
All Implemented Interfaces:
MethodEventSource, Paintable, Sizeable, VariableOwner, Component, ComponentContainer, Serializable, EventListener
- extends AbstractComponentContainer
public class PopupView
A component for displaying a two different views to data. The minimized view
is normally used to render the component, and when it is clicked the full
view is displayed on a popup. The inner class PopupView.Content
is
used to deliver contents to this component.
Author:
Vaadin Ltd.
See Also:
Nested Class Summary | |
---|---|
static interface |
PopupView.Content
Used to deliver customized content-packages to the PopupView. |
class |
PopupView.PopupVisibilityEvent
This event is received by the PopupVisibilityListeners when the visibility of the popup changes. |
static interface |
PopupView.PopupVisibilityListener
Defines a listener that can receive a PopupVisibilityEvent when the visibility of the popup changes. |
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent |
---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
Nested classes/interfaces inherited from interface com.vaadin.ui.ComponentContainer |
---|
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.terminal.Paintable |
---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Field Summary |
---|
Fields inherited from interface com.vaadin.terminal.Sizeable |
---|
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
---|---|
PopupView(PopupView.Content content)
Creates a PopupView through the PopupView.Content interface. |
|
PopupView(String small,
Component large)
A simple way to create a PopupPanel. |
Method Summary | |
---|---|
void |
addComponent(Component c)
Not supported in this implementation. |
void |
addListener(PopupView.PopupVisibilityListener listener)
Add a listener that is called whenever the visibility of the popup is changed. |
void |
changeVariables(Object source,
Map<String,Object> variables)
Deserialize changes received from client. |
int |
getComponentCount()
Gets the number of contained components. |
Iterator<Component> |
getComponentIterator()
This class only contains other components when the popup is showing. |
PopupView.Content |
getContent()
Returns the content-package for this PopupView. |
boolean |
getPopupVisibility()
Deprecated. Use isPopupVisible() instead. |
boolean |
isHideOnMouseOut()
Check if this popup will be hidden when the user takes the mouse cursor out of the popup area. |
boolean |
isPopupVisible()
Return whether the popup is visible. |
void |
moveComponentsFrom(ComponentContainer source)
Not supported in this implementation. |
void |
paintContent(PaintTarget target)
Paint (serialize) the component for the client. |
void |
removeAllComponents()
Not supported in this implementation. |
void |
removeComponent(Component c)
Not supported in this implementation |
void |
removeListener(PopupView.PopupVisibilityListener listener)
Removes a previously added listener, so that it no longer receives events when the visibility of the popup changes. |
void |
replaceComponent(Component oldComponent,
Component newComponent)
Not supported in this implementation. |
void |
setContent(PopupView.Content newContent)
This method will replace the current content of the panel with a new one. |
void |
setHideOnMouseOut(boolean hideOnMouseOut)
Should the popup automatically hide when the user takes the mouse cursor out of the popup area? If this is false, the user must click outside the popup to close it. |
void |
setPopupVisibility(boolean visible)
Deprecated. Use #setPopupVisible() instead. |
void |
setPopupVisible(boolean visible)
Set the visibility of the popup. |
Methods inherited from class com.vaadin.ui.AbstractComponentContainer |
---|
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, removeListener, removeListener, requestRepaintAll, setEnabled, setHeight, setWidth |
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.Component |
---|
addListener, addStyleName, childRequestedRepaint, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setIcon, setParent, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.vaadin.terminal.Paintable |
---|
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId |
Methods inherited from interface com.vaadin.terminal.VariableOwner |
---|
isImmediate |
Methods inherited from interface com.vaadin.terminal.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits |
Constructor Detail |
---|
PopupView
public PopupView(String small,
Component large)
- Parameters:
small
- the minimal textual representation as HTMLlarge
- the full, Component-type representation
A simple way to create a PopupPanel. Note that the minimal representation
may not be dynamically updated, in order to achieve this create your own
Content object and use PopupView(Content)
.
PopupView
public PopupView(PopupView.Content content)
- Parameters:
content
- the PopupView.Content that contains the information for this
Creates a PopupView through the PopupView.Content interface. This allows the creator to dynamically change the contents of the PopupView.
Method Detail |
---|
setContent
public void setContent(PopupView.Content newContent)
throws IllegalArgumentException
- Parameters:
newContent
- PopupView.Content object containing new information for the PopupView- Throws:
IllegalArgumentException
- if the method is passed a null value, or if one of the content methods returns null
This method will replace the current content of the panel with a new one.
getContent
public PopupView.Content getContent()
- Returns:
- the PopupView.Content for this object or null
Returns the content-package for this PopupView.
setPopupVisibility
@Deprecated
public void setPopupVisibility(boolean visible)
Deprecated. Use #setPopupVisible()
instead.
getPopupVisibility
@Deprecated
public boolean getPopupVisibility()
Deprecated. Use isPopupVisible()
instead.
setPopupVisible
public void setPopupVisible(boolean visible)
- Parameters:
visible
-
Set the visibility of the popup. Does not hide the minimal representation.
isPopupVisible
public boolean isPopupVisible()
- Returns:
- true if the popup is showing
Return whether the popup is visible.
isHideOnMouseOut
public boolean isHideOnMouseOut()
- Returns:
- true if the popup is hidden on mouse out, false otherwise
Check if this popup will be hidden when the user takes the mouse cursor out of the popup area.
setHideOnMouseOut
public void setHideOnMouseOut(boolean hideOnMouseOut)
- Parameters:
hideOnMouseOut
-
Should the popup automatically hide when the user takes the mouse cursor out of the popup area? If this is false, the user must click outside the popup to close it. The default is true.
getComponentIterator
public Iterator<Component> getComponentIterator()
- Returns:
- the component iterator.
- See Also:
ComponentContainer.getComponentIterator()
This class only contains other components when the popup is showing.
getComponentCount
public int getComponentCount()
- Returns:
- the number of contained components (zero or one)
Gets the number of contained components. Consistent with the iterator
returned by getComponentIterator()
.
removeAllComponents
public void removeAllComponents()
- Specified by:
removeAllComponents
in interfaceComponentContainer
- Overrides:
removeAllComponents
in classAbstractComponentContainer
Not supported in this implementation.
moveComponentsFrom
public void moveComponentsFrom(ComponentContainer source)
throws UnsupportedOperationException
- Specified by:
moveComponentsFrom
in interfaceComponentContainer
- Overrides:
moveComponentsFrom
in classAbstractComponentContainer
- Parameters:
source
- the container which contains the components that are to be moved to this container.- Throws:
UnsupportedOperationException
- See Also:
AbstractComponentContainer.moveComponentsFrom(com.vaadin.ui.ComponentContainer)
Not supported in this implementation.
addComponent
public void addComponent(Component c)
throws UnsupportedOperationException
- Specified by:
addComponent
in interfaceComponentContainer
- Overrides:
addComponent
in classAbstractComponentContainer
- Parameters:
c
- the component to be added.- Throws:
UnsupportedOperationException
- See Also:
AbstractComponentContainer.addComponent(com.vaadin.ui.Component)
Not supported in this implementation.
replaceComponent
public void replaceComponent(Component oldComponent,
Component newComponent)
throws UnsupportedOperationException
- Parameters:
oldComponent
- the old component that will be replaced.newComponent
- the new component to be replaced.- Throws:
UnsupportedOperationException
- See Also:
ComponentContainer.replaceComponent(com.vaadin.ui.Component, com.vaadin.ui.Component)
Not supported in this implementation.
removeComponent
public void removeComponent(Component c)
throws UnsupportedOperationException
- Specified by:
removeComponent
in interfaceComponentContainer
- Overrides:
removeComponent
in classAbstractComponentContainer
- Parameters:
c
- the component to be removed.- Throws:
UnsupportedOperationException
- See Also:
AbstractComponentContainer.removeComponent(com.vaadin.ui.Component)
Not supported in this implementation
paintContent
public void paintContent(PaintTarget target)
throws PaintException
- Overrides:
paintContent
in classAbstractComponent
- Parameters:
target
- the target UIDL stream where the component should paint itself to- Throws:
PaintException
- if the paint operation failed.- See Also:
AbstractComponent.paintContent(com.vaadin.terminal.PaintTarget)
Paint (serialize) the component for the client.
changeVariables
public void changeVariables(Object source,
Map<String,Object> variables)
- Specified by:
changeVariables
in interfaceVariableOwner
- Overrides:
changeVariables
in classAbstractComponent
- Parameters:
source
- the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.variables
- the Mapping from variable names to new variable values.- See Also:
AbstractComponent.changeVariables(java.lang.Object, java.util.Map)
Deserialize changes received from client.
addListener
public void addListener(PopupView.PopupVisibilityListener listener)
- Parameters:
listener
- the listener to add- See Also:
PopupView.PopupVisibilityListener
,PopupView.PopupVisibilityEvent
,removeListener(PopupVisibilityListener)
Add a listener that is called whenever the visibility of the popup is changed.
removeListener
public void removeListener(PopupView.PopupVisibilityListener listener)
- Parameters:
listener
- the listener to remove- See Also:
PopupView.PopupVisibilityListener
,addListener(PopupVisibilityListener)
Removes a previously added listener, so that it no longer receives events when the visibility of the popup changes.