public Action getNewFolderAction() {
   if (newFolderAction == null) {
     newFolderAction = new NewFolderAction();
     // Note: Don't return null for readOnly, it might
     // break older apps.
     if (readOnly) {
       newFolderAction.setEnabled(false);
     }
   }
   return newFolderAction;
 }
Example #2
0
 @Override
 public void show(Component c, int x, int y) {
   int[] l = table.getSelectedRows();
   deleteAction.setEnabled(l.length > 0);
   super.show(c, x, y);
 }