Package com.sun.lwuit.layouts

Examples of com.sun.lwuit.layouts.BorderLayout


        private Label pic = new Label("");
        private int display_width;
        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);
View Full Code Here


    locator = _locator;
    midlet = _midlet;
    //display = midlet.display;
          is_image = isImage;
    form = new Form("Player Manager");
    form.setLayout(new BorderLayout());
    form.setCommandListener(this);
           if (is_image)
              form.addCommand(Contents.back);
          else
        form.addCommand(Contents.stop);
View Full Code Here

   * @return
   */
  public void getGuiOfflineMenu() {

    offLineMenu = new Form(Contents.offline_form);
    offLineMenu.setLayout(new BorderLayout());
      //  int width = Display.getInstance().getDisplayWidth(); //get the display width
        Container mainContainer;
        int elementWidth = 0;

        mainContainer = new Container();
View Full Code Here

   * @return
   */
  public void getGuiOnlineMenu() {
        internal_state = ONLINE;
      mainForm = new Form(Datas.jid.getUsername() + " (" + Datas.jid.getPresence()+")");
      mainForm.setLayout(new BorderLayout());
      mainForm.setScrollable(false);
      mainForm.getStyle().setBgTransparency(0);
      tabbedPane = new TabbedPane();
    tabbedPane.addTabsListener(listener);
    tabbedPane.getStyle().setBgTransparency(0);
View Full Code Here

      else
        options_form.addComponent(new MyLabel("Server Info not available"));     
     
    }
    else {
      options_form.setLayout(new BorderLayout());
          //int width = Display.getInstance().getDisplayWidth(); //get the display width
          Container mainContainer;
          int elementWidth = 0;

          mainContainer = new Container();
View Full Code Here

       
      }
    //boolean canAnswer = currentConversation.canAnswer();
    //mainForm.removeAllCommands();
        mainForm = new Form(Datas.jid.getUsername() + " (" + Datas.jid.getPresence()+")");
      mainForm.setLayout(new BorderLayout());
      mainForm.setScrollable(false);     
      mainForm.getStyle().setBgTransparency(0);
        mainForm.addCommand(Contents.send, 0);
    mainForm.addCommand(Contents.delete, 1);
      tabbedPane = new TabbedPane();
   
    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);
        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));
     

      }
      else if (j == -1 && p == -1) {
       
        MyTextArea t = new MyTextArea(m, 0,50);
        t.setEnabled(true);
        text.addComponent(t);
      }

           
      conversationForm.addComponent(text);
    }
   
    //if it is multi chat
    if (currentConversation.isMulti) {
      //conversationForm.append(new util.CustomSpacer(conversationForm.getWidth()));
    //  res.append("Room Members: ");
     
     
      Container multi = new Container();
      multi.setLayout(new BorderLayout());
      multi.addComponent(BorderLayout.NORTH,new MyLabel("Room Members:"));
     
      GroupChat chat = (GroupChat)Datas.multichat.get(currentConversation.name);
      //conversationForm.append(new util.CustomStringItem("Room Members:", /*chat.jids,*/ conversationForm.getWidth()));
      Container friends = new Container()
View Full Code Here

          //conversationForm.append(new util.CustomSpacer(conversationForm.getWidth()));
        //  res.append("Room Members: ");
         
         
          Container multi = new Container();
          multi.setLayout(new BorderLayout());
          multi.addComponent(BorderLayout.NORTH,new MyLabel("Room Members:"));
         
          GroupChat chat = (GroupChat)Datas.multichat.get(currentConversation.name);
          //conversationForm.append(new util.CustomStringItem("Room Members:", /*chat.jids,*/ conversationForm.getWidth()));
          Container friends = new Container()
View Full Code Here

    }catch(java.io.IOException e){
     logo = null;
    }  
     //Alert intro = new Alert("Jabber Mix Client", " Created by Gabriele Bianchi", logo, AlertType.INFO);
  
    Container body = new Container(new BorderLayout());
    //body.getStyle().setBgColor(0xFFFFFF,true);
    Label l =  new Label(logo);
    l.setAlignment(Label.CENTER);
    body.addComponent(BorderLayout.NORTH,l);
    MyTextArea t = new MyTextArea("Created by Gabriele Bianchi",0,100);
View Full Code Here

   * Wait for connecting
   * @return
   */
  public void getGuiWaitConnect() {
    Form wait_form = new Form(Contents.wait_form);
    wait_form.setLayout(new BorderLayout());
    //if (wait_form == null) {
   
   
      wait_form.addComponent(BorderLayout.CENTER,new MyLabel("Please wait...."));
    /*  Progress p2;
View Full Code Here

   
    String text = "";
    Form subscriber = null;
    if (type.equalsIgnoreCase("subscription")) {
      subscriber = new Form(Contents.subsc_form);
      subscriber.setLayout(new BorderLayout());
      text = currentjid.getUsername()+ " wants to subscribe your presence!";
    }
    else if (type.equalsIgnoreCase("invitation")) {
      subscriber = new Form(Contents.invit_form);
      text = "You have been invited to " + (String)infopool.get("invit_room") + " from "+(String)infopool.get("invit_from");
    }
    subscriber.setLayout(new BorderLayout());
    MyTextArea t = new MyTextArea(text, 0, 100);
   
    subscriber.addComponent(BorderLayout.CENTER,t);
   
    subscriber.addCommand(Contents.accept);
View Full Code Here

TOP

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

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.