示例#1
0
 private void seleccion() {
   if (opciones[menu.getSelectedIndex()].equals(MetodosGlobales.opciones[1])) { // Atracciones
     Estilos.pushScreen(new Atracciones());
   } else if (opciones[menu.getSelectedIndex()].equals(MetodosGlobales.opciones[2])) { // Nuevas
     Estilos.pushScreen(new MenuContactos());
   } else if (opciones[menu.getSelectedIndex()].equals(MetodosGlobales.opciones[3])) { // Buscar
     Estilos.pushScreen(new Establecidas(MetodosGlobales.establecidasTitulo()));
   } else if (opciones[menu.getSelectedIndex()].equals(
       MetodosGlobales.opciones[5])) { // Facturacion
     Estilos.pushScreen(new FacturaResumen());
   } else if (opciones[menu.getSelectedIndex()].equals(
       MetodosGlobales.opciones[6])) { // Indicadores
     Estilos.pushScreen(new IndicadorDetalle());
   }
 }
示例#2
0
  protected boolean navigationClick(int status, int time) {
    Field field = this.getFieldWithFocus();
    if (field == _listaConsulResumen) {
      int index = _listaConsulResumen.getSelectedIndex();
      Item item = (Item) get(_listaConsulResumen, index);
      if (item.isCabecera()) {
        item.setColapsado(!item.isColapsado());
        llenaLista();
        _listaConsulResumen.setSelectedIndex(index);
        return true;
      } else {
        item = (Item) jerarquia.elementAt(item.getIndexPadre());
        int op = getCategoria(index);
        if (op >= 0) {
          int cant = Integer.parseInt(((Item) get(_listaConsulResumen, index)).getValor());
          if (cant > 0) {
            String campana =
                item.getDescripcion().substring(4) + item.getDescripcion().substring(1, 3);
            progress.setTitle("Buscando... ");
            progress.open();
            progress.close();
            try {
              Estilos.pushScreen(new ConsultaSeccion(campana, "", "", "", "", "" + op));
            } catch (Exception e) {

            }
          }
        }
        return true;
      }
    }
    return super.navigationClick(status, time);
  }