Examples of rowAtPoint()


Examples of javax.swing.JTable.rowAtPoint()

      jTable.setDoubleBuffered(true);
      jTable.addMouseListener(new MouseAdapter() {
        public void mousePressed(MouseEvent _me) {
          JTable table = (JTable) _me.getSource();
          Point p = _me.getPoint();
          int row = table.rowAtPoint(p);
          //int col = table.columnAtPoint(p);
          String filename = null;
          if ((_me.getClickCount() == 2)) {
            try {
              // Open the file with associated viewer
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

    tbl.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(final MouseEvent me) {
        final JTable table = (JTable) me.getSource();
        final Point p = me.getPoint();
        final int row = table.rowAtPoint(p);
        /*
         * On double-click of the table item ...
         */
        if (me.getClickCount() == 2) {
          final PeerItem eval = model.getItem(row);
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

       
        private void showpopup(MouseEvent e) {
            if (e.isPopupTrigger()) {
                if (e.getSource() instanceof JTable) {
                    JTable table = (JTable)e.getSource();
                    int index = table.rowAtPoint(e.getPoint());
                    if (index >= 0) {
                        table.setRowSelectionInterval(index,index);
                    }
                   
                    jpmComments.show(table, e.getX(), e.getY());
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

       
        private void showpopup(MouseEvent e) {
            if (e.isPopupTrigger()) {
                if (e.getSource() instanceof JTable) {
                    JTable table = (JTable)e.getSource();
                    int index = table.rowAtPoint(e.getPoint());
                    if (index >= 0) {
                        table.setRowSelectionInterval(index,index);
                    }
                    jpmComments.show(table, e.getX(), e.getY());
                }
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

      if (e.getSource() instanceof JTable) {
        JTable table = (JTable) e.getSource();
        if (table.getModel() instanceof PageListTableModel) {
          PageListTableModel model = (PageListTableModel) table.getModel();
          int column = table.columnAtPoint(e.getPoint());
          int row = table.rowAtPoint(e.getPoint());
          if ((column >= 0) && (row >= 0)) {
            row = Utilities.convertRowIndexToModel(table, row);
            Page page = model.getPage(row);
            if (Boolean.TRUE.equals(page.isDisambiguationPage())) {
              Controller.runDisambiguationAnalysis(page.getTitle(), page.getWikipedia());
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

        private void maybeShowPopup(MouseEvent e) {
          if (e.isPopupTrigger() && table.isEnabled()) {
            Point p = new Point(e.getX(), e.getY());
            int col = table.columnAtPoint(p);
            int row = table.rowAtPoint(p);
            int mcol = table.getColumn(table.getColumnName(col))
                .getModelIndex();
            if (row >= 0 && row < table.getRowCount()) {
              JPopupMenu contextMenu = createContextMenu(row,
                  mcol);
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

public class MyMouseAdapter extends MouseMotionAdapter // extends MouseAdapter
{
  @Override
  public void mouseMoved(MouseEvent e) {
    JTable aTable = (JTable) e.getSource();
    MouseHoverTable.itsRow = aTable.rowAtPoint(e.getPoint());
    MouseHoverTable.itsColumn = aTable.columnAtPoint(e.getPoint());
    aTable.repaint();
  }
}
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

    //setCellEditor ...RightButton Click�� Context PopupMenu show
    addMouseListener(new MouseAdapter(){
      public void mousePressed(MouseEvent e) {
       
        JTable table = (JTable)e.getSource();
        selectedRow = table.rowAtPoint(e.getPoint());
        selectedColumn = table.columnAtPoint(e.getPoint());
       
        //Edit Cell
        if(selectedColumn!=0 //v�ǺбⰡ �ƴѰ��
            && SwingUtilities.isLeftMouseButton(e)
View Full Code Here

Examples of javax.swing.JTable.rowAtPoint()

  {
    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

Examples of javax.swing.JTable.rowAtPoint()

    /** Return (in order of preference) the location corresponding to value,
     * cell, or coordinate.
     */
    public ComponentLocation getLocation(Component c, Point p) {
        JTable table = (JTable)c;
        int row = table.rowAtPoint(p);
        int col = table.columnAtPoint(p);
        if (row != -1 && col != -1) {
            String value = valueToString(table, row, col);
            if (value != null)
                return new JTableLocation(value);
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.