public class AbstractControl extends Object implements IJavascriptComponent
Modifier | Constructor and Description |
---|---|
protected |
AbstractControl(String name,
boolean externalizable) |
Modifier and Type | Method and Description |
---|---|
String |
getId()
Note: currently the naming of a component is related to the concrete class i.e.
|
String |
getJSadd(IOpenLayersMap map) |
protected String |
getJSadd(IOpenLayersMap map,
Map<String,String> parameters)
A convenience wrapper to
getJSadd(IOpenLayersMap, String)
that builds the parameter string from the parameter map and then invokes the method. |
protected String |
getJSadd(IOpenLayersMap map,
String parameterString)
Calls map.addControl() for the generated initialization javascript using the parameterString
if present.
|
protected String |
getJSadd(IOpenLayersMap map,
String javascriptClassName,
Map<String,String> parameters) |
protected String |
getJSadd(IOpenLayersMap map,
String javascriptClassName,
String parameterString) |
protected String |
getJSinvoke(IOpenLayersMap map,
String invocation)
A helper similiar to OpenLayersMap.getJSInvoke except instead of just getting the map context
we get this control context from the root.
|
String |
getJSremove(IOpenLayersMap map) |
org.apache.wicket.request.resource.JavaScriptResourceReference[] |
getJSResourceReferences()
In some cases a javascript component will provide its own javascript resource.
|
List<Layer> |
getLayerList() |
void |
registerJavascriptEvent(IOpenLayersMap map,
String event,
org.apache.wicket.model.IModel<String> eventHandlingJavascriptModel)
Allows javascript to be wired into events on this control.
|
void |
setLayerList(List<Layer> layerList) |
protected AbstractControl(String name, boolean externalizable)
protected String getJSadd(IOpenLayersMap map, Map<String,String> parameters)
getJSadd(IOpenLayersMap, String)
that builds the parameter string from the parameter map and then invokes the method.map
- parameters
- protected String getJSadd(IOpenLayersMap map, String javascriptClassName, Map<String,String> parameters)
protected String getJSadd(IOpenLayersMap map, String parameterString)
map
- parameterString
- contains comma separated list of parametersprotected String getJSadd(IOpenLayersMap map, String javascriptClassName, String parameterString)
map
- the openlayers map java binding.javascriptClassName
- the name of the javascript class being invoked.parameterString
- the constructor parameters if any.public String getJSadd(IOpenLayersMap map)
getJSadd
in interface IJavascriptComponent
public String getJSremove(IOpenLayersMap map)
getJSremove
in interface IJavascriptComponent
public String getId()
IJavascriptComponent
getId
in interface IJavascriptComponent
public void registerJavascriptEvent(IOpenLayersMap map, String event, org.apache.wicket.model.IModel<String> eventHandlingJavascriptModel)
control.events.register("featureselected", this, function(evt) { modelValue <-- this is the content from the model. });
Note: This is not the method to use if you want to use ajax and have wicket to the event processing.
map
- the map object that the control is bound to (will be bound to).event
- the name of the OpenLayersEventmodel
- an IModelpublic org.apache.wicket.request.resource.JavaScriptResourceReference[] getJSResourceReferences()
IJavascriptComponent
getJSResourceReferences
in interface IJavascriptComponent
protected String getJSinvoke(IOpenLayersMap map, String invocation)
map
- invocation
- Copyright © 2015. All rights reserved.