List of usage examples for com.vaadin.client ConnectorMap get
public static ConnectorMap get(ApplicationConnection applicationConnection)
From source file:annis.gui.widgets.gwt.client.ui.VGripDragComponent.java
License:Apache License
private boolean startDrag(NativeEvent event) { VTransferable transferable = new VTransferable(); transferable.setDragSource(ConnectorMap.get(client).getConnector(this)); Element targetElement = (Element) event.getEventTarget().cast(); Paintable paintable;//from w w w . j ava 2s . c om Widget w = Util.findWidget(targetElement, null); if (!w.getStyleName().contains("drag-source-enabled")) { return false; } while (w != null && !(w instanceof Paintable)) { w = w.getParent(); } paintable = (Paintable) w; transferable.setData("component", paintable); VDragEvent dragEvent = VDragAndDropManager.get().startDrag(transferable, event, true); transferable.setData("clientX", event.getClientX()); transferable.setData("clientY", event.getClientY()); dragEvent.createDragImage(getElement(), true); return true; }
From source file:com.haulmont.cuba.web.toolkit.ui.client.renderers.componentrenderer.ComponentRendererConnector.java
License:Apache License
/** * Decodes the connectorId from the JSON to the real connector. * * @param jsonConnectorId the json value to decode * @return the component connector to be rendered by the ComponentRenderer *//*w w w .j av a 2 s .c om*/ @Override public ComponentConnector decode(JsonValue jsonConnectorId) { if (jsonConnectorId != Json.createNull()) { return (ComponentConnector) ConnectorMap.get(getConnection()).getConnector(jsonConnectorId.toString()); } else { return null; } }
From source file:com.haulmont.cuba.web.toolkit.ui.client.tree.CubaTreeWidget.java
License:Apache License
protected CubaTreeConnector getConnector() { return (CubaTreeConnector) ConnectorMap.get(client).getConnector(this); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.VDDLayoutStateDragImageProvider.java
License:Apache License
@Override public Element getDragImageElement(Widget w) { ComponentConnector component = Util.findConnectorFor(w); Connector dragImage = state.referenceImageComponents.get(component); if (dragImage != null) { return ConnectorMap.get(component.getConnection()).getElement(dragImage.getConnectorId()); }/* w w w . j av a2 s . c om*/ return null; }
From source file:de.datenhahn.vaadin.rendererpackage.client.connectors.ComponentRendererConnector.java
License:Apache License
public ComponentConnector decode(JsonValue value) { ServerConnector decodedValue = ConnectorMap.get(getConnection()).getConnector(value.toString()); return (ComponentConnector) decodedValue; }