Package xgenerator.ui.swing.adapter

Examples of xgenerator.ui.swing.adapter.MetadataTableRowAction


  private JPopupMenu buildTablePopupMenu() {
    JPopupMenu popupMenu = new JPopupMenu("弹出菜单");

    JMenuItem menuItem = null;
   
    menuItem = new JMenuItem(new MetadataTableRowAction(this));
    menuItem.setText("复制注释->显示名称");
    menuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "table_row_insert.png"));
    menuItem.setActionCommand(MetadataTableRowAction.COPY_COMMENT_TO_DISPLAY_NAME);
    popupMenu.add(menuItem);
   
    menuItem = new JMenuItem(new MetadataTableRowAction(this));
    menuItem.setText("复制全部注释->显示名称");
    menuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "table_row_insert.png"));
    menuItem.setActionCommand(MetadataTableRowAction.COPY_ALL_COMMENT_TO_DISPLAY_NAME);
    popupMenu.add(menuItem);
   
    popupMenu.add(new JSeparator());
   
    JMenu menu = new JMenu("插入(I)");
    menu.setMnemonic('B');
   
    menuItem = new JMenuItem(new MetadataTableRowAction(this));
    menuItem.setText("在上方插入行(A)");
    menuItem.setMnemonic('A');
    menuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "table_row_insert.png"));
    menuItem.setActionCommand(MetadataTableRowAction.INSERT_ROW_ABOVE_CURRENT_ROW_COMMAND);
    menu.add(menuItem);

    menuItem = new JMenuItem(new MetadataTableRowAction(this));
    menuItem.setText("在下方插入行(B)");
    menuItem.setMnemonic('B');
    menuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "table_row_insert.png"));
    menuItem.setActionCommand(MetadataTableRowAction.INSERT_ROW_BELOW_CURRENT_ROW_COMMAND);
    menu.add(menuItem);
   
    popupMenu.add(menu);
   

    menuItem = new JMenuItem(new MetadataTableRowAction(this));
    menuItem.setText("添加行(A)");
    menuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "table_row.png"));
    menuItem.setActionCommand(MetadataTableRowAction.INSERT_ROW_AT_BOTTOM_COMMAND);
    popupMenu.add(menuItem);
   
    popupMenu.add(new JSeparator());

    menuItem = new JMenuItem(new MetadataTableRowAction(this));
    menuItem.setText("删除行(D)");
    menuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "table_row_delete.png"));
    menuItem.setActionCommand(MetadataTableRowAction.DELETE_ROW_COMMAND);
    menuItem.setEnabled(true);
    popupMenu.add(menuItem);
View Full Code Here

TOP

Related Classes of xgenerator.ui.swing.adapter.MetadataTableRowAction

Copyright © 2018 www.massapicom. 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.