@Override public void initialize() { boolean value= fPreferenceStore.getBoolean(fPreference.getKey()); fControl.setSelection(value); } }
public void initialize() { boolean value= fOverlayStore.getBoolean(fPreference.getKey()); fControl.setSelection(value); } }
@Override public void initialize() { String value= fPreferenceStore.getString(fPreference.getKey()); fText.setText(value); } }
private void createDependency(final Button master, Preference preference, final Control[] slaves) { indent(slaves[0]); boolean masterState= fOverlayStore.getBoolean(preference.getKey()); for (int i= 0; i < slaves.length; i++) { slaves[i].setEnabled(masterState); } SelectionListener listener= new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { boolean state= master.getSelection(); for (int i= 0; i < slaves.length; i++) { slaves[i].setEnabled(state); } } @Override public void widgetDefaultSelected(SelectionEvent e) {} }; master.addSelectionListener(listener); fMasterSlaveListeners.add(listener); }
private void createDependency(final Button master, Preference preference, final Control[] slaves) { indent(slaves[0]); boolean masterState= fOverlayStore.getBoolean(preference.getKey()); for (int i= 0; i < slaves.length; i++) { slaves[i].setEnabled(masterState); } SelectionListener listener= new SelectionListener() { public void widgetSelected(SelectionEvent e) { boolean state= master.getSelection(); for (int i= 0; i < slaves.length; i++) { slaves[i].setEnabled(state); } } public void widgetDefaultSelected(SelectionEvent e) {} }; master.addSelectionListener(listener); fMasterSlaveListeners.add(listener); }
@Override public void modifyText(ModifyEvent e) { String value= textControl.getText(); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) { fDialogOverlayStore.setValue(preference.getKey(), value); setErrorMessage(null); } else { setErrorMessage(NLSUtility.format(TextEditorMessages.TextEditorDefaultsPreferencePage_showWhitespaceCharactersDialogInvalidInput, value)); } } });
@Override public void widgetSelected(SelectionEvent e) { int index= spinner.getSelection(); EnumValue value= domain.getValueByInteger(index); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value.getIntValue()); updateStatus(status); } });
@Override public void initialize() { int value= fPreferenceStore.getInt(fPreference.getKey()); EnumValue enumValue= fDomain.getValueByInteger(value); if (enumValue != null) { int index= fDomain.getIndex(enumValue); if (index >= 0) fControl.select(index); } } }
public void initialize() { int value= fOverlayStore.getInt(fPreference.getKey()); EnumValue enumValue= fDomain.getValueByInteger(value); if (enumValue != null) { fControl.setSelection(value); } } }
public void initialize() { String value= fOverlayStore.getString(fPreference.getKey()); fText.setText(value); } }
@Override public void widgetSelected(SelectionEvent e) { int index= combo.getSelectionIndex(); EnumValue value= domain.getValueByIndex(index); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value.getIntValue()); updateStatus(status); } });
@Override public void widgetSelected(SelectionEvent e) { boolean value= checkBox.getSelection(); IStatus status= domain.validate(Boolean.valueOf(value)); if (!status.matches(IStatus.ERROR)) fDialogOverlayStore.setValue(preference.getKey(), value); } });
@Override public void initialize() { int value= fPreferenceStore.getInt(fPreference.getKey()); EnumValue enumValue= fDomain.getValueByInteger(value); if (enumValue != null) { fControl.setSelection(value); } } }
public void initialize() { int value= fOverlayStore.getInt(fPreference.getKey()); EnumValue enumValue= fDomain.getValueByInteger(value); if (enumValue != null) { int index= fDomain.getIndex(enumValue); if (index >= 0) fControl.select(index); } } }
public void widgetSelected(SelectionEvent e) { int index= spinner.getSelection(); EnumValue value= domain.getValueByInteger(index); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value.getIntValue()); updateStatus(status); } });
private void checkboxControlChanged(final Preference preference, final Domain domain, final Button checkBox) { boolean value= checkBox.getSelection(); IStatus status= domain.validate(Boolean.valueOf(value)); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(status); }
public void modifyText(ModifyEvent e) { String value= textControl.getText(); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(domain); } });
public void widgetSelected(SelectionEvent e) { int index= combo.getSelectionIndex(); EnumValue value= domain.getValueByIndex(index); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value.getIntValue()); updateStatus(status); } });
@Override public void modifyText(ModifyEvent e) { String value= textControl.getText(); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(domain); } });
public void widgetSelected(SelectionEvent e) { boolean value= checkBox.getSelection(); IStatus status= domain.validate(Boolean.valueOf(value)); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(status); } });