Package nu.fw.jeti.jabber.elements

Examples of nu.fw.jeti.jabber.elements.XDataField


        c.anchor = GridBagConstraints.LINE_START;
        c.fill = GridBagConstraints.HORIZONTAL;
        c.insets = new Insets(3, 5, 0, 3);
    for(Iterator i = fields;i.hasNext();)
    {
      XDataField data = (XDataField)i.next();
      parseField(data, pnlFields, c);
    }
        c.gridwidth = 1;
        c.weighty = 1.0;
        c.weightx = 1.0;
View Full Code Here


      {
        var =(String)((Object[])element)[0];
        value =(String)((Object[])element)[1];
        if(value != null)
        {
          builder.addField(new XDataField(var,value));
        }
      }
      else
      {
        JComponent component = (JComponent)element;
        var = component.getName();
        if(component instanceof JCheckBox)
        {
            value = String.valueOf(((JCheckBox)component).isSelected()?1:0)
        }
        else if(component instanceof JTextComponent)
        {
          value = ((JTextComponent)component).getText();
        }
        else if(component instanceof JComboBox)
        {
          value =((LabelValue)((JComboBox)component).getSelectedItem()).value;
        }
        if(value != null)
        {
          builder.addField(new XDataField(var,value));
        }
        if(component instanceof JList)
        {
          JList list = ((JList)component);
          if (!list.isSelectionEmpty())
          {
            Object[] values = list.getSelectedValues();
            for (int i = 0; i < values.length; i++)
            {
              builder.addField(new XDataField(var,((LabelValue)values[i]).value));
            }
          }
         }
      }
    }
View Full Code Here

            XData data= iqSi.getXDataForm();
            if(data.hasFields())
            {
                for(Iterator i = data.getFields();i.hasNext();)
                {
                    XDataField datafield= (XDataField)i.next();
                    if("stream-method".equals(datafield.getVar()))
                    {
                        streamMethod = datafield.getValue();
                    }
                }
            }
            if("http://jabber.org/protocol/ibb".equals(streamMethod)) {
                streamSend = new IBBSend(file,backend,this,to,id);
View Full Code Here

        {
          JID jid=null;
          String nick=null;
          for(Iterator i = xDataPanel.getCurrentField();i.hasNext();)
          {
            XDataField data = (XDataField)i.next();
            if("jid".equals(data.getVar()))
            {
              jid = JID.jidFromString(data.getValue());
            }
            else if("nick".equals(data.getVar()))nick  = data.getValue();
          }
          if(jid!=null)new AddContact(jid,nick,null,backend).setVisible(true);
     
        }
      });
      panel.add(button);
      button = new JButton();
      I18N.setTextAndMnemonic("search.Chat",button);
      button.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
        {
          for(Iterator i = xDataPanel.getCurrentField();i.hasNext();)
          {
            XDataField data = (XDataField)i.next();
            if("jid".equals(data.getVar()))
            {
              JID jid = JID.jidFromString(data.getValue());
              backend.getMain().startChat(jid);
            }
          }
        }
      });
View Full Code Here

TOP

Related Classes of nu.fw.jeti.jabber.elements.XDataField

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.