package nu.fw.jeti.ui; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.FocusEvent; import java.awt.event.KeyEvent; import java.util.ArrayList; import java.util.List; import javax.swing.*; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.JToggleButton; import nu.fw.jeti.jabber.elements.Presence; import nu.fw.jeti.util.I18N; import nu.fw.jeti.util.Preferences; import nu.fw.jeti.util.Utils; /** *
Title: im
*Description:
*Copyright: Copyright (c) 2001
*Company:
* @author E.S. de Boer * @version 1.0 */ public class StatusMessagesWindow extends JFrame { //status messages editor // public final static int CHAT=0; // public final static int AVAILABLE=1; // public final static int DND=2; // public final static int AWAY=3; // public final static int XA=4; private JPanel jPanel1 = new JPanel(); private JToggleButton btnChat = new JToggleButton(); private JToggleButton btnAvailable = new JToggleButton(); private JToggleButton btnDnD = new JToggleButton(); private JToggleButton btnAway = new JToggleButton(); private JToggleButton btnXA = new JToggleButton(); private JPanel jPanel2 = new JPanel(); private JButton btnOK = new JButton(); private JButton btnCancel = new JButton(); private JPanel jPanel3 = new JPanel(); private JPanel jPanel4 = new JPanel(); private JButton btnAdd = new JButton(); private JButton btnRemove = new JButton(); private JScrollPane jScrollPane1 = new JScrollPane(); private JPanel[] messagePanels = new JPanel[5]; //private JButton btnUp = new JButton(); private JButton btnUp = new javax.swing.plaf.basic.BasicArrowButton(SwingConstants.SOUTH); private JButton btnDown = new javax.swing.plaf.basic.BasicArrowButton(SwingConstants.NORTH); //private JButton btnDown = new JButton(); private int selectedStatus = Presence.AVAILABLE; private JTextField selectedTextField; public StatusMessagesWindow() { for(int tel=0;tel<5;tel++) { JPanel tempPanel = new JPanel(); //tempPanel.setLayout(new VerticalLayout(0,VerticalLayout.BOTH)); tempPanel.setLayout(new BoxLayout(tempPanel,BoxLayout.Y_AXIS)); List tempList = nu.fw.jeti.util.Preferences.getStatusMessages(tel+1); for(int i=0;i