Package com.sun.lwuit

Examples of com.sun.lwuit.RadioButton


        internal_state = STATUS;
    Image[] unselectedImages = new Image[] { Contents.displayImage("offline"), Contents.displayImage("online"), Contents.displayImage("away"), Contents.displayImage("busy")/*, Contents.displayImage("unsubscribed")*/ }
    //status_list = new ChoiceGroup(Contents.choose_status, ChoiceGroup.EXCLUSIVE, Contents.mystring_presence, image);
    status_list = new ButtonGroup();
    for (int k = 0; k < Contents.mystring_presence.length; k++) {
      RadioButton rb = new RadioButton(Contents.mystring_presence[k], unselectedImages[k]);
      Style s = rb.getStyle();
          s.setMargin(0, 0, 0, 0);
        
          rb.setPressedIcon(unselectedImages[k].scaled( (int) (unselectedImages[k].getWidth()* 0.8),
                    (int)(unselectedImages[k].getHeight() *0.8) ));
          rb.setAlignment(Label.LEFT);
            rb.setTextPosition(Label.RIGHT);
          s.setBgTransparency(70);
          status_list.add(rb);
          status_form.addComponent(rb);
          if (Contents.mystring_presence[k].equals(Datas.jid.getPresence())) {
        status_list.setSelected(k);
View Full Code Here


    res.addComponent(new MyLabel("Port"));
    res.addComponent(port);
    res.addComponent(new MyLabel("Connection type"));
    ssl_list = new ButtonGroup();
    for (int k = 0; k < Contents.sslChoices.length; k++) {
      RadioButton rb = new RadioButton(Contents.sslChoices[k]);
      Style s = rb.getStyle();
          s.setMargin(0, 0, 0, 0);
          s.setBgTransparency(0);
          ssl_list.add(rb);
          res.addComponent(rb);
    }
   
    if (Datas.isSSL)
      ssl_list.setSelected(1);
    else if (Datas.isHTTP)
      ssl_list.setSelected(2);
    else
      ssl_list.setSelected(0);
   
    res.addComponent(new MyLabel("Your Avatar"));
    avatar_list = new ButtonGroup(); //choose AVATAR
    String[] img = new String [] {"icon", "jmcAvatar"}; //spostare in contents
    for (int k = 0; k < 2; k++) {
      RadioButton rb = new RadioButton("avatar "+(k+1), Contents.displayImage(img[k]).scaled(16, 16));
      Style s = rb.getStyle();
          s.setMargin(0, 0, 0, 0);
          s.setBgTransparency(0);
          avatar_list.add(rb);
          res.addComponent(rb);
    }
View Full Code Here

    cont.addComponent(room);
    cont.addComponent(new MyLabel("Chat Server"));
    cont.addComponent(server);
    cont.addComponent(new MyLabel("Discover Rooms?"));
    yesno = new ButtonGroup(/*"Discover Rooms?", ChoiceGroup.EXCLUSIVE*/);
    RadioButton rb = new RadioButton("No");
    Style s = rb.getStyle();
        s.setMargin(0, 0, 0, 0);
        s.setBgTransparency(70);
        RadioButton rb1 = new RadioButton("Yes");
    Style s1 = rb1.getStyle();
        s1.setMargin(0, 0, 0, 0);
        s1.setBgTransparency(70);
        cont.addComponent(rb);
        cont.addComponent(rb1);
        yesno.add(rb);
View Full Code Here

TOP

Related Classes of com.sun.lwuit.RadioButton

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.