本文整理匯總了Java中org.eclipse.jface.preference.FieldEditor.setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java FieldEditor.setEnabled方法的具體用法?Java FieldEditor.setEnabled怎麽用?Java FieldEditor.setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jface.preference.FieldEditor
的用法示例。
在下文中一共展示了FieldEditor.setEnabled方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
/**
* Creates the field editors. Field editors are abstractions of the common GUI
* blocks needed to manipulate various types of preferences. Each field editor
* knows how to save and restore itself.
*/
public void createFieldEditors()
{
this.createBeyondCompareFieldEditors();
this.addField(new EmptyFieldEitor(this.getFieldEditorParent()));
this.createTortoiseFieldEditors("SVN", "TortoiseProc.exe", "TortoiseMerge.exe", PreferenceConstants.TORTOISE_SVN);
this.addField(new EmptyFieldEitor(this.getFieldEditorParent()));
this.createTortoiseFieldEditors("Git", "TortoiseGitProc.exe", "TortoiseGitMerge.exe", PreferenceConstants.TORTOISE_GIT);
/*final String tortoiseHgExecutable = "thg.exe";
this.addField(new EmptyFieldEitor(this.getFieldEditorParent()));
this.createTortoiseFieldEditors("Hg", tortoiseHgExecutable, tortoiseHgExecutable, PreferenceConstants.TORTOISE_HG);
*/
for (BooleanFieldEditor featureEnabledEditor : this.controlMapping.keySet())
{
featureEnabledEditor.setPropertyChangeListener(this);
final boolean featureEnabled = this.getPreferenceStore().getBoolean(featureEnabledEditor.getPreferenceName());
for (FieldEditor fieldEditor : this.controlMapping.get(featureEnabledEditor))
{
fieldEditor.setPropertyChangeListener(this);
fieldEditor.setEnabled(featureEnabled, getFieldEditorParent());
}
}
}
示例2: propertyChange
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
@Override
public final void propertyChange(final PropertyChangeEvent event)
{
final Object eventSource = event.getSource();
if (eventSource instanceof BooleanFieldEditor)
{
final BooleanFieldEditor featureEnabledEditor = (BooleanFieldEditor) eventSource;
if (this.controlMapping.keySet().contains(featureEnabledEditor))
{
final boolean featureEnabled = featureEnabledEditor.getBooleanValue();
for (FieldEditor fieldEditor : this.controlMapping.get(featureEnabledEditor))
{
fieldEditor.setEnabled(featureEnabled, getFieldEditorParent());
}
}
}
// Updated the apply button in every case because the property change
// can be caused by a changed string or path value
this.updateApplyButton();
}
示例3: updateFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled) {
Composite parent = getFieldEditorParent();
for (FieldEditor editor : editors) {
editor.load();
editor.setEnabled(enabled, parent);
}
getDefaultsButton().setEnabled(enabled);
}
示例4: updateFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled) {
// TODO handle do not use project settings sets project settings to
// default
Composite parent = getFieldEditorParent();
Iterator<FieldEditor> it = editors.iterator();
while (it.hasNext()) {
FieldEditor editor = it.next();
if (enabled)
editor.load();
else
editor.loadDefault();
editor.setEnabled(enabled, parent);
}
}
示例5: updateFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors() {
boolean pageEnabled = this.isPageEnabled();
Composite parent = this.getFieldEditorParent();
for (FieldEditor field : this.fields) {
field.setEnabled(pageEnabled, parent);
}
}
示例6: updateFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
/**
* Enables or disables the field editors and buttons of this page
* Subclasses may override.
* @param enabled - true if enabled
*/
protected void updateFieldEditors(boolean enabled) {
Composite parent = getFieldEditorParent();
Iterator<FieldEditor> it = editors.iterator();
while (it.hasNext()) {
FieldEditor editor = (FieldEditor) it.next();
editor.setEnabled(enabled, parent);
}
}
示例7: updateChildStatus
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateChildStatus(final FieldEditorWrapper childFieldEditor, final boolean parentEnabled) {
if (childFieldEditor != null) { // null if on another page!
final FieldEditor fieldEditor = childFieldEditor.getFieldEditor();
fieldEditor.setEnabled(parentEnabled, childFieldEditor.getParent());
if (!parentEnabled && !fieldEditor.isValid()) {
fieldEditor.loadDefault(); // Fix invalid value
checkState(); // Enable OK & Apply buttons
}
}
}
示例8: createCheckboxEnabledTextFieldEditor
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
private void createCheckboxEnabledTextFieldEditor(
CheckBoxFieldEditor toggleEditor,
FieldEditor valueEditor) {
addField(toggleEditor);
addField(valueEditor);
Button checkbox = toggleEditor.getCheckbox();
boolean selected = getPreferenceStore().getBoolean(toggleEditor.getPreferenceName());
valueEditor.setEnabled(selected, checkbox.getParent());
checkbox.addSelectionListener(new TextEnablementListener(valueEditor));
}
示例9: updateFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled) {
Composite parent = getFieldEditorParent();
Iterator<FieldEditor> it = editors.iterator();
while (it.hasNext()) {
FieldEditor editor = (FieldEditor) it.next();
editor.setEnabled(enabled, parent);
}
}
示例10: updateFieldEditors
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
protected void updateFieldEditors(boolean enabled)
{
Composite parent = getFieldEditorParent();
for (FieldEditor editor : editors)
{
editor.setEnabled(enabled, parent);
}
}
示例11: refresh
import org.eclipse.jface.preference.FieldEditor; //導入方法依賴的package包/類
private void refresh() {
for (FieldEditor restrictedSymbolEditor : restrictedSymbolEditors) {
restrictedSymbolEditor.setEnabled(restrictConfigurations.getBooleanValue(),
group);
}
}