Package com.sun.lwuit

Examples of com.sun.lwuit.Button.addActionListener()


            b.getStyle().setBgTransparency(0);
            b.getStyle().setBorder(Border.createLineBorder(1));
            b.setAlignment(Label.CENTER);
            b.setTextPosition(Label.BOTTOM);
            mainContainer.addComponent(b);
            b.addActionListener(action);
          //  buttonpool.put(b, Contents.offlineChoices[i]);
            elementWidth = Math.max(b.getPreferredW(), elementWidth);
        }
           
        //Calculate the number of columns for the GridLayout according to the
View Full Code Here


      b.getStyle().setBgTransparency(0);
      b.getStyle().setBorder(Border.createLineBorder(1));
      b.setAlignment(Label.CENTER);
      b.setTextPosition(Label.TOP);
     
          b.addActionListener(action);
          elementWidth = Math.max(b.getPreferredW(), elementWidth);
          cont.addComponent(b);
    }
    int cols = 2;//width / elementWidth;
      int rows = Contents.gtwChoices.length / cols;
View Full Code Here

    b.setAlignment(Label.CENTER);
    b.getStyle().setBgTransparency(100);
    b.getStyle().setBorder(Border.createEmpty());
    //b.getStyle().setBgSelectionColor(bgSelectionColor);
    //b.getStyle().setFgSelectionColor(fgSelectionColor);
    b.addActionListener(new ButtonActionListener());
    contacts.addComponent(b);
    contacts.addComponent(contacts_list);
    //contacts_list.append(hide, null);
    //contacts_list.setFont(contacts_list.size() - 1, Font.getFont(font.getFace(), Font.STYLE_ITALIC, font.getSize()));
   
View Full Code Here

              b.getStyle().setBgTransparency(0);
              b.getStyle().setBorder(Border.createLineBorder(1));
              b.setAlignment(Label.CENTER);
              b.setTextPosition(Label.BOTTOM);
              mainContainer.addComponent(b);
              b.addActionListener(action);
            //  buttonpool.put(b, Contents.offlineChoices[i]);
              elementWidth = Math.max(b.getPreferredW(), elementWidth);
          }
             
          //Calculate the number of columns for the GridLayout according to the
View Full Code Here

       
    for (int k=0; k<Contents.rosterChoices.length; k++) {
          Button b = new Button(Contents.rosterChoices[k]);
            b.getStyle().setBgTransparency(100);
            b.getStyle().setBorder(Border.createEmpty());
            b.addActionListener(action);
            conv_list.addComponent(b);
        }
       
    if (Presence.getPresence("unsubscribed").equals(currentjid.getPresence())){
      Button b = new Button(Contents.online_choices[1]);
View Full Code Here

       
    if (Presence.getPresence("unsubscribed").equals(currentjid.getPresence())){
      Button b = new Button(Contents.online_choices[1]);
            b.getStyle().setBgTransparency(100);
            b.getStyle().setBorder(Border.createEmpty());
            b.addActionListener(action);
            conv_list.addComponent(b);
      //conv_list.append(Contents.online_choices[1], null);//try to subscribe
      //conv_list.setFont(conv_list.size() - 1, Font.getFont(font.getFace(), Font.STYLE_BOLD, font.getSize()));
    }
    else if (Presence.getPresence("unavailable").equals(currentjid.getPresence())) {
View Full Code Here

    else if (Presence.getPresence("unavailable").equals(currentjid.getPresence())) {
      //wake-up with SMS
      Button b = new Button(Contents.online_choices[2]);
            b.getStyle().setBgTransparency(100);
            b.getStyle().setBorder(Border.createEmpty());
            b.addActionListener(action);
            conv_list.addComponent(b);
    }

    //res.append(conv_list);
    //res.append(new util.CustomSpacer(res.getWidth(), res.getHeight()));
View Full Code Here

      ButtonActionListener action = new ButtonActionListener();
      for (int k=0; k<Contents.judChoices.length; k++) {
            Button b = new Button(Contents.judChoices[k], img[k]);
              b.getStyle().setBgTransparency(100);
              b.setTextPosition(Button.RIGHT);
              b.addActionListener(action);
              res.addComponent(b);
          }
     
      if (infopool.containsKey("jud_message"))
      {
View Full Code Here

        }
        j = j + 5;
        Button link = new Button(m.substring(j, k));
        link.getStyle().setBgTransparency(100);
        link.getStyle().setBorder(Border.createEmpty()); //no border
        link.addActionListener(new ButtonActionListener());
        text.addComponent(link); k = k + 5;
        if (k < m.length()-1)
          text.addComponent(new MyTextArea(m.substring(k, m.length()), 0, 100));
     
View Full Code Here

    }
   
    Button his = new Button("Show History");
    his.getStyle().setBgTransparency(100);
    his.getStyle().setBorder(Border.createEmpty());
    his.addActionListener(new ButtonActionListener());
    conversationForm.addComponent(his);
    //his.addCommand(Contents.history);
   
    //TODO: se mettessimo un tastino send sotto la textarea?
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.