/** @see net.rim.device.api.ui.FieldChangeListener#fieldChanged(Field, int) */
  public void fieldChanged(final Field field, final int context) {
    if (field == _map.getMapField()) {
      // Get the map's current dimensions
      final MapDimensions dim = _map.getMapField().getDimensions();

      switch (context) {
        case MapAction.ACTION_CENTER_CHANGE:
          _latField.setText("Latitude: " + dim.getCenter().getLat());
          _lonField.setText("Longitude: " + dim.getCenter().getLon());
          break;
        case MapAction.ACTION_ZOOM_CHANGE:
          _zoomField.setText("Zoom Level: " + dim.getZoom());
          break;
      }
    }
  }
示例#2
0
 protected void createScreenContents(VerticalFieldManager manager) {
   LabelField logDescription = new LabelField("Application log:", USE_ALL_WIDTH);
   manager.add(logDescription);
   log = new LabelField("", USE_ALL_WIDTH);
   logContainer.setListener(this);
   log.setText(logContainer.toString());
   manager.add(log);
 }
  public void setProgressMsg(String msg) {

    progressMsg.setText(msg);

    try {
      add(progressMsgFieldmanager);
    } catch (IllegalStateException ex) {

    }
  }
示例#4
0
 public void fieldChanged(Field field, int context) {
   if (field == btnGrabar) {
     grabar();
   } else {
     if (field instanceof mkpyLabelEditField) {
       lblEstado.setText(
           ""
               + (((mkpyLabelEditField) field).getText().getMaxSize()
                   - ((mkpyLabelEditField) field)
                       .getText()
                       .getTextLength())); // + (txtZona.getTextLength() -
                                           // txtZona.getText().length()));
     }
   }
 }
示例#5
0
 public void logChanged(String text) {
   log.setText(text);
 }
示例#6
0
 public void focusChanged(Field field, int eventType) {
   lblEstado.setText("");
 }