public void onAddingStar(String type) { mStarType = type; mState = State.AddingStar; mMapController.onChangeCursor(Cursor.CROSSHAIR.toString()); mDisplay.getMenuContent().setOpen(false); setStarButton(true, "cancel", DrifMaps.Words.Cancel()); setLeftButton(false); setRightButton(false); }
/** 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(); }
/** Changes states of objects during @value {@link State#Default} */ public void onFinishAdding(boolean canceled) { mState = State.Default; mDisplay.setContextButtonsVisible(false); mMapController.finishWorking(canceled); mDisplay.getMenuContent().setOpen(false); onClearContextItems(); mDisplay.setMapItem(null); mDisplay.getStreetView().hide(); resetButtons(); mDisplay.setCurrentMenuTab(0); mDisplay.getForm().getMapItemType().setValue(""); // its first null item }
protected void showMapItemEdit(MapItem mi) { mDisplay.setMapItem(mi); mDisplay.getMenuContent().setOpen(true); mDisplay.getContextItemsContainer().clear(); if (mi.getPros() != null) { for (String s : mi.getPros()) onAddPro(s, false); } if (mi.getCons() != null) { for (String s : mi.getCons()) onAddCon(s, false); } if (mi.getDetails() != null) { for (Detail d : mi.getDetails()) onAddDetail(d, false); } setLeftButton(true, "edit", DrifMaps.Words.Edit()); setRightButton(true, "cancel", DrifMaps.Words.Hide()); }