Available Methods
- getModel ( )
- setAutoResizeMode ( )
- getColumnCount ( )
- setSelectionMode ( )
- addMouseListener ( )
- getColumnModel ( )
- getTableHeader ( )
- getRowCount ( )
- setRowHeight ( )
- setModel ( )
- getValueAt ( )
- setDefaultRenderer ( )
- getSelectedRow ( )
- DropLocation ( )
- getSelectedRows ( )
- setPreferredScrollableViewportSize ( )
- rowAtPoint ( )
- convertColumnIndexToModel ( )
- setColumnSelectionAllowed ( )
- setRowSorter ( )
- setAutoCreateRowSorter ( )
- setRowSelectionInterval ( )
- setFillsViewportHeight ( )
- setRowSelectionAllowed ( )
- getSelectionBackground ( )
- convertRowIndexToModel ( )
- getRowSorter ( )
- getBackground ( )
- setValueAt ( )
- prepareRenderer ( )
- getDefaultRenderer ( )
- getCellRenderer ( )
- setDefaultEditor ( )
- setTableHeader ( )
- print ( )
- getSelectedColumn ( )
- getRowHeight ( )
- removeEditor ( )
- setAutoCreateColumnsFromModel ( )
- getSelectedRowCount ( )
- scrollRectToVisible ( )
- setFocusable ( )
- setName ( )
- getFont ( )
- getPrintable ( )
- setCellSelectionEnabled ( )
- setColumnSelectionInterval ( )
- getColumnName ( )
- addMouseMotionListener ( )
- getSelectedColumnCount ( )
- getSelectionModel ( )
- editCellAt ( )
- getCellRect ( )
- getCellEditor ( )
- setShowVerticalLines ( )
- setForeground ( )
- setMinimumSize ( )
- getDropLocation ( )
- setBorder ( )
- columnAtPoint ( )
- getSelectionForeground ( )
- setBackground ( )
- repaint ( )
- getSelectedColumns ( )
- getRowSelectionAllowed ( )
- setCursor ( )
- getFontMetrics ( )
- setBounds ( )
- getActionMap ( )
- setShowGrid ( )
- setShowHorizontalLines ( )
- addPropertyChangeListener ( )
- getParent ( )
- addKeyListener ( )
- setComponentPopupMenu ( )
- isEditing ( )
- setGridColor ( )
- isEnabled ( )
- setSize ( )
- setColumnModel ( )
- isRowSelected ( )
- isCellEditable ( )
- getEditorComponent ( )
Related Classes
- java.io.File
- java.awt.Color
- java.awt.event.ActionEvent
- java.awt.event.ActionListener
- javax.swing.JPanel
- java.awt.Dimension
- javax.swing.JFrame
- java.awt.Font
- java.awt.event.MouseEvent
- javax.swing.JLabel
- javax.swing.JButton
- java.awt.event.KeyEvent
- java.awt.BorderLayout
- javax.swing.JOptionPane
- java.awt.Component
- javax.swing.JScrollPane
- javax.swing.JTextField
- javax.swing.SwingUtilities
- java.awt.event.MouseAdapter
- javax.swing.ImageIcon
- java.awt.Point
- javax.swing.JComponent
- javax.swing.JCheckBox
- javax.swing.UIManager
- javax.swing.JComboBox
Java Code Examples for javax.swing.JTable#setComponentPopupMenu()
The following examples show how to use
javax.swing.JTable#setComponentPopupMenu() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InterestPointExplorerPanel.java From SPIM_Registration with GNU General Public License v2.0 | 6 votes |
protected void addPopupMenu( final JTable table ) { final JPopupMenu popupMenu = new JPopupMenu(); final JMenuItem deleteItem = new JMenuItem( "Delete" ); deleteItem.addActionListener(new ActionListener() { @Override public void actionPerformed( final ActionEvent e ) { delete(); System.out.println( "Right-click performed on table and choose DELETE" ); } }); popupMenu.add( deleteItem ); table.setComponentPopupMenu( popupMenu ); }
Example 2
Source File: TMSettingsControl.java From Cognizant-Intelligent-Test-Scripter with Apache License 2.0 | 5 votes |
public static void initTMTable(JTable table) { InputMap imTD = table.getInputMap(WHEN_FOCUSED); ActionMap amTD = table.getActionMap(); JPopupMenu popup = new JPopupMenu(); JMenuItem mItemEnc = new JMenuItem("Encrypt"); popup.add(mItemEnc); Action enc = getEncryptAction(table); mItemEnc.setAccelerator(Keystroke.ENCRYPT); mItemEnc.addActionListener(enc); imTD.put(Keystroke.ENCRYPT, "encrypt"); amTD.put("encrypt", enc); table.setComponentPopupMenu(popup); JtableUtils.addlisteners(table, Boolean.FALSE); }
Example 3
Source File: TaskProgressTable.java From mzmine2 with GNU General Public License v2.0 | 5 votes |
/** * Constructor */ public TaskProgressTable() { super(new BorderLayout()); add(new JLabel("Tasks in progress..."), BorderLayout.NORTH); TaskControllerImpl taskController = (TaskControllerImpl) MZmineCore.getTaskController(); taskTable = new JTable(taskController.getTaskQueue()); taskTable.setCellSelectionEnabled(false); taskTable.setColumnSelectionAllowed(false); taskTable.setRowSelectionAllowed(true); taskTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); taskTable.setDefaultRenderer(JComponent.class, new ComponentCellRenderer()); taskTable.getTableHeader().setReorderingAllowed(false); JScrollPane jJobScroll = new JScrollPane(taskTable); add(jJobScroll, BorderLayout.CENTER); // Create popup menu and items popupMenu = new JPopupMenu(); priorityMenu = new JMenu("Set priority..."); highPriorityMenuItem = GUIUtils.addMenuItem(priorityMenu, "High", this); normalPriorityMenuItem = GUIUtils.addMenuItem(priorityMenu, "Normal", this); popupMenu.add(priorityMenu); cancelTaskMenuItem = GUIUtils.addMenuItem(popupMenu, "Cancel task", this); cancelAllMenuItem = GUIUtils.addMenuItem(popupMenu, "Cancel all tasks", this); // Addd popup menu to the task table taskTable.setComponentPopupMenu(popupMenu); // Set the width for first column (task description) taskTable.getColumnModel().getColumn(0).setPreferredWidth(350); jJobScroll.setPreferredSize(new Dimension(600, 120)); }
Example 4
Source File: ViewSetupExplorerPanel.java From SPIM_Registration with GNU General Public License v2.0 | 5 votes |
protected void addPopupMenu( final JTable table ) { final JPopupMenu popupMenu = new JPopupMenu(); for ( final ViewExplorerSetable item : staticPopups ) popupMenu.add( item.setViewExplorer( this ) ); table.setComponentPopupMenu( popupMenu ); }