Package tvbrowser.ui.settings.channel

Examples of tvbrowser.ui.settings.channel.ChannelJList.locationToIndex()


  private void restoreForPopup() {
    final MouseAdapter listener = new MouseAdapter() {
      public void mousePressed(MouseEvent e) {
        if (SwingUtilities.isRightMouseButton(e)) {
          final ChannelJList channelJList = (ChannelJList) e.getSource();
          channelJList.setSelectedIndex(channelJList
              .locationToIndex(e.getPoint()));
        }
        showPopup(e);
      }
View Full Code Here


   */
  private void showPopup(MouseEvent e) {
    if (e.isPopupTrigger()) {
      final ChannelJList channelJList = (ChannelJList) e.getSource();
      new ChannelContextMenu(e, (Channel) channelJList.getModel().getElementAt(
          channelJList.locationToIndex(e.getPoint())),
          this);
    }
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.