/** * Activates the selected control. * * @param listBox */ private void activateControl() { String selectedValue = this.listBox.getValue(this.listBox.getSelectedIndex()); if (this.oldValue != null) { this.clickControls.get(this.oldValue).deactivate(); } Control control = this.clickControls.get(selectedValue); control.activate(); this.oldValue = selectedValue; }
public void removeControl(Control control) { MapImpl.removeControl(getJSObject(), control.getJSObject()); }
public Control getControlsByClass(String className) { JSObject jsObject = MapImpl.getControlsByClass(getJSObject(), className); return Control.narrowToControl(jsObject); }
/** * APIMethod: getControl * * <p>Parameters: id - {String} ID of the control to return. * * <p>Returns: {<OpenLayers.Control>} The control from the map's list of controls which has a * matching 'id'. If none found, returns null. */ public Control getControl(String controlID) { JSObject jsObject = MapImpl.getControl(getJSObject(), controlID); return (jsObject != null) ? Control.narrowToControl(jsObject) : null; }
public void addControl(Control control) { MapImpl.addControl(getJSObject(), control.getJSObject()); }