com.vaadin.ui
Class PopupView

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractComponentContainer
              extended by com.vaadin.ui.PopupView
All Implemented Interfaces:
MethodEventSource, ClientConnector, RpcTarget, Sizeable, com.vaadin.shared.Connector, Component, ComponentContainer, HasComponents, HasComponents.ComponentAttachDetachNotifier, java.io.Serializable, java.lang.Iterable<Component>

public class PopupView
extends AbstractComponentContainer

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:
Serialized Form

Nested Class Summary
static interface PopupView.Content
          Used to deliver customized content-packages to the PopupView.
static 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.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.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.server.Sizeable
Sizeable.Unit
 
Field Summary
 
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
PopupView(PopupView.Content content)
          Creates a PopupView through the PopupView.Content interface.
PopupView(java.lang.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)
          Deprecated. Since 7.0, replaced by addPopupVisibilityListener(PopupVisibilityListener)
 void addPopupVisibilityListener(PopupView.PopupVisibilityListener listener)
          Add a listener that is called whenever the visibility of the popup is changed.
 void beforeClientResponse(boolean initial)
          Called before the shared state and RPC invocations are sent to the client.
 int getComponentCount()
          Gets the number of contained components.
 PopupView.Content getContent()
          Returns the content-package for this PopupView.
protected  com.vaadin.shared.ui.popupview.PopupViewState getState()
          Returns the shared state bean with information to be sent from the server to the client.
 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.
 java.util.Iterator<Component> iterator()
          This class only contains other components when the popup is showing.
 void moveComponentsFrom(ComponentContainer source)
          Not supported in this implementation.
 void removeAllComponents()
          Not supported in this implementation.
 void removeComponent(Component c)
          Not supported in this implementation
 void removeListener(PopupView.PopupVisibilityListener listener)
          Deprecated. Since 7.0, replaced by removePopupVisibilityListener(PopupVisibilityListener)
 void removePopupVisibilityListener(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 setPopupVisible(boolean visible)
          Set the visibility of the popup.
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, isComponentVisible, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setVisible, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, handleError, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, 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.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
 
Methods inherited from interface com.vaadin.server.ClientConnector
detach, encodeState, getExtensions, getStateType, handleConnectorRequest, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.RpcTarget
getRpcManager
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setSizeFull, setSizeUndefined, setWidth
 

Constructor Detail

PopupView

public PopupView(java.lang.String small,
                 Component large)
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).

Parameters:
small - the minimal textual representation as HTML
large - the full, Component-type representation

PopupView

public PopupView(PopupView.Content content)
Creates a PopupView through the PopupView.Content interface. This allows the creator to dynamically change the contents of the PopupView.

Parameters:
content - the PopupView.Content that contains the information for this
Method Detail

setContent

public void setContent(PopupView.Content newContent)
                throws java.lang.IllegalArgumentException
This method will replace the current content of the panel with a new one.

Parameters:
newContent - PopupView.Content object containing new information for the PopupView
Throws:
java.lang.IllegalArgumentException - if the method is passed a null value, or if one of the content methods returns null

getContent

public PopupView.Content getContent()
Returns the content-package for this PopupView.

Returns:
the PopupView.Content for this object or null

setPopupVisible

public void setPopupVisible(boolean visible)
Set the visibility of the popup. Does not hide the minimal representation.

Parameters:
visible -

beforeClientResponse

public void beforeClientResponse(boolean initial)
Description copied from interface: ClientConnector
Called before the shared state and RPC invocations are sent to the client. Gives the connector an opportunity to set computed/dynamic state values or to invoke last minute RPC methods depending on other component features.

This method must not alter the component hierarchy in any way. Calling ClientConnector.markAsDirty() from this method will have no effect.

Specified by:
beforeClientResponse in interface ClientConnector
Overrides:
beforeClientResponse in class AbstractComponent
Parameters:
initial - true if the client-side connector will be created and initialized after this method has been invoked. false if there is already an initialized client-side connector.

isPopupVisible

public boolean isPopupVisible()
Return whether the popup is visible.

Returns:
true if the popup is showing

