javax.swing.JTable.setComponentPopupMenu()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中javax.swing.JTable.setComponentPopupMenu()方法的一些代码示例,展示了JTable.setComponentPopupMenu()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.setComponentPopupMenu()方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:setComponentPopupMenu

JTable.setComponentPopupMenu介绍

暂无

代码示例

代码示例来源:origin: wiztools/rest-client

jt.setComponentPopupMenu(menu);

代码示例来源:origin: ron190/jsql-injection

this.table = table;
table.setComponentPopupMenu(this);

代码示例来源:origin: ron190/jsql-injection

this.tableValues.setComponentPopupMenu(new JPopupMenuTable(this.tableValues, actionShowSearchTable));

代码示例来源:origin: ron190/jsql-injection

this.networkTable.setComponentPopupMenu(new JPopupMenuTable(this.networkTable));
this.networkTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
this.networkTable.setRowSelectionAllowed(true);

代码示例来源:origin: net.preibisch/multiview-reconstruction

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 );
  }
}

代码示例来源:origin: net.preibisch/multiview-reconstruction

protected void addPopupMenu(final JTable table)
{
  final JPopupMenu popupMenu = new JPopupMenu();
  for ( final ExplorerWindowSetable item : popups )
    popupMenu.add( item.setExplorerWindow( this ) );
  table.setComponentPopupMenu( popupMenu );
}

代码示例来源:origin: net.preibisch/multiview-reconstruction

protected void addPopupMenu( final JTable table )
{
  final JPopupMenu popupMenu = new JPopupMenu();
  for ( final ExplorerWindowSetable item : popups )
    popupMenu.add( item.setExplorerWindow( this ) );
  table.setComponentPopupMenu( popupMenu );
}

代码示例来源:origin: ontop/ontop

private void addPopUpMenu(){
  JPopupMenu menu = new JPopupMenu();
  JMenuItem countAll = new JMenuItem(); 
  countAll.setText("count all tuples");
  countAll.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      Thread thread = new Thread() {
        public void run() {
          String query = querypanel.getQuery();
          getCountAllTuplesActionForUCQ().run(query);
        }
      };
      thread.start();
    }
  });
  menu.add(countAll);
  tblQueryResult.setComponentPopupMenu(menu);
}

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_http

private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
  
  // register the right click menu
  JTable table = getTable();
  final JPopupMenu popupMenu = new JPopupMenu();
  JMenuItem variabilizeItem = new JMenuItem(JMeterUtils.getResString("transform_into_variable"));
  variabilizeItem.addActionListener(e -> transformNameIntoVariable());
  popupMenu.add(variabilizeItem);
  table.setComponentPopupMenu(popupMenu);
}

代码示例来源:origin: stackoverflow.com

JMenuItem item = new JMenuItem("item");
menu.add(item);
table.setComponentPopupMenu(menu);

代码示例来源:origin: stackoverflow.com

popup.add(action);
popup.add("dummy2");
table.setComponentPopupMenu(popup);

代码示例来源:origin: stackoverflow.com

table.setComponentPopupMenu(popup);

代码示例来源:origin: com.davidbracewell/hermes-core

JMenuItem deleteAnnotation = new JMenuItem("Delete");
tablePopup.add(deleteAnnotation);
annotationTable.setComponentPopupMenu(tablePopup);
deleteAnnotation.addMouseListener(mouseReleased(e -> deleteAnnotation(annotationTable.getSelectedRows())));
return tblContainer;

代码示例来源:origin: sensepost/yeti

tblResults.setComponentPopupMenu(pmCertPopup);
tblResults.setName("tblResults"); // NOI18N
tblResults.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

代码示例来源:origin: sensepost/yeti

tblResults.setComponentPopupMenu(pmOptions);
tblResults.setName("tblResults"); // NOI18N
tblResults.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

代码示例来源:origin: sensepost/yeti

tblResults.setComponentPopupMenu(pmForwardLookups);
tblResults.setName("tblResults"); // NOI18N
tblResults.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

代码示例来源:origin: openpnp/openpnp

table.setComponentPopupMenu(popupMenu);

代码示例来源:origin: openpnp/openpnp

popupMenu.add(setPlacedMenu);
table.setComponentPopupMenu(popupMenu);

代码示例来源:origin: aterai/java-swing-tips

table.setComponentPopupMenu(new TablePopupMenu());
add(new JScrollPane(table));
setPreferredSize(new Dimension(320, 240));

代码示例来源:origin: sensepost/yeti

tblResults.setComponentPopupMenu(pmIpMenu);
tblResults.setName("tblResults"); // NOI18N
tblResults.addMouseListener(new java.awt.event.MouseAdapter() {

相关文章

JTable类方法