예제 #1
0
  @Override
  public void prepareFromRequest(PlaceRequest request) {
    super.prepareFromRequest(request);

    context.setFromPlaceRequest(request);

    GraphPresenter graph = graphs.getGraph(context.getGraph());
    graph.setContext(context);
    graph.setWidth(800);
    graph.setHeight(600);

    NavigationBar navigationBar = navigationBarProvider.get();
    navigationBar.addNavigationClickHandler(this);
    graph.setNavigationWidget(navigationBar);

    String[] hiddenLabels = context.getHiddenLabels();
    if (hiddenLabels != null) {
      for (String label : hiddenLabels) {
        graph.hideLabel(PrioritizedLabel.fromParamValue(label));
      }
    }

    setInSlot(GRAPH_SLOT, graph);

    GraphContextSwitchEvent.fire(getEventBus(), context);
  }
예제 #2
0
 @Override
 public void onNavigationClick(NavigationClickEvent event) {
   if (context != null) {
     context.navigateBy(event.getAmount());
     NavigationEvent.fire(getEventBus(), context, event.getAmount());
     StartTimeChangeEvent.fire(getEventBus(), context);
   }
 }