Package com.sun.lwuit.layouts

Examples of com.sun.lwuit.layouts.BoxLayout


  public GatewayForm(GuiMidlet _midlet)
  {
    super("Gateway");
    midlet = _midlet;
    services = Datas.server_services;
    this.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
    configureFirstScreen();
   
  }
View Full Code Here


   * @return Form
   */
  public void getGuiJudMenu() {
    Form res = new Form("Search");
    if (infopool.containsKey("register")){
      res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
      TextField tf = new TextField( "", 32);
      TextField tf2 = new TextField( "", 32);
      TextField tf3 = new TextField( "", 64);
      infopool.put("jud_name", tf);
      infopool.put("jud_surname", tf2);
      infopool.put("jud_mail", tf3);
      res.addComponent(new MyLabel("Name"));
      res.addComponent(tf);
      res.addComponent(new MyLabel("Surname"));
      res.addComponent(tf2);
      res.addComponent(new MyLabel("Mail"));
      res.addComponent(tf3);
    }
    else if (infopool.containsKey("search")) {
      res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
      //TextField tf = new TextField("", 32);
      TextField tf2 = new TextField( "", 32);
      TextField tf3 = new TextField("", 32);
      TextField tf4 = new TextField( "", 32);
      TextField tf5 = new TextField("", 32);
      //infopool.put("jud_username", tf);
      infopool.put("jud_name", tf2);
      infopool.put("jud_surname", tf3);
      infopool.put("jud_nick", tf4);
      infopool.put("jud_mail", tf5);
            res.addComponent(new MyLabel("Nick"));
      res.addComponent(tf4);
      res.addComponent(new MyLabel("Name"));
      res.addComponent(tf2);
      res.addComponent(new MyLabel("Surname"));
      res.addComponent(tf3);
      //res.addComponent(new MyLabel("Username"));
      //res.addComponent(tf);
      res.addComponent(new MyLabel("Mail"));
      res.addComponent(tf5);
    }
    else {
      res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
      Image[] img = new Image[]{Contents.displayImage("connected"), Contents.displayImage("unsubscribed")};
      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);
View Full Code Here

    tabbedPane.getStyle().setBgTransparency(0);
       
     
    conversationForm = new Container();
    conversationForm.setScrollableY(true);
    conversationForm.setLayout(new BoxLayout(BoxLayout.Y_AXIS));

    //conversationForm.getStyle().setBgColor()
    Vector msgs = currentConversation.messages;
    Message msg;
    //if (currentConversation.isMulti || canAnswer) {
    TextArea tf = new TextArea(2,100,TextArea.ANY); //settare stile
    tf.setFocus(true);
 
    //TextBox tf = new TextBox("", ">", 128, TextArea.ANY);
    infopool.put("text2send", tf);
    conversationForm.addComponent(tf);
   
    int maxText = 11; //max texts displayed
    if (history || msgs.size() < maxText)
      maxText = msgs.size();//all texts
   
    history = false; //reset
        //int lin = 0; //links count
    for (int i=msgs.size()-1; i>=msgs.size()-maxText; i--) {
      msg = (Message) msgs.elementAt(i);
      int j,p = -1;
          //TODO: mettere sfondo di colore alternato
      String m;
      if (currentConversation.isMulti)
        m = msg.getTextNick(); //cambiare
      else
        m = msg.getText(); //cambiare
      Container text = new Container(new BoxLayout(BoxLayout.X_AXIS));
     
      /*if (i%2 != 0) {
        text.getStyle().setBgTransparency(255);
       
      }*/
      text.getStyle().setBorder(Border.createEmpty()); //no border
      Label txt = new Label(m.substring(0, m.indexOf(">")+1));
      txt.getStyle().setFgColor(0xF1F57C);
      txt.getStyle().setBgTransparency(0);
      text.addComponent(txt);
      m = m.substring(m.indexOf(">")+1, m.length());
      if ((p = m.indexOf("1smile")) != -1) { //check smiles
        //conversationForm.addComponent(txt);
        if (p > 0) {
          text.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
          text.addComponent(new MyTextArea(m.substring(0, p),0,p));
        }
        Label l = new Label(Contents.displayImage(m.substring(p, p + 7)));
        l.getStyle().setBgTransparency(0);
        text.addComponent( l);
        if (p + 8 < m.length()-1)
          text.addComponent(new MyTextArea(m.substring(p + 8, m.length()),0,(m.length()-(p+8))));
     
      }
      if ((j = m.indexOf("+url+")) != -1) { //check links
        //conversationForm.addComponent(txt);
        //String name_link = "link";
          /*  if (lin == 0)
                  lin++;
            else {
                  name_link += lin;
                  lin++;
            }*/
        int k = m.indexOf("-url-");
        if (j > 0) {
          text.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
          text.addComponent(new MyTextArea(m.substring(0, j), 0,j));
        }
        j = j + 5;
        Button link = new Button(m.substring(j, k));
        link.getStyle().setBgTransparency(100);
View Full Code Here

          String m;
          if (currentConversation.isMulti)
            m = msg.getTextNick(); //cambiare
          else
            m = msg.getText(); //cambiare
          Container text = new Container(new BoxLayout(BoxLayout.X_AXIS));
         
      /*if (i%2 != 0) {
        text.getStyle().setBgTransparency(255);
       
      }*/
      text.getStyle().setBorder(Border.createEmpty());
          Label txt = new Label(m.substring(0, m.indexOf(">")+1));
          txt.getStyle().setFgColor(0xF1F57C);
          txt.getStyle().setBgTransparency(0);
          text.addComponent(txt);
          m = m.substring(m.indexOf(">")+1, m.length());
          if ((p = m.indexOf("1smile")) != -1) { //check smiles
          //  conversationForm.addComponent(txt);
            if (p > 0) {
              text.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
              text.addComponent(new MyTextArea(m.substring(0, p),0,p));
            }
            Label l = new Label(Contents.displayImage(m.substring(p, p + 7)));
            l.getStyle().setBgTransparency(0);
            text.addComponent( l);
            if (p + 8 < m.length()-1)
              text.addComponent(new MyTextArea(m.substring(p + 8, m.length()),0,(m.length()-(p+8))));
         
          }
          if ((j = m.indexOf("+url+")) != -1) { //check links
            //conversationForm.addComponent(txt);
            //String name_link = "link";
              /*  if (lin == 0)
                      lin++;
                else {
                      name_link += lin;
                      lin++;
                }*/
            text.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
            int k = m.indexOf("-url-");
            if (j > 0) {
              text.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
              text.addComponent(new MyTextArea(m.substring(0, j), 0,j));
            }
            j = j + 5;
            Button link = new Button(m.substring(j, k));
            link.getStyle().setBgTransparency(100);
View Full Code Here

   * Show the form to insert user jid information
   * @return
   */
  public void getGuiParams() {
    Form res = new Form(Contents.settings_form);
    res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
   
    /*String subdomain = "";
    if (Datas.subdomain != null)
      subdomain = "@"+Datas.subdomain;
      */
 
View Full Code Here

  public void getGuiRoomList() {
    Form rooms = new Form("Chat Rooms");
        rooms.setLayout(new BorderLayout());
       // rooms.setScrollable(false);
        Container cont = new Container();
        cont.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
    //show existing chats
    //openrooms = new ChoiceGroup("Your Active Chats", ChoiceGroup.EXCLUSIVE);
    //if (infopool.remove("newchat") != null) {
        TextField nick = new TextField(Datas.jid.getUsername(), 32);
        TextField room = new TextField(/*"Chat Room", */"", 32);
View Full Code Here

        private Label focus = new Label("");
       
        public ContactsRenderer() {
            setLayout(new BorderLayout());
            addComponent(BorderLayout.WEST, pic);
            Container cnt = new Container(new BoxLayout(BoxLayout.Y_AXIS));
            name.getStyle().setBgTransparency(0);
            name.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
            name.getStyle().setFgColor(0xF1F57C);
            status.getStyle().setBgTransparency(0);
           
View Full Code Here

    tabbedPane.addTabsListener(listener);
    tabbedPane.getStyle().setBgTransparency(0);
       
        //}else
          //mainForm.removeAllCommands();
    Container contacts = new Container(new BoxLayout(BoxLayout.Y_AXIS));
    contacts.getStyle().setBorder(Border.createEmpty());
    if (Datas.jid.status_message != null && !Datas.jid.status_message.equals("")){
      Label mood = new Label(Datas.jid.status_message);
      mood.getStyle().setBgTransparency(0);
      contacts.addComponent(mood);
View Full Code Here

    options_form = new Form(Contents.options_form);
    internal_state = OPTIONS;
   
   
    if (infopool.containsKey("ServerInfo")) {//server info
      options_form.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
      options_form.removeCommand(Contents.ok);
      infopool.remove("ServerInfo");
      if (Datas.server_services.size() > 0) {
 
        options_form.addComponent(new MyLabel("Server Services:"));
View Full Code Here

    }
  }

  public void getGuiChangeStatus() {
    Form status_form = new Form(Contents.choose_status);
    status_form.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
 
        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();
View Full Code Here

TOP

Related Classes of com.sun.lwuit.layouts.BoxLayout

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.