Package com.vaadin.client.extensions
Class ResponsiveConnector
- java.lang.Object
-
- com.vaadin.client.ui.AbstractConnector
-
- com.vaadin.client.extensions.AbstractExtensionConnector
-
- com.vaadin.client.extensions.ResponsiveConnector
-
- All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler,StateChangeEvent.StateChangeHandler,ServerConnector,ElementResizeListener,Connector,Serializable
public class ResponsiveConnector extends AbstractExtensionConnector implements ElementResizeListener
The client side connector for the Responsive extension.- Since:
- 7.2
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.core.client.JavaScriptObjectheightBreakpointsAll the height breakpoints found for this particular instance.protected static com.google.gwt.core.client.JavaScriptObjectheightRangeCacheAll height-range breakpoints found from the style sheets on the page.protected static StringparsedThemeThe theme that was in use when the width and height range caches were created.protected AbstractComponentConnectortargetThe target component which we will monitor for width changes.protected com.google.gwt.core.client.JavaScriptObjectwidthBreakpointsAll the width breakpoints found for this particular instance.protected static com.google.gwt.core.client.JavaScriptObjectwidthRangeCacheAll width-range breakpoints found from the style sheets on the page.
-
Constructor Summary
Constructors Constructor Description ResponsiveConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringconstructSelectorsForTarget()Construct the list of selectors that should be matched against in the range selectors.protected voidextend(ServerConnector target)Called when the extension is attached to its parent.ResponsiveStategetState()Returns the shared state object for this connector.voidonElementResize(ElementResizeEvent event)Perform actions after element resize.voidonStateChanged(StateChangeEvent event)Notifies the event handler that the state has changed.voidonUnregister()Event called when connector has been unregistered.-
Methods inherited from class com.vaadin.client.extensions.AbstractExtensionConnector
setParent
-
Methods inherited from class com.vaadin.client.ui.AbstractConnector
addStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getStateType, getTag, hasEventListener, init, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setTag, unregisterRpc, updateEnabledState
-
-
-
-
Field Detail
-
target
protected AbstractComponentConnector target
The target component which we will monitor for width changes.
-
widthBreakpoints
protected com.google.gwt.core.client.JavaScriptObject widthBreakpoints
All the width breakpoints found for this particular instance.
-
heightBreakpoints
protected com.google.gwt.core.client.JavaScriptObject heightBreakpoints
All the height breakpoints found for this particular instance.
-
widthRangeCache
protected static com.google.gwt.core.client.JavaScriptObject widthRangeCache
All width-range breakpoints found from the style sheets on the page. Common for all instances.
-
heightRangeCache
protected static com.google.gwt.core.client.JavaScriptObject heightRangeCache
All height-range breakpoints found from the style sheets on the page. Common for all instances.
-
parsedTheme
protected static String parsedTheme
The theme that was in use when the width and height range caches were created.
-
-
Method Detail
-
extend
protected void extend(ServerConnector target)
Description copied from class:AbstractExtensionConnectorCalled when the extension is attached to its parent. This method is only called once as an extension cannot be moved from one parent to another.- Specified by:
extendin classAbstractExtensionConnector- Parameters:
target- The connector this extension extends
-
constructSelectorsForTarget
protected String constructSelectorsForTarget()
Construct the list of selectors that should be matched against in the range selectors.- Returns:
- The selectors in a comma delimited string.
-
onUnregister
public void onUnregister()
Description copied from interface:ServerConnectorEvent called when connector has been unregistered.- Specified by:
onUnregisterin interfaceServerConnector- Overrides:
onUnregisterin classAbstractConnector
-
onStateChanged
public void onStateChanged(StateChangeEvent event)
Description copied from interface:StateChangeEvent.StateChangeHandlerNotifies the event handler that the state has changed.- Specified by:
onStateChangedin interfaceStateChangeEvent.StateChangeHandler- Overrides:
onStateChangedin classAbstractConnector- Parameters:
event- the state change event with details about the change
-
onElementResize
public void onElementResize(ElementResizeEvent event)
Description copied from interface:ElementResizeListenerPerform actions after element resize.- Specified by:
onElementResizein interfaceElementResizeListener- Parameters:
event- the element resize event
-
getState
public ResponsiveState getState()
Description copied from class:AbstractConnectorReturns the shared state object for this connector. Override this method to define the shared state type for your connector.- Specified by:
getStatein interfaceServerConnector- Overrides:
getStatein classAbstractConnector- Returns:
- the current shared state (never null)
-
-