Examples of locationToIndex()


Examples of javax.swing.JList.locationToIndex()

    }
    if (!(e.getComponent() instanceof JList)) {
      return;
    }
    JList list = (JList) e.getComponent();
    int position = list.locationToIndex(e.getPoint());
    if (position < 0) {
      return;
    }
    Object object = list.getModel().getElementAt(position);
    if (!(object instanceof CheckErrorPage)) {
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

          {
            if (
              (e.getClickCount() > 1)
                && ((e.getModifiers() & MouseEvent.BUTTON1_MASK) > 0))
            {
              int i = columnList.locationToIndex(e.getPoint());

              if (i >= 0)
              {
                Object column = listModel.get(i);
                getModel().toggleColumn(column.toString());
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

    if( !enablePopup )
      return;

    ActionList actions = null;
    JList list = ( JList )e.getSource();
    int row = list.locationToIndex( e.getPoint() );
    if( row == -1 || !list.getCellBounds( row, row ).contains( e.getPoint() ) )
    {
      if( list.getSelectedIndex() != -1 )
        list.clearSelection();
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

      return;
    }

    JList list = (JList) e.getSource();

    int i = list.locationToIndex(e.getPoint());
    list.setSelectedIndex(i);

    JPopupMenu menu = new JPopupMenu();

    Rating selRating = (Rating) list.getSelectedValue();
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

    }

    public void mousePressed(MouseEvent e) {
      if (e.getClickCount() == 2) {
        JList     list = (JList)e.getSource();
        int       index = list.locationToIndex(e.getPoint());

        optionPane.setInputValue(list.getModel().getElementAt(index));
      }
    }
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

    }

    public void mousePressed(MouseEvent e) {
      if (e.getClickCount() == 2) {
        JList     list = (JList)e.getSource();
        int       index = list.locationToIndex(e.getPoint());

        optionPane.setInputValue(list.getModel().getElementAt(index));
      }
    }
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

    }

    public void mousePressed(MouseEvent e) {
      if (e.getClickCount() == 2) {
        JList     list = (JList)e.getSource();
        int       index = list.locationToIndex(e.getPoint());

        optionPane.setInputValue(list.getModel().getElementAt(index));
      }
    }
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

        ComponentReference cr = getResolver().addComponent(target);
        String methodName = "actionSelectRow";
        ArrayList args = new ArrayList();
        args.add(cr.getID());
        args.add(getLocationArgument(list, x, y));
        if (list.locationToIndex(new Point(x, y)) == -1) {
            methodName = "actionClick";
        }
        if ((mods != 0 && mods != InputEvent.BUTTON1_MASK)
            || count > 1) {
            methodName = "actionClick";
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

        private void showContextMenu(MouseEvent e) {
            if (e.isPopupTrigger()) {
                // Select item under context-click.
                if (e.getSource() instanceof JList) {
                    JList jList = (JList) e.getSource();
                    int locIndex = jList.locationToIndex(e.getPoint());
                    if (locIndex >= 0) {
                        jList.setSelectedIndex(locIndex);
                    }
                } else if (e.getSource() instanceof JTable) {
                    JTable jTable = (JTable) e.getSource();
View Full Code Here

Examples of javax.swing.JList.locationToIndex()

        private void showContextMenu(MouseEvent e) {
            if (e.isPopupTrigger()) {
                // Select item under context-click.
                if (e.getSource() instanceof JList) {
                    JList jList = (JList) e.getSource();
                    int locIndex = jList.locationToIndex(e.getPoint());
                    if (locIndex >= 0) {
                        jList.setSelectedIndex(locIndex);
                    }
                } else if (e.getSource() instanceof JTable) {
                    JTable jTable = (JTable) e.getSource();
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.