private void showSpecificControls(boolean show) { if (fElements.size() != 1) return; Preference[] preferences= ((Category)fElements.get(0)).getSpecificPreferences(); if (preferences.length == 0) return; fRequiresRelayout= true; for (int i= 0; i < preferences.length; i++) { Preference preference= preferences[i]; Control control= preference.getControl(); control.setVisible(show); ((GridData)control.getLayoutData()).exclude= !show; } }
/** * Set the key which is used to store the value. * @param key New value */ public final void setKey(String key) { if (key == null || !fKey.equals(key)) { fKey= key; updateWidget(); } } /**
public void update(Observable o, Object arg) { boolean enabled= areSlavesEnabled(); for (final Iterator iter= fSlaves.iterator(); iter.hasNext();) { final Object obj= iter.next(); if (obj instanceof Preference) { ((Preference)obj).setEnabled(enabled); } else if (obj instanceof Control) { ((Group)obj).setEnabled(enabled); } } }
Control control= expressionWrapPositionPreference.getControl(); control.setVisible(false); ((GridData)control.getLayoutData()).exclude= true;
private void showSpecificControls(boolean show) { if (fElements.size() != 1) return; Preference[] preferences= fElements.get(0).getSpecificPreferences(); if (preferences.length == 0) return; fRequiresRelayout= true; for (int i= 0; i < preferences.length; i++) { Preference preference= preferences[i]; Control control= preference.getControl(); control.setVisible(show); ((GridData)control.getLayoutData()).exclude= !show; } }
private Preference createWrapBeforeButton(int numColumns, String message, String setting) { Preference preference= createCheckboxPref(fOptionsGroup, 1, message, setting, FALSE_TRUE); Control control= preference.getControl(); control.setVisible(false); GridData layoutData= (GridData)control.getLayoutData(); layoutData.exclude= true; layoutData.horizontalAlignment= SWT.BEGINNING; layoutData.horizontalSpan= numColumns - 1; layoutData.grabExcessHorizontalSpace= false; return preference; }
public void add(Preference preference) { final Control control= preference.getControl(); if (control != null) add(control); }
/** * Set the enabled state of all SWT widgets of this preference. * @param enabled new value */ public final void setEnabled(boolean enabled) { fEnabled= enabled; updateWidget(); }
/** * Set the enabled state of all SWT widgets of this preference. * @param enabled new value */ public final void setEnabled(boolean enabled) { fEnabled= enabled; updateWidget(); }
/** * Set the key which is used to store the value. * @param key New value */ public final void setKey(String key) { if (key == null || !fKey.equals(key)) { fKey= key; updateWidget(); } } /**
/** * Set the key which is used to store the value. * @param key New value */ public final void setKey(String key) { if (key == null || !fKey.equals(key)) { fKey= key; updateWidget(); } } /**
/** * Set the enabled state of all SWT widgets of this preference. * @param enabled new value */ public final void setEnabled(boolean enabled) { fEnabled= enabled; updateWidget(); }
public void add(Preference preference) { final Control control= preference.getControl(); if (control != null) add(control); }
@Override public void update(Observable o, Object arg) { boolean enabled= areSlavesEnabled(); for (final Iterator<Object> iter= fSlaves.iterator(); iter.hasNext();) { final Object obj= iter.next(); if (obj instanceof Preference) { ((Preference)obj).setEnabled(enabled); } else if (obj instanceof Control) { ((Group)obj).setEnabled(enabled); } } }
public void add(Preference preference) { final Control control= preference.getControl(); if (control != null) add(control); }
public void setEnabled(boolean state) { for (Preference preference : preferences) preference.setEnabled(state); } }