public class ConnectorMap extends Object
Constructor and Description |
---|
ConnectorMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all registered connectors
|
static ConnectorMap |
get(ApplicationConnection applicationConnection) |
ComponentConnector[] |
getComponentConnectors()
Deprecated.
As of 7.0.1, use
getComponentConnectorsAsJsArray()
for better performance. |
JsArrayObject<ComponentConnector> |
getComponentConnectorsAsJsArray() |
ComponentConnector |
getConnector(com.google.gwt.dom.client.Element element)
Returns a
ComponentConnector element by its root element. |
ServerConnector |
getConnector(String connectorId)
Returns a
ServerConnector by its id |
ComponentConnector |
getConnector(com.google.gwt.user.client.ui.Widget widget)
Retrieves the connector whose widget matches the parameter.
|
Collection<? extends ServerConnector> |
getConnectors()
Deprecated.
As of 7.0.1, use
getConnectorsAsJsArray() for
improved performance. |
JsArrayObject<ServerConnector> |
getConnectorsAsJsArray() |
com.google.gwt.dom.client.Element |
getElement(String connectorId)
Gets the main element for the connector with the given id.
|
boolean |
hasConnector(String connectorId)
Checks if a connector with the given id has been registered.
|
boolean |
isConnector(com.google.gwt.user.client.ui.Widget w)
Tests if the widget is the root widget of a
ComponentConnector . |
boolean |
isDragAndDropPaintable(String pid)
FIXME: What does this even do and why?
|
void |
registerConnector(String id,
ServerConnector connector) |
int |
size() |
void |
unregisterConnector(ServerConnector connector)
Unregisters the given connector; always use after removing a connector.
|
public static ConnectorMap get(ApplicationConnection applicationConnection)
public ServerConnector getConnector(String connectorId)
ServerConnector
by its idid
- The connector idpublic ComponentConnector getConnector(com.google.gwt.dom.client.Element element)
ComponentConnector
element by its root element.element
- Root element of the ComponentConnector
public boolean isDragAndDropPaintable(String pid)
pid
- public boolean hasConnector(String connectorId)
connectorId
- The id to check forpublic void clear()
public ComponentConnector getConnector(com.google.gwt.user.client.ui.Widget widget)
widget
- The widgetpublic void registerConnector(String id, ServerConnector connector)
public com.google.gwt.dom.client.Element getElement(String connectorId)
getConnectorId(Element)
.connectorId
- the id of the widget whose element is desiredpublic void unregisterConnector(ServerConnector connector)
connector
- the connector to remove@Deprecated public ComponentConnector[] getComponentConnectors()
getComponentConnectorsAsJsArray()
for better performance.ComponentConnector
instancesComponentConnector
instancespublic JsArrayObject<ComponentConnector> getComponentConnectorsAsJsArray()
public int size()
@Deprecated public Collection<? extends ServerConnector> getConnectors()
getConnectorsAsJsArray()
for
improved performance.public JsArrayObject<ServerConnector> getConnectorsAsJsArray()
public boolean isConnector(com.google.gwt.user.client.ui.Widget w)
ComponentConnector
.widget
- The widget to testComponentConnector
, false otherwiseCopyright © 2019 Vaadin Ltd. All rights reserved.