Package javax.swing

Examples of javax.swing.JTable.addMouseListener()


    scaleTable.setDefaultRenderer(Note.class, new VLTableCellRenderer());
    scaleTable.setModel(new ScaleTableModel(scaleName, Note.MAJOR_NAMES));
    scaleTable.setRowSelectionAllowed(false);
    scaleTable.setColumnSelectionAllowed(true);
    scaleTable.setCellEditor(null);
    scaleTable.addMouseListener(this);
    scaleTable.getTableHeader().setReorderingAllowed(false);
    return scaleTable;
  }
 
//ItemListener
View Full Code Here


                @Override
                public void mouseDragged(final MouseEvent e) {
                    /* nothing */
                }
            });
            table.addMouseListener(new MouseAdapter() {
                private int row;
                private boolean paintIt = false;
                private boolean paintItMouseOver = false;

                @Override
View Full Code Here

                } catch (NullPointerException ignore){}
              }
            });
           
          //listen for thought mouse events
            table.addMouseListener(new MouseAdapter() {           
                @Override
                public void mouseClicked(MouseEvent e) {
                    Point pnt = e.getPoint();
                    int columnModelIndex = table.convertColumnIndexToModel(table.columnAtPoint(pnt));
                    int rowModelIndex = table.convertRowIndexToModel(table.rowAtPoint(pnt));
View Full Code Here

            //Container that displays table showing items in cart
            tableModel = new TableModel();
            JTable table = new JTable( tableModel );
            //handler removes item to shopping cart
            table.addMouseListener( new TableSelectionHandler() );
            ListSelectionModel tableSelectionModel = table.getSelectionModel();
            tableSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
            TableColumnModel tableColumnModel = table.getColumnModel();
            //notice we have a custom renderer for each column as both columns
            // point to the same underlying object
View Full Code Here

        JTable tblContent = new JTable(
                model,
                new ChangesetContentTableColumnModel(),
                model.getSelectionModel()
        );
        tblContent.addMouseListener(new PopupMenuLauncher(new ChangesetContentTablePopupMenu()));
        pnl.add(new JScrollPane(tblContent), BorderLayout.CENTER);
        return pnl;
    }

    protected JPanel buildActionButtonPanel() {
View Full Code Here

                new NodeListTableColumnModel()
        );
        table.setName("table.currentnodelisttable");
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel());
        table.addMouseListener(new InternalPopupMenuLauncher());
        table.addMouseListener(new DoubleClickAdapter(table));
        return table;
    }

    protected void build() {
View Full Code Here

        );
        table.setName("table.currentnodelisttable");
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel());
        table.addMouseListener(new InternalPopupMenuLauncher());
        table.addMouseListener(new DoubleClickAdapter(table));
        return table;
    }

    protected void build() {
        setLayout(new GridBagLayout());
View Full Code Here

                new NodeListTableColumnModel()
        );
        table.setName("table.referencenodelisttable");
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel());
        table.addMouseListener(new InternalPopupMenuLauncher());
        table.addMouseListener(new DoubleClickAdapter(table));
        return table;
    }

    protected JTable buildCurrentNodeListTable() {
View Full Code Here

        );
        table.setName("table.referencenodelisttable");
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        selectionSynchronizer.participateInSynchronizedSelection(table.getSelectionModel());
        table.addMouseListener(new InternalPopupMenuLauncher());
        table.addMouseListener(new DoubleClickAdapter(table));
        return table;
    }

    protected JTable buildCurrentNodeListTable() {
        JTable table = new JTable(
View Full Code Here

                    return;
                }
                OpenBrowser.displayUrl(url);
            }
        };
        t.addMouseListener(urlOpener);
        t.setFillsViewportHeight(true);
        return t;
    }

    boolean noUpdates=false;
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.