List of usage examples for org.eclipse.jface.preference FieldEditor VALUE
String VALUE
To view the source code for org.eclipse.jface.preference FieldEditor VALUE.
Click Source Link
"field_editor_value"
) to signal a change in the value of this field editor. From source file:org.eclipse.eatop.workspace.ui.preferences.ReleasePreferencePage.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { super.propertyChange(event); if (isProjectPreferencePage()) { if (event.getSource().equals(releaseField) && event.getProperty().equals(FieldEditor.VALUE)) { releaseValueChanged = event.getNewValue().equals(initialRelease) == false; updateResourceVersionCombo((String) event.getNewValue(), DEFAULT_RESOURCE_VERSION); }/*ww w.j av a 2 s.com*/ } }
From source file:org.eclipse.egit.ui.internal.preferences.CommittingPreferencePage.java
License:Open Source License
@Override protected void initialize() { super.initialize(); useStagingView.setPropertyChangeListener(new IPropertyChangeListener() { @Override//from w w w .j a va 2 s . c om public void propertyChange(PropertyChangeEvent event) { if (FieldEditor.VALUE.equals(event.getProperty())) { autoStage.setEnabled(((Boolean) event.getNewValue()).booleanValue(), generalGroup); } } }); }
From source file:org.eclipse.egit.ui.internal.preferences.DateFormatPreferencePage.java
License:Open Source License
@Override protected void initialize() { super.initialize(); // When the chooser's selection changes, update the dateFormat & // enablement formatChooser.setPropertyChangeListener(new IPropertyChangeListener() { @Override//from w w w. jav a 2s.co m public void propertyChange(PropertyChangeEvent event) { if (FieldEditor.VALUE.equals(event.getProperty())) { GitDateFormatter.Format format = fromString((String) event.getOldValue()); if (format == null) { lastCustomValue = dateFormat.getStringValue(); } updateFields((String) event.getNewValue()); } } }); }
From source file:org.eclipse.jet.internal.ui.prefs.CompilePreferencePage.java
License:Open Source License
public void propertyChange(PropertyChangeEvent event) { super.propertyChange(event); if (event.getSource() == projectSpecificSettingsEditor && FieldEditor.VALUE.equals(event.getProperty())) { updateControlEnablement();/*from w w w . j a v a2s . c o m*/ } else if (event.getSource() == jetVersionFieldEditor && FieldEditor.VALUE.equals(event.getProperty())) { v1OptionsEnabled = String.valueOf(JETAST.JET_SPEC_V1).equals(event.getNewValue()); updateControlEnablement(); } }
From source file:org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferencePage.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.VALUE)) { if (event.getSource() instanceof FieldEditor) { FieldEditor editor = (FieldEditor) event.getSource(); if (editor.getPreferenceName().equals(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF)) { Boolean enabled = (Boolean) event.getNewValue(); fVerboseLevel.setEnabled(enabled, getFieldEditorParent()); fIsAppend.setEnabled(enabled, getFieldEditorParent()); }// www . j a v a2 s . c om } } super.propertyChange(event); }
From source file:org.eclipse.linuxtools.internal.rpm.createrepo.preference.CreaterepoPreferencePage.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.VALUE)) { checkState(); } }
From source file:org.eclipse.n4js.ui.binaries.BinariesPreferencePage.java
License:Open Source License
/** * Adds group with controls for a given binary to the given parent. Recursive call, for a given binary it will * invoke itself on its {@link Binary#getChildren()}. * * @param parent// w w w. j a v a2s. c om * parent to which group will be added. * @param binary * for which group will be added. */ private void recursiveAddBinaryGroup(Composite parent, final Binary binary) { final Group binaryGroup = new Group(parent, SWT.SHADOW_ETCHED_IN); binaryGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).equalWidth(false).create()); binaryGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).align(FILL, TOP).create()); binaryGroup.setText(binary.getLabel()); final DirectoryFieldEditor editor = new DirectoryFieldEditor("", "Path:", binaryGroup); final URI path = store.getPath(binary); if (null != path) { final File file = new File(path); editor.setStringValue(file.getAbsolutePath()); } editor.setPropertyChangeListener(event -> { if (null != event) { if (FieldEditor.VALUE.equals(event.getProperty())) { updateStoreState(binary, event.getNewValue()); } } }); final Text text = editor.getTextControl(binaryGroup); final ModifyListener modifyListener = new ModifyListener() { private Timer timer; @Override public void modifyText(ModifyEvent e) { if (null != timer) { timer.cancel(); timer = null; } timer = new Timer("'" + binary.getLabel() + "' binary validation thread"); final String newValue = text.getText(); timer.schedule(new TimerTask() { @Override public void run() { updateStoreState(binary, newValue); } }, VALIDATION_DELAY_MS); } }; text.addModifyListener(modifyListener); text.addDisposeListener(e -> text.removeModifyListener(modifyListener)); final String description = binary.getDescription(); if (null != description) { final Label descriptionLabel = new Label(binaryGroup, WRAP); descriptionLabel.setText(description); final GridData gridData = new GridData(FILL, TOP, true, false, 3, 1); gridData.widthHint = DESCRIPTION_H_HINT; descriptionLabel.setLayoutData(gridData); } for (Binary child : binary.getChildren()) { recursiveAddBinaryGroup(parent, child); } }
From source file:org.eclipse.stem.ui.views.geographic.map.preferences.MapViewPreferencePage.java
License:Open Source License
/** * @see org.eclipse.jface.preference.FieldEditorPreferencePage#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) *//*from w ww . j a va2 s.c om*/ @Override public void propertyChange(PropertyChangeEvent event) { super.propertyChange(event); if (event.getProperty().equals(FieldEditor.VALUE)) { if (event.getSource() == guiScalingFactorFieldEditor) { checkState(); } // if } // if }
From source file:org.eclipse.team.internal.ccvs.ui.repo.RepositoryEncodingPropertyPage.java
License:Open Source License
public void propertyChange(PropertyChangeEvent event) { if (event.getProperty() == FieldEditor.IS_VALID) { setValid(((Boolean) event.getNewValue()).booleanValue()); return;//from w w w .j a v a 2s . c o m } else if (event.getProperty() == FieldEditor.VALUE) { valueChanged = true; return; } }
From source file:org.eclipse.ui.internal.monitoring.preferences.MonitoringPreferencePage.java
License:Open Source License
@Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.VALUE)) { Object source = event.getSource(); if (source instanceof FieldEditor) { String preferenceName = ((FieldEditor) source).getPreferenceName(); if (preferenceName.equals(PreferenceConstants.MONITORING_ENABLED)) { boolean enabled = Boolean.TRUE.equals(event.getNewValue()); enableDependentFields(enabled); }/*from w ww .j a v a 2s. co m*/ } } super.propertyChange(event); }