public class CalendarConnector extends AbstractComponentConnector implements ActionOwner, SimpleManagedLayout, Paintable
VCalendar
on the client side.SIGNIFICANT_MOVE_THRESHOLD
Constructor and Description |
---|
CalendarConnector() |
Modifier and Type | Method and Description |
---|---|
String |
getActionCaption(String actionKey)
Get the text that is displayed for a context menu item
|
Date |
getActionEndDate(String actionKey)
Get the end date for an action item
|
String |
getActionIcon(String actionKey)
Get the icon url for a context menu item
|
String |
getActionID(String actionKey)
Get the original action ID that was passed in from the shared state
|
Action[] |
getActions()
Returns ALL currently registered events.
|
Date |
getActionStartDate(String actionKey)
Get the start date for an action item
|
ApplicationConnection |
getClient()
Returns the ApplicationConnection used to connect to the server side
|
String |
getPaintableId() |
CalendarState |
getState()
Returns the shared state object for this connector.
|
TooltipInfo |
getTooltipInfo(com.google.gwt.dom.client.Element element)
Gets the tooltip info for the given element.
|
VCalendar |
getWidget()
Returns the widget associated with this paintable.
|
boolean |
hasTooltip()
Check whether there might be a tooltip for this component.
|
protected void |
init()
Called when the connector has been initialized.
|
void |
layout() |
void |
onStateChanged(StateChangeEvent stateChangeEvent)
Notifies the event handler that the state has changed.
|
void |
onUnregister()
Event called when connector has been unregistered.
|
protected void |
registerListeners()
Registers listeners on the calendar so server can be notified of the
events
|
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client) |
createWidget, delegateCaptionHandling, flush, getIcon, getIconUri, getLayoutManager, isReadOnly, isRealUpdate, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidth, registerTouchHandlers, sendContextClickEvent, setWidgetEnabled, setWidgetStyleName, setWidgetStyleNameWithPrefix, shouldHandleLongTap, unregisterTouchHandlers, updateComponentSize, updateComponentSize, updateEnabledState, updateWidgetSize, updateWidgetStyleNames
addStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getStateType, hasEventListener, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, unregisterRpc
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delegateCaptionHandling, flush, getLayoutManager, isReadOnly, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidth, setWidgetEnabled
addStateChangeHandler, addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, hasEventListener, isEnabled, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, updateEnabledState
getConnectorId
protected void init()
AbstractConnector
init
in class AbstractConnector
public void onUnregister()
ServerConnector
onUnregister
in interface ServerConnector
onUnregister
in class AbstractComponentConnector
public VCalendar getWidget()
AbstractComponentConnector
getWidget
in interface ComponentConnector
getWidget
in class AbstractComponentConnector
public CalendarState getState()
AbstractConnector
getState
in interface ComponentConnector
getState
in interface ServerConnector
getState
in class AbstractComponentConnector
protected void registerListeners()
public void onStateChanged(StateChangeEvent stateChangeEvent)
StateChangeEvent.StateChangeHandler
onStateChanged
in interface StateChangeEvent.StateChangeHandler
onStateChanged
in class AbstractComponentConnector
stateChangeEvent
- the state change event with details about the changepublic void updateFromUIDL(UIDL uidl, ApplicationConnection client)
updateFromUIDL
in interface Paintable
public ApplicationConnection getClient()
getClient
in interface ActionOwner
public TooltipInfo getTooltipInfo(com.google.gwt.dom.client.Element element)
ComponentConnector
When overriding this method, ComponentConnector.hasTooltip()
should also be
overridden to return true
in all situations where this
method might return a non-empty result.
getTooltipInfo
in interface ComponentConnector
getTooltipInfo
in class AbstractComponentConnector
element
- The element to lookup a tooltip forpublic boolean hasTooltip()
ComponentConnector
ComponentConnector.getTooltipInfo(Element)
) if this method returns true.
This is only done to optimize performance, so in cases where the status
is not known, it's safer to return true
so that there will
be a tooltip handler even though it might not be needed in all cases.
hasTooltip
in interface ComponentConnector
hasTooltip
in class AbstractComponentConnector
true
if some part of the component might have a
tooltip, otherwise false
public String getActionID(String actionKey)
actionKey
- the unique action keypublic String getActionCaption(String actionKey)
actionKey
- The unique action keypublic String getActionIcon(String actionKey)
actionKey
- The unique action keypublic Date getActionStartDate(String actionKey) throws ParseException
actionKey
- The unique action keyParseException
public Date getActionEndDate(String actionKey) throws ParseException
actionKey
- The unique action keyParseException
public Action[] getActions()
#getActions(Date)
to
get the actions for a specific dategetActions
in interface ActionOwner
public String getPaintableId()
getPaintableId
in interface ActionOwner
public void layout()
layout
in interface SimpleManagedLayout
Copyright © 2016 Vaadin Ltd. All rights reserved.