コード例 #1
0
 private IAction createPackAction() {
   final IActionBuilder builder = Toolkit.getActionBuilderFactory().create();
   builder.setText(Messages.getString("UserTableView.pack")); // $NON-NLS-1$
   builder.setIcon(SilkIcons.ARROW_INOUT);
   builder.setCommand(
       new ICommandExecutor() {
         @Override
         public void execute(final IExecutionContext executionContext) throws Exception {
           table.pack();
         }
       });
   return builder.build();
 }
コード例 #2
0
 private IAction createClearAction() {
   final IActionBuilder builder = Toolkit.getActionBuilderFactory().create();
   builder
       .setText(Messages.getString("UserTableView.clear"))
       .setToolTipText(
           Messages.getString("UserTableView.clear_tooltip")); // $NON-NLS-1$ //$NON-NLS-2$
   builder.setCommand(
       new ICommandExecutor() {
         @Override
         public void execute(final IExecutionContext executionContext) throws Exception {
           beanTableModel.clear();
         }
       });
   return builder.build();
 }