public void widgetSelected(SelectionEvent e) { boolean isSelected = checkBox.getSelection(); valueChanged(wasSelected, isSelected); wasSelected = isSelected; } });
@Override public void widgetSelected(SelectionEvent e) { boolean isSelected = checkBox.getSelection(); valueChanged(wasSelected, isSelected); wasSelected = isSelected; } });
/** * Returns the change button for this field editor. * * @param parent * The Composite to create the receiver in. * * @return the change button */ protected Button getChangeControl(Composite parent) { if (checkBox == null) { checkBox = new Button(parent, SWT.CHECK | SWT.LEFT); checkBox.setFont(parent.getFont()); checkBox.addSelectionListener(widgetSelectedAdapter(e -> { boolean isSelected = checkBox.getSelection(); valueChanged(wasSelected, isSelected); wasSelected = isSelected; })); checkBox.addDisposeListener(event -> checkBox = null); } else { checkParent(checkBox, parent); } return checkBox; }