Package com.codename1.io

Examples of com.codename1.io.ConnectionRequest


                d.setLayout(new BorderLayout());
                WebBrowser wb = new WebBrowser();
                wb.setPage(getDescription(name), "http://localhost");
                d.addComponent(BorderLayout.CENTER, wb);
                d.setDisposeWhenPointerOutOfBounds(true);
                Command backCommand = new Command("Back") {
          public void actionPerformed(ActionEvent evt) {
            d.dispose();
          }
                };
                d.addCommand(backCommand);
View Full Code Here


  public abstract void visit(ComboBox tb);
 
  public void visit(Container c) {
    int count = c.getComponentCount();
    for (int i = 0; i < count; i++) {
      Component component = c.getComponentAt(i);
      Log.p(getClass().getName() + " visit[" + i + "] \""+ component.getName()
          + "\" (" + component.getClass().getName() + ")", Log.DEBUG);
      if (component instanceof CheckBox) {
        visit((CheckBox)component);
      } else if (component instanceof ComboBox) {
        visit((ComboBox)component);
      } else if (component instanceof RadioButton) {
View Full Code Here

   *
   * @param webBrowser
   */
  public void onDisposeLogin(final Form backForm, final WebBrowser webBrowser) {
    webBrowser.stop();
    Container parent = webBrowser.getParent();
    parent.removeComponent(webBrowser);
    parent.revalidate();
    if (backForm != null) {
      backForm.showBack();
    }
  }
View Full Code Here

    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);
                d.setLayout(new BorderLayout());
                WebBrowser wb = new WebBrowser();
                wb.setPage(getDescription(name), "http://localhost");
                d.addComponent(BorderLayout.CENTER, wb);
                d.setDisposeWhenPointerOutOfBounds(true);
                Command backCommand = new Command("Back") {
          public void actionPerformed(ActionEvent evt) {
            d.dispose();
          }
                };
                d.addCommand(backCommand);
                d.setBackCommand(backCommand);
                d.show(1, 1, 1, 1);
            }
        });       
  }
View Full Code Here

    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);
                d.setLayout(new BorderLayout());
                WebBrowser wb = new WebBrowser();
                wb.setPage(getDescription(name), "http://localhost");
                d.addComponent(BorderLayout.CENTER, wb);
                d.setDisposeWhenPointerOutOfBounds(true);
                Command backCommand = new Command("Back") {
          public void actionPerformed(ActionEvent evt) {
            d.dispose();
          }
                };
                d.addCommand(backCommand);
                d.setBackCommand(backCommand);
                d.show(1, 1, 1, 1);
            }
        });       
  }
View Full Code Here

    return _instance;
  }
 
  public int getDeviceResolution() {
    if (deviceResolution == -1) {
      Display d = Display.getInstance();
      long actual = d.getDisplayHeight() * d.getDisplayWidth();
      if (actual <= LIMIT_VERY_LOW) {
        deviceResolution = VERY_LOW;
      } else if (actual <= LIMIT_LOW) {
        deviceResolution = LOW;
      } else if (actual <= LIMIT_MEDIUM) {
View Full Code Here

  public void authenticate(final Form currentForm) {
    if (onLoadAccessToken() == true) {
      return;
    }
    final Form backForm = (currentForm == null) ? Display.getInstance().getCurrent() : currentForm;

    RequestTokenRequest rtr = new RequestTokenRequest(serviceProvider, signer, callback);
    // Retrieve (and wait) for the request token
    NetworkManager.getInstance().addToQueueAndWait(rtr);
    RequestToken requestToken = rtr.getToken();
View Full Code Here

   * Handle placement of the web browser, ie. in a form or dialog.
   *
   * @param webBrowser
   */
  public void onDisplayLogin(final Form backForm, final WebBrowser webBrowser) {
    Form form = new Form("Login");
    form.setScrollableY(false);
    if (backForm != null) {
      Command cancel = new Command("Cancel") {
        public void actionPerformed(ActionEvent ev) {
          backForm.showBack();
        }
      };
      form.addCommand(cancel);
      form.setBackCommand(cancel);
    }
    form.setLayout(new BorderLayout());
    form.addComponent(BorderLayout.CENTER, webBrowser);
    form.show();
  }
View Full Code Here

      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);
      }
    };
    ImageDownloadService.createImageToStorage(url, al, name + "-mapmarker");
View Full Code Here

      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);
      }
    };
    ImageDownloadService.createImageToStorage(url, al, name + "-mapmarker");
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.