/**
   * 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;
  }
Exemplo n.º 2
0
 public void removeControl(Control control) {
   MapImpl.removeControl(getJSObject(), control.getJSObject());
 }
Exemplo n.º 3
0
 public Control getControlsByClass(String className) {
   JSObject jsObject = MapImpl.getControlsByClass(getJSObject(), className);
   return Control.narrowToControl(jsObject);
 }
Exemplo n.º 4
0
  /**
   * 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;
  }
Exemplo n.º 5
0
 public void addControl(Control control) {
   MapImpl.addControl(getJSObject(), control.getJSObject());
 }