Class CmsMaxHeightExtension
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- org.opencms.ui.components.extensions.CmsMaxHeightExtension
-
- All Implemented Interfaces:
com.vaadin.event.MethodEventSource
,com.vaadin.server.ClientConnector
,com.vaadin.server.Extension
,com.vaadin.shared.communication.ServerRpc
,com.vaadin.shared.Connector
,java.io.Serializable
,I_CmsMaxHeightServerRpc
public class CmsMaxHeightExtension extends com.vaadin.server.AbstractExtension implements I_CmsMaxHeightServerRpc
Allows the use of max height in combination with vaadin layout components.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CmsMaxHeightExtension.I_HeightChangeHandler
Callback interfaces for height change notifications.-
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
-
-
Constructor Summary
Constructors Constructor Description CmsMaxHeightExtension(com.vaadin.ui.AbstractComponent component, int maxHeight)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeightChangeHandler(CmsMaxHeightExtension.I_HeightChangeHandler action)
Adds an action to execute when the height is changed.void
fixHeight(int height)
Called in case the widget content exceeds the max height.protected CmsMaxHeightState
getState()
void
removeHeightChangeHandler(java.lang.Runnable action)
Removes a height change handler.void
setEnabled(boolean enabled)
Enables / disables automatic height changes.void
updateMaxHeight(int maxHeight)
Updates the maximum height.-
Methods inherited from class com.vaadin.server.AbstractExtension
extend, getParent, getSupportedParentType, remove, setParent
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, 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, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
-
-
-
Constructor Detail
-
CmsMaxHeightExtension
public CmsMaxHeightExtension(com.vaadin.ui.AbstractComponent component, int maxHeight)
Constructor.- Parameters:
component
- the component to extendmaxHeight
- the max height
-
-
Method Detail
-
addHeightChangeHandler
public void addHeightChangeHandler(CmsMaxHeightExtension.I_HeightChangeHandler action)
Adds an action to execute when the height is changed.- Parameters:
action
- the action
-
fixHeight
public void fixHeight(int height)
Description copied from interface:I_CmsMaxHeightServerRpc
Called in case the widget content exceeds the max height.- Specified by:
fixHeight
in interfaceI_CmsMaxHeightServerRpc
- Parameters:
height
- the height to set- See Also:
I_CmsMaxHeightServerRpc.fixHeight(int)
-
removeHeightChangeHandler
public void removeHeightChangeHandler(java.lang.Runnable action)
Removes a height change handler.- Parameters:
action
- the handler to remove
-
setEnabled
public void setEnabled(boolean enabled)
Enables / disables automatic height changes.- Parameters:
enabled
- if true, enable automatic height changes
-
updateMaxHeight
public void updateMaxHeight(int maxHeight)
Updates the maximum height.- Parameters:
maxHeight
- the new value for the maximum height
-
getState
protected CmsMaxHeightState getState()
- Overrides:
getState
in classcom.vaadin.server.AbstractClientConnector
- See Also:
AbstractClientConnector.getState()
-
-