Examples of columnAtPoint()


Examples of javax.swing.JTable.columnAtPoint()

{
  @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.columnAtPoint()

    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)
            && e.getClickCount()==DOUBLE_CLICK
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

     * 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);
            else
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

            }
            // TF:23/9/07:We need to return the X and Y coordinates with respect to the cell, not the table. Also, we need
            // to change the child to the renderer or editor for that cell.
            Point loc = new Point(X, Y);
            int row = table.rowAtPoint(loc);
            int column = table.columnAtPoint(loc);
            // TF:27/9/07:Made the row and column 1-based indexes instead of 0-based
            params.put( "row", new ParameterHolder(row+1) );
            params.put( "column", new ParameterHolder(column+1) );

            // make sure we have a valid cell, just in case they click outside the table, eg in the empty scroll pane.
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

            // TF:25/05/2010:If the component is an array field and we've clicked on an editable column, then the
            // click should be handled by the editor and we shouldn't repost it here.
            boolean postEvent = true;
            if (e.getComponent() instanceof JTable) {
              JTable table = (JTable)e.getComponent();
              int column = table.columnAtPoint(e.getPoint());
              int row = table.rowAtPoint(e.getPoint());
              if (table.isCellEditable(row, column)) {
                postEvent = false;
              }
            }
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

            // TF:25/05/2010:If the component is an array field and we've clicked on an editable column, then the
            // click should be handled by the editor and we shouldn't repost it here.
            boolean postEvent = true;
            if (e.getComponent() instanceof JTable) {
              JTable table = (JTable)e.getComponent();
              int column = table.columnAtPoint(e.getPoint());
              int row = table.rowAtPoint(e.getPoint());
              if (table.isCellEditable(row, column)) {
                postEvent = false;
              }
            }
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

            }
            // TF:23/9/07:We need to return the X and Y coordinates with respect to the cell, not the table. Also, we need
            // to change the child to the renderer or editor for that cell.
            Point loc = new Point(X, Y);
            int row = table.rowAtPoint(loc);
            int column = table.columnAtPoint(loc);
            // TF:27/9/07:Made the row and column 1-based indexes instead of 0-based
            params.put( "row", new ParameterHolder(row+1) );
            params.put( "column", new ParameterHolder(column+1) );

            // make sure we have a valid cell, just in case they click outside the table, eg in the empty scroll pane.
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

            }
            // TF:23/9/07:We need to return the X and Y coordinates with respect to the cell, not the table. Also, we need
            // to change the child to the renderer or editor for that cell.
            Point loc = new Point(X, Y);
            int row = table.rowAtPoint(loc);
            int column = table.columnAtPoint(loc);
            // TF:27/9/07:Made the row and column 1-based indexes instead of 0-based
            params.put( "row", new ParameterHolder(row+1) );
            params.put( "column", new ParameterHolder(column+1) );

            // make sure we have a valid cell, just in case they click outside the table, eg in the empty scroll pane.
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

            // TF:25/05/2010:If the component is an array field and we've clicked on an editable column, then the
            // click should be handled by the editor and we shouldn't repost it here.
            boolean postEvent = true;
            if (e.getComponent() instanceof JTable) {
              JTable table = (JTable)e.getComponent();
              int column = table.columnAtPoint(e.getPoint());
              int row = table.rowAtPoint(e.getPoint());
              if (table.isCellEditable(row, column)) {
                postEvent = false;
              }
            }
View Full Code Here

Examples of javax.swing.JTable.columnAtPoint()

    protected Step createClick(Component target, int x, int y,
                               int mods, int count) {
        JTable table = (JTable)target;
        Point where = new Point(x, y);
        int row = table.rowAtPoint(where);
        int col = table.columnAtPoint(where);
        ComponentReference cr = getResolver().addComponent(target);
        String methodName = "actionSelectCell";
        ArrayList args = new ArrayList();
        args.add(cr.getID());
        args.add(getLocationArgument(table, x, y));
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.