Package xnap.gui.event

Examples of xnap.gui.event.PopupListener


 
        ctm = new ConnectionsTableModel(Connections.getInstance());
        jta = ctm.createJTable();
        jta.setShowGrid(false);
 
  MouseListener popupListener = new PopupListener(popup);
  jta.addMouseListener(popupListener);
  jta.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
              connectAction);
  jta.getActionMap().put(connectAction, connectAction);
View Full Code Here


  // table
        stm = createTableModel();
  jta = stm.createJTable();
  jta.setShowGrid(false);
  stm.addTableModelListener(this);
  PopupListener pl = new PopupListener(parent.getPopupMenu());
  jta.addMouseListener(pl);
  DoubleClickListener dcl
      = new DoubleClickListener(parent.getDefaultAction(), jta);
  jta.addMouseListener(dcl);
  jta.getInputMap().put(ksEnter, parent.getDefaultAction());
View Full Code Here

  jm.addSeparator();

  // user table
  wtm = new WhoisTableModel();
  jtaUsers = wtm.createJTable();
  jtaUsers.addMouseListener(new PopupListener(jm));
  jtaUsers.setShowGrid(false);

  JScrollPane jspUsers = new JScrollPane(jtaUsers);
  jpUsers.add(jspUsers, BorderLayout.CENTER);
View Full Code Here

        jta = stm.createJTable();
        jta.setShowGrid(false);

  // double click listener
        jta.addMouseListener(new TableDataListener());
        MouseListener popupListener = new PopupListener(popup);
        jta.addMouseListener(popupListener);
  jta.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
            acConnect);
  jta.getActionMap().put(acConnect, acConnect);
View Full Code Here

  JPopupMenu popup = new JPopupMenu();
  popup.add(acJoinChannel);
  popup.addSeparator();
  popup.add(acCreateChannel);
 
  MouseListener popupListener = new PopupListener(popup);
  jta.addMouseListener(popupListener);

  // server combo box
  JPanel jpServer = new JPanel(new BorderLayout());
  jpServer.setBorder(new EmptyBorder(5, 5, 5, 5));
View Full Code Here

    UserMenu jm = new UserMenu(this, true);
     
    utm = new ChatUserTableModel("user", userData);
    jta = utm.createJTable();
    utm.addTableModelListener(this);
    MouseListener ml = new PopupListener(jm);
    jta.addMouseListener(ml);
    jta.setShowGrid(false);

    JScrollPane jsp = new JScrollPane(jta);
    jpUsers.add(jsp, BorderLayout.CENTER);
    //jta.setPreferredScrollableViewportSize(new Dimension(250, 200));

    // server label
    JPanel jpServer = new JPanel(new BorderLayout());
    jpServer.setBorder(new EmptyBorder(5, 5, 5, 5));
     
    jlServer = new JLabel(" ");
    jpServer.add(jlServer, BorderLayout.CENTER);

    jpUsers.add(jpServer, BorderLayout.SOUTH);
     
    // input
    Box boxBottom = new Box(BoxLayout.X_AXIS);

    jteInput = new HistoryTextField("", 20);
    jteInput.getInputMap().put
      (KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), acSend);
    boxBottom.add(jteInput);

    boxBottom.add(Box.createHorizontalStrut(5));

    jcbServerIsSticky = new JCheckBox(XNap.tr("Sticky"));
    boxBottom.add(jcbServerIsSticky);

    jcbServers = new JComboBox();
    jcbServers.setRenderer(new ChatServerCellRenderer());
    boxBottom.add(jcbServers);

    boxBottom.add(new JButton(acSend));

    // popup menu
    JPopupMenu popupMenu = new JPopupMenu();
    saveChatLogAction = new SaveChatLogAction();
    popupMenu.add(new JMenuItem(saveChatLogAction));
    cpChat.getTextPane().addMouseListener(new PopupListener(popupMenu));


    // split pane
    jspH = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    jspH.add(cpChat, JSplitPane.LEFT);
View Full Code Here

  jm.addSeparator();

  // hotlist table
  htm = new HotlistTableModel();
  jtaHotlist = htm.createJTable();
  jtaHotlist.addMouseListener(new PopupListener(jm));
  jtaHotlist.getSelectionModel().addListSelectionListener(this);
  jtaHotlist.setShowGrid(false);
  jpHotlist.add(new JScrollPane(jtaHotlist), BorderLayout.CENTER);

  // filter combo box
View Full Code Here

      ("autoComplete", this);

  // popup menu
  JPopupMenu pmenu = new JPopupMenu();
  pmenu.add(new JMenuItem(new ClearHistoryAction()));
  jtf.addMouseListener(new PopupListener(pmenu));
    }
View Full Code Here

TOP

Related Classes of xnap.gui.event.PopupListener

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.