/** * Checks a setting. * * @param key a key * @param value an assumed value for the key * @return <code>true</code> iff the given key's value is equal to the given value */ protected boolean checkValue(Key key, String value) { return value.equals(getValue(key)); }
/** * Checks a setting. * * @param key a key * @param value an assumed value for the key * @return <code>true</code> iff the given key's value is equal to the given value */ protected boolean checkValue(Key key, String value) { return value.equals(getValue(key)); }
protected boolean checkValue(Key key, String value) { return value.equals(getValue(key)); }
protected boolean getBooleanValue(Key key) { return Boolean.valueOf(getValue(key)).booleanValue(); }
protected boolean getBooleanValue(Key key) { return Boolean.valueOf(getValue(key)).booleanValue(); }
protected boolean getBooleanValue(Key key) { return Boolean.valueOf(getValue(key)).booleanValue(); }
protected void updateText(Text curr) { Key key= (Key) curr.getData(); String currValue= getValue(key); if (currValue != null) { curr.setText(currValue); } }
protected void updateText(Text curr) { Key key= (Key) curr.getData(); String currValue= getValue(key); if (currValue != null) { curr.setText(currValue); } }
protected String setValue(Key key, String value) { if (fDisabledProjectSettings != null) { return (String) fDisabledProjectSettings.put(key, value); } String oldValue= getValue(key); key.setStoredValue(fLookupOrder[0], value, fManager); return oldValue; }
protected void updateText(Text curr) { Key key= (Key) curr.getData(); String currValue= getValue(key); if (currValue != null) { curr.setText(currValue); } }
/** * Sets the option <code>key</code> to the value <code>value</code>. * Note that callers have to make sure the corresponding controls are updated afterwards. * * @param key the option key * @param value the new value * @return the old value * * @see #updateControls() * @see #updateCheckBox(Button) * @see #updateCombo(Combo) * @see #updateText(Text) */ protected String setValue(Key key, String value) { if (fDisabledProjectSettings != null) { return fDisabledProjectSettings.put(key, value); } String oldValue= getValue(key); key.setStoredValue(fLookupOrder[0], value, fManager); return oldValue; }
/** * Sets the option <code>key</code> to the value <code>value</code>. * Note that callers have to make sure the corresponding controls are updated afterwards. * * @param key the option key * @param value the new value * @return the old value * * @see #updateControls() * @see #updateCheckBox(Button) * @see #updateCombo(Combo) * @see #updateText(Text) */ protected String setValue(Key key, String value) { if (fDisabledProjectSettings != null) { return fDisabledProjectSettings.put(key, value); } String oldValue= getValue(key); key.setStoredValue(fLookupOrder[0], value, fManager); return oldValue; }
protected void updateCheckBox(Button curr) { ControlData data= (ControlData) curr.getData(); String currValue= getValue(data.getKey()); curr.setSelection(data.getSelection(currValue) == 0); }
protected void updateCheckBox(Button curr) { ControlData data= (ControlData) curr.getData(); String currValue= getValue(data.getKey()); curr.setSelection(data.getSelection(currValue) == 0); }
protected void updateCheckBox(Button curr) { ControlData data= (ControlData) curr.getData(); String currValue= getValue(data.getKey()); curr.setSelection(data.getSelection(currValue) == 0); }
protected Button addCheckBox(Composite parent, String label, Key key, String[] values, int indent) { ControlData data= new ControlData(key, values); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan= 3; gd.horizontalIndent= indent; Button checkBox= new Button(parent, SWT.CHECK); checkBox.setFont(JFaceResources.getDialogFont()); checkBox.setText(label); checkBox.setData(data); checkBox.setLayoutData(gd); checkBox.addSelectionListener(getSelectionListener()); makeScrollableCompositeAware(checkBox); String currValue= getValue(key); checkBox.setSelection(data.getSelection(currValue) == 0); fCheckBoxes.add(checkBox); return checkBox; }
protected void updateCombo(Combo curr) { ControlData data= (ControlData) curr.getData(); String currValue= getValue(data.getKey()); curr.select(data.getSelection(currValue)); }
protected void updateCombo(Combo curr) { ControlData data= (ControlData) curr.getData(); String currValue= getValue(data.getKey()); curr.select(data.getSelection(currValue)); }
protected void updateCombo(Combo curr) { ControlData data= (ControlData) curr.getData(); String currValue= getValue(data.getKey()); curr.select(data.getSelection(currValue)); }
protected Combo newComboControl(Composite composite, Key key, String[] values, String[] valueLabels) { ControlData data= new ControlData(key, values); Combo comboBox= new Combo(composite, SWT.READ_ONLY); comboBox.setItems(valueLabels); comboBox.setData(data); comboBox.addSelectionListener(getSelectionListener()); comboBox.setFont(JFaceResources.getDialogFont()); makeScrollableCompositeAware(comboBox); String currValue= getValue(key); comboBox.select(data.getSelection(currValue)); fComboBoxes.add(comboBox); return comboBox; }