com.vaadin.client.extensions
Class ResponsiveConnector

java.lang.Object
  extended by com.vaadin.client.ui.AbstractConnector
      extended by com.vaadin.client.extensions.AbstractExtensionConnector
          extended by com.vaadin.client.extensions.ResponsiveConnector
All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler, StateChangeEvent.StateChangeHandler, ServerConnector, ElementResizeListener, com.vaadin.shared.Connector, java.io.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
protected  JavaScriptObject heightBreakpoints
          All the height breakpoints found for this particular instance
protected static JavaScriptObject heightRangeCache
          All height-range breakpoints found from the style sheets on the page.
protected static java.lang.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  JavaScriptObject widthBreakpoints
          All the width breakpoints found for this particular instance
protected static JavaScriptObject widthRangeCache
          All width-range breakpoints found from the style sheets on the page.
 
Constructor Summary
ResponsiveConnector()
           
 
Method Summary
protected  java.lang.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.
 void onElementResize(ElementResizeEvent event)
           
 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, getState, getStateType, hasEventListener, init, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, unregisterRpc, updateEnabledState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected AbstractComponentConnector target
The target component which we will monitor for width changes


widthBreakpoints

protected JavaScriptObject widthBreakpoints
All the width breakpoints found for this particular instance


heightBreakpoints

protected JavaScriptObject heightBreakpoints
All the height breakpoints found for this particular instance


widthRangeCache

protected static JavaScriptObject widthRangeCache
All width-range breakpoints found from the style sheets on the page. Common for all instances.


heightRangeCache

protected static JavaScriptObject heightRangeCache
All height-range breakpoints found from the style sheets on the page. Common for all instances.


parsedTheme

protected static java.lang.String parsedTheme
The theme that was in use when the width and height range caches were created.

Constructor Detail

ResponsiveConnector

public ResponsiveConnector()
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 class AbstractExtensionConnector
Parameters:
target - The connector this extension extends

constructSelectorsForTarget

protected java.lang.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 interface ServerConnector
Overrides:
onUnregister in class AbstractConnector

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 interface StateChangeEvent.StateChangeHandler
Overrides:
onStateChanged in class AbstractConnector
Parameters:
event - the state change event with details about the change

onElementResize

public void onElementResize(ElementResizeEvent event)
Specified by:
onElementResize in interface ElementResizeListener


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