Examples of columnAtPoint()


Examples of javax.swing.table.JTableHeader.columnAtPoint()

        final JTableHeader h= jtblAcft.getTableHeader();
        h.addMouseListener(
            new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    final int colIndex = h.columnAtPoint(new Point(e.getX(), e.getY()));
                    //System.out.println("click:"+colIndex);
                    ((AcftTM)jtblAcft.getModel()).ordem(colIndex);
                }
            }
        );
View Full Code Here

Examples of javax.swing.table.JTableHeader.columnAtPoint()

            JTableHeader header = (JTableHeader) component;
            if( obj == null )
                return new MTableHeader(header, name, getFinder(), windowMonitor);
            if (obj instanceof Point) {
                Point location = (Point) obj;
                return new MTableHeaderItem(header, name, header.columnAtPoint(location), getFinder(), windowMonitor);
            } else
                return new MTableHeaderItem(header, name, obj.toString(), getFinder(), windowMonitor);
        } else if (component instanceof JMenu && component.getParent().getClass() != JPopupMenu.class) {
            return new MMenu(component, name, getFinder(), windowMonitor);
        } else if (component instanceof JProgressBar) {
View Full Code Here

Examples of javax.swing.table.JTableHeader.columnAtPoint()

        final JTableHeader header = (JTableHeader) e.getComponent();

        if (header.getResizingColumn() == null) {  // resizing takes precedence over sorting
            if (header.getDraggedDistance() < 1) {   // dragging also takes precedence over sorting
                final int columnIndex = header.columnAtPoint(e.getPoint());
                final int modelColumnIndex
                    = header.getTable().convertColumnIndexToModel(columnIndex);
                if (this.model.isSortable(modelColumnIndex)) {
                    this.sortColumnIndex = header.getTable().convertColumnIndexToModel(columnIndex);
                    this.renderer.setPressedColumn(this.sortColumnIndex);
View Full Code Here

Examples of javax.swing.table.JTableHeader.columnAtPoint()

        final JTableHeader header = (JTableHeader) e.getComponent();

        if (header.getResizingColumn() == null) {  // resizing takes precedence over sorting
            if (header.getDraggedDistance() < 1) {   // dragging also takes precedence over sorting
                final int columnIndex = header.columnAtPoint(e.getPoint());
                final int modelColumnIndex
                    = header.getTable().convertColumnIndexToModel(columnIndex);
                if (this.model.isSortable(modelColumnIndex)) {
                    this.sortColumnIndex = header.getTable().convertColumnIndexToModel(columnIndex);
                    this.renderer.setPressedColumn(this.sortColumnIndex);
View Full Code Here

Examples of javax.swing.table.JTableHeader.columnAtPoint()

    while(c != null) {
      if (c instanceof JTableHeader) { // if clicked on row header, see if there is help for the field
        JTableHeader th = (JTableHeader)c;
        loc = c.getLocationOnScreen();
        offsetPoint = new Point(pt.x- loc.x, pt.y-loc.y)
        int col =  th.columnAtPoint(offsetPoint);
        SpreadSheet ss = (SpreadSheet)th.getTable();
        Field f = ((SpreadSheetModel)ss.getModel()).getFieldInColumn(col+1);
        if (f.getHelp()!=null) {
          BrowserControl.displayURL(Settings.HELP_HOME+f.getHelp());
          return true;
View Full Code Here

Examples of javax.swing.table.JTableHeader.columnAtPoint()

        final JTableHeader header = (JTableHeader) e.getComponent();

        if (header.getResizingColumn() == null) {  // resizing takes precedence over sorting
            if (header.getDraggedDistance() < 1) {   // dragging also takes precedence over sorting
                final int columnIndex = header.columnAtPoint(e.getPoint());
                final int modelColumnIndex
                    = header.getTable().convertColumnIndexToModel(columnIndex);
                if (this.model.isSortable(modelColumnIndex)) {
                    this.sortColumnIndex = header.getTable().convertColumnIndexToModel(columnIndex);
                    this.renderer.setPressedColumn(this.sortColumnIndex);
View Full Code Here

Examples of javax.swing.table.JTableHeader.columnAtPoint()

    }
  }
 
  private void sortByColumn(MouseEvent e) {
    JTableHeader src = (JTableHeader) e.getSource();
    int columnIndex = src.columnAtPoint( e.getPoint() );
   
    // Set column
    TableColumn column = src.getColumnModel().getColumn(columnIndex);
   
    Object columnHeader = column.getHeaderValue();
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.controls.ArrayField.columnAtPoint()

                if (pX != null && pY != null) {
                    // We are a direct child of the table, remap the coordinate space to the array to get the row and column
                    Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                    Point arrayPoint = SwingUtilities.convertPoint(pChild, p, mum);
                    row = owningArray.rowAtPoint(arrayPoint);
                    column = owningArray.columnAtPoint(arrayPoint);
                    // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                    // much easier if we want to determine which cell generated the click.
                    params.put( "row", new ParameterHolder(row+1) );
                    params.put( "column", new ParameterHolder(column+1) );
                }
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.controls.ArrayField.columnAtPoint()

            // Now the X and Y coordinates are in the array space, we need to translate them to the child coordinate space and get
            // the correct row and column
            if (pX != null && pY != null) {
                Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                row = owningArray.rowAtPoint(p);
                column = owningArray.columnAtPoint(p);
                // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                // much easier if we want to determine which cell generated the click.
                params.put( "row", new ParameterHolder(row+1) );
                params.put( "column", new ParameterHolder(column+1) );
View Full Code Here

Examples of org.jdesktop.swingx.JXTableHeader.columnAtPoint()

            }

            private void showPopup(MouseEvent e) {
                if (e.isPopupTrigger()) {
                    JXTableHeader source = (JXTableHeader) e.getSource();
                    column = source.columnAtPoint(e.getPoint());
                    view.getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                }
            }
        });
        createHeaderMenuItens();
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.