isHideOnMouseOut

public boolean isHideOnMouseOut()
Check if this popup will be hidden when the user takes the mouse cursor out of the popup area.

Returns:
true if the popup is hidden on mouse out, false otherwise

setHideOnMouseOut

public 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. The default is true.

Parameters:
hideOnMouseOut -

iterator

public java.util.Iterator<Component> iterator()
This class only contains other components when the popup is showing.

Returns:
the component iterator.
See Also:
ComponentContainer.getComponentIterator()

getComponentCount

public int getComponentCount()
Gets the number of contained components. Consistent with the iterator returned by AbstractComponentContainer.getComponentIterator().

Returns:
the number of contained components (zero or one)

removeAllComponents

public void removeAllComponents()
Not supported in this implementation.

Specified by:
removeAllComponents in interface ComponentContainer
Overrides:
removeAllComponents in class AbstractComponentContainer
Throws:
java.lang.UnsupportedOperationException
See Also:
AbstractComponentContainer.removeAllComponents()

moveComponentsFrom

public void moveComponentsFrom(ComponentContainer source)
                        throws java.lang.UnsupportedOperationException
Not supported in this implementation.

Specified by:
moveComponentsFrom in interface ComponentContainer
Overrides:
moveComponentsFrom in class AbstractComponentContainer
Parameters:
source - the container which contains the components that are to be moved to this container.
Throws:
java.lang.UnsupportedOperationException
See Also:
AbstractComponentContainer.moveComponentsFrom(com.vaadin.ui.ComponentContainer)

addComponent

public void addComponent(Component c)
                  throws java.lang.UnsupportedOperationException
Not supported in this implementation.

Specified by:
addComponent in interface ComponentContainer
Overrides:
addComponent in class AbstractComponentContainer
Parameters:
c - the component to be added.
Throws:
java.lang.UnsupportedOperationException
See Also:
AbstractComponentContainer.addComponent(com.vaadin.ui.Component)

replaceComponent

public void replaceComponent(Component oldComponent,
                             Component newComponent)
                      throws java.lang.UnsupportedOperationException
Not supported in this implementation.

Parameters:
oldComponent - the old component that will be replaced.
newComponent - the new component to be replaced.
Throws:
java.lang.UnsupportedOperationException
See Also:
ComponentContainer.replaceComponent(com.vaadin.ui.Component, com.vaadin.ui.Component)

removeComponent

public void removeComponent(Component c)
                     throws java.lang.UnsupportedOperationException
Not supported in this implementation

Specified by:
removeComponent in interface ComponentContainer
Overrides:
removeComponent in class AbstractComponentContainer
Parameters:
c - the component to be removed.
Throws:
java.lang.UnsupportedOperationException
See Also:
AbstractComponentContainer.removeComponent(com.vaadin.ui.Component)

getState

protected com.vaadin.shared.ui.popupview.PopupViewState getState()
Description copied from class: AbstractComponent
Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().

Overrides:
getState in class AbstractComponent
Returns:
updated component shared state

addPopupVisibilityListener

public void addPopupVisibilityListener(PopupView.PopupVisibilityListener listener)
Add a listener that is called whenever the visibility of the popup is changed.

Parameters:
listener - the listener to add
See Also:
PopupView.PopupVisibilityListener, PopupView.PopupVisibilityEvent, removeListener(PopupVisibilityListener)

addListener

@Deprecated
public void addListener(PopupView.PopupVisibilityListener listener)
Deprecated. Since 7.0, replaced by addPopupVisibilityListener(PopupVisibilityListener)


removePopupVisibilityListener

public void removePopupVisibilityListener(PopupView.PopupVisibilityListener listener)
Removes a previously added listener, so that it no longer receives events when the visibility of the popup changes.

Parameters:
listener - the listener to remove
See Also:
PopupView.PopupVisibilityListener, addListener(PopupVisibilityListener)

removeListener

@Deprecated
public void removeListener(PopupView.PopupVisibilityListener listener)
Deprecated. Since 7.0, replaced by removePopupVisibilityListener(PopupVisibilityListener)



Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.