|
|
|
@ -48,6 +48,8 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
|
|
|
|
|
|
|
|
|
|
private static final int COLUMNS_COUNT = 15; |
|
|
|
|
|
|
|
|
|
private List<VcsTableEntity> tableEntities; |
|
|
|
|
|
|
|
|
|
public RecyclePane() { |
|
|
|
|
super(i18nText("Fine-Design_Vcs_Recycle"), (o, columnIndex) -> { |
|
|
|
|
switch (columnIndex) { |
|
|
|
@ -86,6 +88,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
|
|
|
|
|
for (VcsEntity entity : entityList) { |
|
|
|
|
tableEntities.add(new VcsTableEntity(entity)); |
|
|
|
|
} |
|
|
|
|
updateTableList(tableEntities); |
|
|
|
|
return tableEntities; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -166,8 +169,7 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
|
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
String str = searchTextField.getText(); |
|
|
|
|
List<VcsTableEntity> entityList = model.getList(); |
|
|
|
|
model.setList(entityList.stream().filter(entity -> entity.getEntity().getFilename().contains(str)).collect(Collectors.toList())); |
|
|
|
|
model.setList(tableEntities.stream().filter(entity -> entity.getEntity().getFilename().contains(str)).collect(Collectors.toList())); |
|
|
|
|
model.fireTableDataChanged(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -185,7 +187,8 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
|
|
|
|
|
JOptionPane.OK_CANCEL_OPTION, |
|
|
|
|
JOptionPane.QUESTION_MESSAGE); |
|
|
|
|
if (selVal == JOptionPane.YES_OPTION) { |
|
|
|
|
model.setList(model.getList().stream().filter(tableEntity -> !tableEntity.isSelect()).collect(Collectors.toList())); |
|
|
|
|
tableEntities = model.getList().stream().filter(tableEntity -> !tableEntity.isSelect()).collect(Collectors.toList()); |
|
|
|
|
model.setList(tableEntities); |
|
|
|
|
model.fireTableDataChanged(); |
|
|
|
|
listener.doAfterChooseYes(selectList); |
|
|
|
|
} |
|
|
|
@ -252,6 +255,25 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新数据列表 |
|
|
|
|
* |
|
|
|
|
* @param entities |
|
|
|
|
*/ |
|
|
|
|
public void updateTableList(List<VcsTableEntity> entities) { |
|
|
|
|
tableEntities = entities; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 移除指定元素 |
|
|
|
|
* |
|
|
|
|
* @param entity |
|
|
|
|
*/ |
|
|
|
|
public void removeTarget(VcsTableEntity entity) { |
|
|
|
|
tableEntities.remove(entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 版本管理按钮事件响应 |
|
|
|
|
*/ |
|
|
|
|