Exemple #1
0
 @UiHandler({"code", "description"})
 void onCodeValueChange(ValueChangeEvent<String> event) {
   if (editElement != null) {
     editElement.setCode(code.getText());
     editElement.setDescription(description.getText());
   }
 }
Exemple #2
0
  @Override
  public MapDrawingObject createDrawingObject(String elementName) {
    Element el = getModel().getXml().getOwnerDocument().createElement(elementName);
    getModel().getXml().appendChild(el);
    // ret.setAttribute("pid", "" + GpsReadNode.pointId++);
    MapDrawingObject mdo = new MapDrawingObject(el);
    mapDrawingObjects.add(mdo);
    mdo.getPid();

    return mdo;
  }
Exemple #3
0
  @UiHandler({"zone", "easting", "northing"})
  void onUTMValueChange(ValueChangeEvent<String> event) {
    if (editElement != null) {
      editElement.setZone(zone.getText());
      editElement.setEasting(easting.getText());
      editElement.setNorthing(northing.getText());

      editElement.setLatLngFromUTM();

      mapPanel.updateDrawingObject(editElement);
    }
  }
Exemple #4
0
  private void setWidgetValuesFromEditElement(MapDrawingObject element) {
    selectMsg.setVisible(false);
    editPanel.setVisible(true);

    editLabel.setText("Editing: " + element.getType());
    code.setText(editElement.getCode());
    description.setText(editElement.getDescription());

    if (element.getType().equals("point")) {
      pointFields.setVisible(true);
      zone.setText(editElement.getZone());
      easting.setText(editElement.getEasting());
      northing.setText(editElement.getNorthing());
      height.setText(editElement.getHeight());
      latitude.setText(editElement.getLatitude());
      longitude.setText(editElement.getLongitude());
    } else {
      pointFields.setVisible(false);
    }
  }