public ResetPerspectivesMenuBuilder() {
   link.setIcon(IconType.MEDKIT);
   link.setTitle(CommonConstants.INSTANCE.ResetPerspectivesTooltip());
   link.addClickHandler(
       new ClickHandler() {
         @Override
         public void onClick(ClickEvent event) {
           if (Window.confirm(CommonConstants.INSTANCE.PromptResetPerspectives())) {
             final PerspectiveActivity currentPerspective =
                 perspectiveManager.getCurrentPerspective();
             perspectiveManager.removePerspectiveStates(
                 new Command() {
                   @Override
                   public void execute() {
                     if (currentPerspective != null) {
                       // Use ForcedPlaceRequest to force re-loading of the current Perspective
                       final PlaceRequest pr =
                           new ForcedPlaceRequest(
                               currentPerspective.getIdentifier(),
                               currentPerspective.getPlace().getParameters());
                       placeManager.goTo(pr);
                     }
                   }
                 });
           }
         }
       });
 }
Ejemplo n.º 2
0
 public AboutMenuBuilder() {
   link.setIcon(IconType.INFO_CIRCLE);
   link.setTitle(CommonConstants.INSTANCE.About());
   link.addClickHandler(
       new ClickHandler() {
         @Override
         public void onClick(ClickEvent event) {
           popup.show();
         }
       });
 }