Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.JXTable.rowAtPoint()


        public void mousePressed(MouseEvent e) {
 
        if (SwingUtilities.isRightMouseButton(e)) {
 
          // Select table item
            int row = view.rowAtPoint( e.getPoint() );
            if (row < 0 || !view.getSelectionModel().isSelectedIndex(row)) {
              view.getSelectionModel().clearSelection();
              if (row >= 0) {
                view.getSelectionModel().setSelectionInterval(row, row);
              }
View Full Code Here


       
        public void mousePressed(MouseEvent e) {                                      
           
                if ( (e.getSource() instanceof JXTable) && (e.getButton() == e.BUTTON3) ) {      
                    JXTable table = (JXTable)e.getSource();
                    if ( (table.getRowCount() > 0) && (table.rowAtPoint(e.getPoint()) != -1) ) {
                        if (table.getSelectedRows().length > 0)
                            table.removeRowSelectionInterval(0, table.getRowCount() - 1);
                        table.addRowSelectionInterval(table.rowAtPoint(e.getPoint()), table.rowAtPoint(e.getPoint()));
                    }                   
                }
View Full Code Here

                if ( (e.getSource() instanceof JXTable) && (e.getButton() == e.BUTTON3) ) {      
                    JXTable table = (JXTable)e.getSource();
                    if ( (table.getRowCount() > 0) && (table.rowAtPoint(e.getPoint()) != -1) ) {
                        if (table.getSelectedRows().length > 0)
                            table.removeRowSelectionInterval(0, table.getRowCount() - 1);
                        table.addRowSelectionInterval(table.rowAtPoint(e.getPoint()), table.rowAtPoint(e.getPoint()));
                    }                   
                }

        }
View Full Code Here

                if ( (e.getSource() instanceof JXTable) && (e.getButton() == e.BUTTON3) ) {      
                    JXTable table = (JXTable)e.getSource();
                    if ( (table.getRowCount() > 0) && (table.rowAtPoint(e.getPoint()) != -1) ) {
                        if (table.getSelectedRows().length > 0)
                            table.removeRowSelectionInterval(0, table.getRowCount() - 1);
                        table.addRowSelectionInterval(table.rowAtPoint(e.getPoint()), table.rowAtPoint(e.getPoint()));
                    }                   
                }

        }
View Full Code Here

  public void mousePressed(MouseEvent e) {

    if ((e.getSource() instanceof JXTable) && (e.getButton() == e.BUTTON3)) {
      JXTable table = (JXTable) e.getSource();
      if ((table.getRowCount() > 0)
          && (table.rowAtPoint(e.getPoint()) != -1)) {
        if (table.getSelectedRows().length > 0)
          table
              .removeRowSelectionInterval(0,
                  table.getRowCount() - 1);
        table.addRowSelectionInterval(table.rowAtPoint(e.getPoint()),
View Full Code Here

          && (table.rowAtPoint(e.getPoint()) != -1)) {
        if (table.getSelectedRows().length > 0)
          table
              .removeRowSelectionInterval(0,
                  table.getRowCount() - 1);
        table.addRowSelectionInterval(table.rowAtPoint(e.getPoint()),
            table.rowAtPoint(e.getPoint()));
      }
    }

  }
View Full Code Here

        if (table.getSelectedRows().length > 0)
          table
              .removeRowSelectionInterval(0,
                  table.getRowCount() - 1);
        table.addRowSelectionInterval(table.rowAtPoint(e.getPoint()),
            table.rowAtPoint(e.getPoint()));
      }
    }

  }
View Full Code Here

                    if (layoutTable.getSelectedRows().length > 0)
                        layoutTable.removeRowSelectionInterval(0, layoutTable.getRowCount() - 1);
                    layoutTable.addRowSelectionInterval(layoutTable.rowAtPoint(e.getPoint()), layoutTable.rowAtPoint(e.getPoint()));
                }
            } else if ( (e.getSource().equals(objectLayoutTable)) && (e.getButton() == e.BUTTON3) ) {
                if ( (objectLayoutTable.getRowCount() > 0) && (objectLayoutTable.rowAtPoint(e.getPoint()) != -1) ) {
                    if (objectLayoutTable.getSelectedRows().length > 0)
                        objectLayoutTable.removeRowSelectionInterval(0, objectLayoutTable.getRowCount() - 1);
                    objectLayoutTable.addRowSelectionInterval(objectLayoutTable.rowAtPoint(e.getPoint()), objectLayoutTable.rowAtPoint(e.getPoint()));
                }
            } else if (e.getSource().equals(objectViewTable) && (e.getButton() == e.BUTTON3)) {
View Full Code Here

                }
            } else if ( (e.getSource().equals(objectLayoutTable)) && (e.getButton() == e.BUTTON3) ) {
                if ( (objectLayoutTable.getRowCount() > 0) && (objectLayoutTable.rowAtPoint(e.getPoint()) != -1) ) {
                    if (objectLayoutTable.getSelectedRows().length > 0)
                        objectLayoutTable.removeRowSelectionInterval(0, objectLayoutTable.getRowCount() - 1);
                    objectLayoutTable.addRowSelectionInterval(objectLayoutTable.rowAtPoint(e.getPoint()), objectLayoutTable.rowAtPoint(e.getPoint()));
                }
            } else if (e.getSource().equals(objectViewTable) && (e.getButton() == e.BUTTON3)) {
                CacheTableModel model = (CacheTableModel)objectViewTable.getTable().getModel();
                if ( (!model.isNoRow()) && (objectViewTable.getTable().rowAtPoint(e.getPoint()) != -1) )
                    objectViewTable.getTable().addRowSelectionInterval(objectViewTable.getTable().rowAtPoint(e.getPoint()),
View Full Code Here

                }
            } else if ( (e.getSource().equals(objectLayoutTable)) && (e.getButton() == e.BUTTON3) ) {
                if ( (objectLayoutTable.getRowCount() > 0) && (objectLayoutTable.rowAtPoint(e.getPoint()) != -1) ) {
                    if (objectLayoutTable.getSelectedRows().length > 0)
                        objectLayoutTable.removeRowSelectionInterval(0, objectLayoutTable.getRowCount() - 1);
                    objectLayoutTable.addRowSelectionInterval(objectLayoutTable.rowAtPoint(e.getPoint()), objectLayoutTable.rowAtPoint(e.getPoint()));
                }
            } else if (e.getSource().equals(objectViewTable) && (e.getButton() == e.BUTTON3)) {
                CacheTableModel model = (CacheTableModel)objectViewTable.getTable().getModel();
                if ( (!model.isNoRow()) && (objectViewTable.getTable().rowAtPoint(e.getPoint()) != -1) )
                    objectViewTable.getTable().addRowSelectionInterval(objectViewTable.getTable().rowAtPoint(e.getPoint()),
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.