Package org.onebusaway.webapp.gwt.common.context

Examples of org.onebusaway.webapp.gwt.common.context.ContextImpl


      }
    });

    _dialog.show();

    Context context = new ContextImpl();

    if (!_stopsById.isEmpty()) {
      CoordinateBounds b = new CoordinateBounds();
      for (StopBean stop : _stopsById.values())
        b.addPoint(stop.getLat(), stop.getLon());
View Full Code Here


    DeferredCommand.addCommand(new Command() {
      @Override
      public void execute() {
        Context context = _contextManager.getContext();
        if (context == null)
          context = new ContextImpl();
        onContextChanged(context);
      }
    });
  }
View Full Code Here

    });
  }

  public Context getCoordinateBoundsAsContext(CoordinateBounds bounds) {
    if (bounds.isEmpty())
      return new ContextImpl();
    double latCenter = (bounds.getMinLat() + bounds.getMaxLat()) / 2;
    double lonCenter = (bounds.getMinLon() + bounds.getMaxLon()) / 2;
    double latSpan = bounds.getMaxLat() - bounds.getMinLat();
    double lonSpan = bounds.getMaxLon() - bounds.getMinLon();
    Map<String, String> m = new HashMap<String, String>();
    addBoundsToParams(m, latCenter, lonCenter, latSpan, lonSpan);
    return new ContextImpl(m);
  }
View Full Code Here

  @Override
  public String getCurrentViewAsUrl() {
    Context context = _contextManager.getContext();
    if (context == null)
      context = new ContextImpl();
    context = buildContext(context.getParams(), true);
    return "#" + _contextManager.getContextAsString(context);
  }
View Full Code Here

      addBoundsToParams(m, center.getLatitude(), center.getLongitude(),
          latSpan, lonSpan);
    }

    return new ContextImpl(m);
  }
View Full Code Here

    _contextManager.addContextListener(this);

    Context context = _contextManager.getContext();

    if (context == null)
      context = new ContextImpl();

    final Context finalContext = context;

    // We defer execution of the command so that other modules can finish
    // loading before we fire the context change event
View Full Code Here

      context.put("p", fullPath);
     
      System.out.println("============================");
      System.out.println("context=" + context);
     
      _contextManager.setContext(new ContextImpl(context));
    }
View Full Code Here

    String msg = ex.getMessage();

    Map<String, String> p = new HashMap<String, String>();
    p.put("message", msg);
    ContextImpl c = new ContextImpl(p);

    try {
      _panel.clear();
      Widget widget = _exceptionPage.create(c);
      _panel.add(widget);
View Full Code Here

    _contextManager.addContextListener(this);

    Context context = _contextManager.getContext();

    if (context == null)
      context = new ContextImpl();
    onContextChanged(context);
  }
View Full Code Here

    _contextManager.addContextListener(this);

    Context context = _contextManager.getContext();

    if (context == null)
      context = new ContextImpl();

    final Context finalContext = context;
   
    // We defer execution of the command so that other modules can finish loading before we fire the context change event
    DeferredCommand.addCommand(new Command() {
View Full Code Here

TOP

Related Classes of org.onebusaway.webapp.gwt.common.context.ContextImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.