Package com.codename1.io

Examples of com.codename1.io.ConnectionRequest


  void onDenied(RequestToken token) {
    Log.p("Denied", Log.DEBUG);
    // user triggered, so by default do nothing, just continue with limited
    // privileges. Override this to handle otherwise.
    for (Enumeration e = deniedListeners.elements(); e.hasMoreElements(); ) {
      ((ActionListener)e.nextElement()).actionPerformed(new ActionEvent(token));
    }
  }
View Full Code Here


  }

  void onVerified(RequestToken token) {
    Log.p("Verified: " + token.getVerifier(), Log.DEBUG);
    for (Enumeration e = verifiedListeners.elements(); e.hasMoreElements(); ) {
      ((ActionListener)e.nextElement()).actionPerformed(new ActionEvent(token));
    }
    signRequest(token);
    NetworkManager.getInstance().addToQueueAndWait(this);
  }
View Full Code Here

  }

  public void onReceiveAccessToken(AccessToken token) {
    this.accessToken = token;
    for (Enumeration e = receiveListeners.elements(); e.hasMoreElements(); ) {
      ((ActionListener)e.nextElement()).actionPerformed(new ActionEvent(accessToken));
    }
  }
View Full Code Here

    protected void readResponse(InputStream input) throws IOException {
      JSONParser parser = new JSONParser();
      Hashtable h = parser.parse(new InputStreamReader(input));
      if (h.containsKey(RESPONSE_KEY_AD)) {
        fireResponseListener(new ActionEvent(h.get(RESPONSE_KEY_AD)));
      }
    }
View Full Code Here

          // twitter page noted at the top of this class.
          setMaxId(id);
        }
       
      }
      fireResponseListener(new ActionEvent(result));
    }
  }
View Full Code Here

   * com.codename1.io.services.TwitterRESTService#readResponse(java.io.InputStream
   * )
   */
  protected void readResponse(InputStream input) throws IOException {
    Result result = Result.fromContent(input, Result.JSON);
    fireResponseListener(new ActionEvent(result));
  }
View Full Code Here

    RequestToken requestToken = rtr.getToken();
   
    // Use the request token to retrieve an access token for the authorizing user.
    final ObservableWebBrowser wb = new ObservableWebBrowser();
    AccessTokenRequest atr = new AccessTokenRequest(serviceProvider, signer, requestToken);
    atr.addReceiveTokenListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        Log.p("onAccessToken()", Log.DEBUG);
        AccessToken at = (AccessToken)evt.getSource();
        onReceiveAccessToken(at);
        onSaveAccessToken(at);
        onAuthenticated();
        onDisposeLogin(backForm, wb);
      }
    });
    atr.addDeniedListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        onDisposeLogin(backForm, wb);
      }
    });
View Full Code Here

    String url = kml.getAsString(path);
    if (url == null) {
      url = DEFAULT_PIN;
    }
    System.out.println("url: " + url);
    ActionListener al = new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        Image i = (Image)((NetworkEvent)event).getMetaData();
        System.out.println("Setting icon for point: " + pl.getName());
        pl.setIcon(i);
      }
View Full Code Here

        }
        setMarkerIcon(p, kml, style);
        addPoint(p);
      }
    }
    addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                PointLayer p = (PointLayer) evt.getSource();
                System.out.println("pressed " + p);
                String name = p.getName();
                final Dialog d = new Dialog(name);
View Full Code Here

    String url = kml.getAsString(path);
    if (url == null) {
      url = DEFAULT_PIN;
    }
    System.out.println("url: " + url);
    ActionListener al = new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        Image i = (Image)((NetworkEvent)event).getMetaData();
        System.out.println("Setting icon for point: " + pl.getName());
        pl.setIcon(i);
      }
View Full Code Here

TOP

Related Classes of com.codename1.io.ConnectionRequest

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.