JAVA SWT table multi select
Table table;
Display display = new Display();
Shell shell = new Shell(display);
table = new Table(shell, SWT.MULTI | SWT.FULL_SELECTION | SWT.CHECK | SWT.CENTER);
table.getSelectionIndices();
table.getSelectionCount();
table.getSelectionIndex();
table 생성 시 SWT.MULTI로 테이블 다중선택 설정
getSelectionIndices() -> 선택된 테이블 index list
getSelectionCount() -> 선택된 테이블 갯수
getSelectionIndex() -> 현재 선택된 테이블 로우 index
getSelectionIndices() 는 (int[]) [0, 1, 2] 값으로 정수형 배열 값으로 받는다.
로우는 0부터 시작한다.
'JavaFX' 카테고리의 다른 글
[JavaFX] KeyCode.ESCAPE esc 단축키 사용하기 (0) | 2020.09.18 |
---|---|
[JavaFX] TableView 페이징 순번 역순으로 표시하기 (0) | 2020.09.17 |
[JavaFX] MenuItem setMnemonicParsing 단축키, SeparatorMenuItem 구분자 (0) | 2020.08.28 |
[JavaFX] multiple key event Combination ctrl + s 단축키 사용 (0) | 2020.08.25 |
[JavaFX] TreeTableView Key event - Row Delete (0) | 2020.08.20 |