|
|
@ -51,7 +51,15 @@ public class CheckBoxListWithPartialSelect extends JPanel { |
|
|
|
dataList.setCellRenderer(getListCellRenderer()); |
|
|
|
dataList.setCellRenderer(getListCellRenderer()); |
|
|
|
|
|
|
|
|
|
|
|
// 全选框
|
|
|
|
// 全选框
|
|
|
|
chooseAllCheckBox = new TristateCheckBox(Toolkit.i18nText("Fine-Design_Basic_Remove_All_Selected")); |
|
|
|
chooseAllCheckBox = new TristateCheckBox(Toolkit.i18nText("Fine-Design_Basic_Remove_All_Selected")) { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected State getNextState(State current) { |
|
|
|
|
|
|
|
if (current == TristateCheckBox.SELECTED || current == TristateCheckBox.DO_NOT_CARE) { |
|
|
|
|
|
|
|
return TristateCheckBox.NOT_SELECTED; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TristateCheckBox.SELECTED; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
chooseAllCheckBox.setState(TristateCheckBox.SELECTED); |
|
|
|
chooseAllCheckBox.setState(TristateCheckBox.SELECTED); |
|
|
|
chooseAllCheckBox.setFocusable(false); |
|
|
|
chooseAllCheckBox.setFocusable(false); |
|
|
|
chooseAllCheckBox.addStateChangeListener(getChooseAllCheckBoxStateChangeListener()); |
|
|
|
chooseAllCheckBox.addStateChangeListener(getChooseAllCheckBoxStateChangeListener()); |
|
|
|