public void commandAction(Command command, Displayable displayable) { if (command == back) { controller.MainMenu(); } if (command == viewStages) { busNos = busNo.getString().toUpperCase(); fetchStagesData(busNos); } if (command == backToNo) { controller.getDisp().setCurrent(this); } if (command == MapStages) { controller.pointresultCanvas.busStagesPoints.removeAllElements(); for (int mapStages = 0; mapStages < PostionAddress.length - 1; mapStages++) { String pos = PostionAddress[mapStages]; String[] point = StringUtil.split(pos, "||"); System.out.println(point[0] + "== " + point[1]); controller.pointBusStages(point[0], point[1]); } String pos = PostionAddress[Stages.getSelectedIndex()]; String[] point = StringUtil.split(pos, "||"); controller.gotoSpot(point[0], point[1]); controller.ShowPointingCanvas(); } if (command == backToPlaces) { controller.getDisp().setCurrent(Stages); } if (command == showBuses) { controller.showProgressBar(); fetchBusNoData(); } if (command == showStages) { busNos = busesNearMe.getString(busesNearMe.getSelectedIndex()).toUpperCase(); fetchStagesData(busNos); } if (command == viewBusPosition) { String[] data = GetBusPosition("Tt"); String Message = "" + data[0] + "\n" + data[1] + "\n" + data[2]; controller.showBusPosition(Message, data[3], data[4]); } }