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:
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.core.client.JavaScriptObject
heightBreakpoints
All the height breakpoints found for this particular instance.
protected static com.google.gwt.core.client.JavaScriptObject
heightRangeCache
All height-range breakpoints found from the style sheets on the page.
protected static String
parsedTheme
The theme that was in use when the width and height range caches were created.
protected AbstractComponentConnector
target
The target component which we will monitor for width changes.
protected com.google.gwt.core.client.JavaScriptObject
widthBreakpoints
All the width breakpoints found for this particular instance.
protected static com.google.gwt.core.client.JavaScriptObject
widthRangeCache
All width-range breakpoints found from the style sheets on the page.
-
Constructor Summary
Constructors Constructor Description ResponsiveConnector()
-
Method Summary
All Methods Modifier and Type Method Description protected String
constructSelectorsForTarget()
Construct the list of selectors that should be matched against in the range selectors.
protected void
extend(ServerConnector target)
Called when the extension is attached to its parent.
ResponsiveState
getState()
Returns the shared state object for this connector.
void
onElementResize(ElementResizeEvent event)
Perform actions after element resize.
void
onStateChanged(StateChangeEvent event)
Notifies the event handler that the state has changed.
void
onUnregister()
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:
AbstractExtensionConnector
Called 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:
extend
in 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:
ServerConnector
Event called when connector has been unregistered.
Specified by:
onUnregister
in interfaceServerConnector
Overrides:
onUnregister
in classAbstractConnector
-
onStateChanged
public void onStateChanged(StateChangeEvent event)
Description copied from interface:
StateChangeEvent.StateChangeHandler
Notifies the event handler that the state has changed.
Specified by:
onStateChanged
in interfaceStateChangeEvent.StateChangeHandler
Overrides:
onStateChanged
in classAbstractConnector
Parameters:
event
- the state change event with details about the change
-
onElementResize
public void onElementResize(ElementResizeEvent event)
Description copied from interface:
ElementResizeListener
Perform actions after element resize.
Specified by:
onElementResize
in interfaceElementResizeListener
Parameters:
event
- the element resize event
-
getState
public ResponsiveState getState()
Description copied from class:
AbstractConnector
Returns the shared state object for this connector. Override this method to define the shared state type for your connector.
Specified by:
getState
in interfaceServerConnector
Overrides:
getState
in classAbstractConnector
Returns:
the current shared state (never null)
-
-