public void onAddedStar(Star s) { mState = State.Default; setLeftButton(true, "add", DrifMaps.Words.Add()); setRightButton(false, "save", DrifMaps.Words.Save()); setStarButton(true, "star", DrifMaps.Words.Star()); mMapController.addStar(s); mMapController.onChangeCursor(null); }
/** * Event called on start editing * * @param mi */ public void onStartEditing(MapItem mi) { // map handler call this method => witch handler to edit state made before this call mState = State.Editing; showMapItemEdit(mi); mDisplay.setContextButtonsVisible(true); setRightButton(true, "cancel", DrifMaps.Words.Cancel()); setLeftButton(true, "save", DrifMaps.Words.Save()); mMapController.startEditing(mi); }
/** Changes states of objects during @value {@link State#Adding} */ public void onStartAddingItem() { mState = State.Adding; mDisplay.getMenuContent().setOpen(true); mDisplay.setContextButtonsVisible(true); mDisplay.setMapItem(new MapItem()); setLeftButton(true, "save", DrifMaps.Words.Save()); setRightButton(true, "cancel", DrifMaps.Words.Cancel()); setStarButton(false); mMapController.startAdding(); }