Package javax.swing

Examples of javax.swing.JTable.rowAtPoint()


        csaPanel.setDoubleClickAction(new DoubleClickAction()
        {
            public void doIt()
            {
                JTable table = (JTable) evt.getSource();
                mRow = table.convertRowIndexToModel(table.rowAtPoint(evt.getPoint()));
                mCol = table.convertColumnIndexToModel(table.columnAtPoint(evt.getPoint()));
                mCol = csaPanel.getModel().convertEnabledColToRealCol(mCol);
                tableDoubleClicked();
            }
        });
View Full Code Here


        csaPanel.setDoubleClickAction(new DoubleClickAction()
        {
            public void doIt()
            {
                JTable table = (JTable) evt.getSource();
                mRow = table.convertRowIndexToModel(table.rowAtPoint(evt.getPoint()));
                mCol = table.convertColumnIndexToModel(table.columnAtPoint(evt.getPoint()));
                mCol = csaPanel.getModel().convertEnabledColToRealCol(mCol);
                tableDoubleClicked();
            }
        });
View Full Code Here

        csaPanel.setDoubleClickAction(new DoubleClickAction()
        {
            public void doIt()
            {
                JTable table = (JTable) evt.getSource();
                mRow = table.convertRowIndexToModel(table.rowAtPoint(evt.getPoint()));
                mCol = table.convertColumnIndexToModel(table.columnAtPoint(evt.getPoint()));
                mCol = csaPanel.getModel().convertEnabledColToRealCol(mCol);
                tableDoubleClicked();
            }
        });
View Full Code Here

    @Override
    protected void updateRolloverPoint(JComponent component, Point mousePoint) {
        JTable table = (JTable) component;
        int col = table.columnAtPoint(mousePoint);
        int row = table.rowAtPoint(mousePoint);
        if ((col < 0) || (row < 0)) {
            row = -1;
            col = -1;
        }
        rollover.x = col;
View Full Code Here

                    if (locIndex >= 0) {
                        jList.setSelectedIndex(locIndex);
                    }
                } else if (e.getSource() instanceof JTable) {
                    JTable jTable = (JTable) e.getSource();
                    int rowIndex = jTable.rowAtPoint(e.getPoint());
                    if (rowIndex >= 0) {
                        jTable.addRowSelectionInterval(rowIndex, rowIndex);
                    }
                }
View Full Code Here

                    if (locIndex >= 0) {
                        jList.setSelectedIndex(locIndex);
                    }
                } else if (e.getSource() instanceof JTable) {
                    JTable jTable = (JTable) e.getSource();
                    int rowIndex = jTable.rowAtPoint(e.getPoint());
                    if (rowIndex >= 0) {
                        jTable.addRowSelectionInterval(rowIndex, rowIndex);
                    }
                }
View Full Code Here

      // Get a reference to the results JTable from the mouse event
      JTable resultsTable = (JTable) me.getSource();

      // Determine the row the user clicked on
      int row = resultsTable.rowAtPoint(me.getPoint());

      // make sure the user actually clicked on a row
      if (row > -1) {
        String defectId = (String) resultsTable.getValueAt(row, 0);
View Full Code Here

        }

        private void triggerAtPoint(Point point, int button) {
            // find the cell that got clicked
            JTable table = fixedSizeTable.getTable();
            int row = table.rowAtPoint(point);
            int column = table.columnAtPoint(point);
            if (row > -1 && column > -1) {
                // build up a matrix value object we then trigger
                MatrixValue matrixValue = new MatrixValue();
                matrixValue.row = row;
View Full Code Here

        if (!enablePopup) {
            return;
        }

        JTable list = (JTable) e.getSource();
        int row = list.rowAtPoint(e.getPoint());
        if (row == -1) {
            return;
        }

        if (list.getSelectedRow() != row) {
View Full Code Here

                private int row;

                @Override
                public void mouseMoved(final MouseEvent me) {
                   final Point p = me.getPoint();
                   final int newRow = table.rowAtPoint(p);
                   if (row >= 0 && newRow != row) {
                       try {
                           for (int c = 0; c < table.getColumnCount(); c++) {
                               final Object v = table.getValueAt(row, c);
                               if (v instanceof MyButton) {
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.