protected void setComboEnabled(Key key, boolean enabled) { Combo combo= getComboBox(key); Label label= fLabels.get(combo); combo.setEnabled(enabled); label.setEnabled(enabled); }
protected void setComboEnabled(Key key, boolean enabled) { Combo combo= getComboBox(key); Label label= (Label) fLabels.get(combo); combo.setEnabled(enabled); label.setEnabled(enabled); } }
protected Control findControl(Key key) { Combo comboBox= getComboBox(key); if (comboBox != null) { return comboBox; } Button checkBox= getCheckBox(key); if (checkBox != null) { return checkBox; } Text text= getTextControl(key); if (text != null) { return text; } return null; }
protected void setComboEnabled(Key key, boolean enabled) { Combo combo= getComboBox(key); Label label= fLabels.get(combo); combo.setEnabled(enabled); label.setEnabled(enabled); if (!enabled) { highlight(combo.getParent(), label, combo, HIGHLIGHT_NONE); } }
protected Control findControl(Key key) { Combo comboBox= getComboBox(key); if (comboBox != null) { return comboBox; } Button checkBox= getCheckBox(key); if (checkBox != null) { return checkBox; } Text text= getTextControl(key); if (text != null) { return text; } Link link= getLink(key); if (link != null) { return link; } return null; }
protected Control findControl(Key key) { Combo comboBox= getComboBox(key); if (comboBox != null) { return comboBox; } Button checkBox= getCheckBox(key); if (checkBox != null) { return checkBox; } Text text= getTextControl(key); if (text != null) { return text; } Link link= getLink(key); if (link != null) { return link; } return null; }
control= fConfigBlock.getCheckBox(node.getKey()); } else if (controlType == PreferenceTreeNode.COMBO) { control= fConfigBlock.getComboBox(node.getKey()); } else if (controlType == PreferenceTreeNode.TEXT_CONTROL) { control= fConfigBlock.getTextControl(node.getKey());
private boolean match(PreferenceTreeNode node, StringMatcher labelMatcher, StringMatcher valueMatcher) { if (node.getKey() == null) { return false; } boolean valueMatched= true; boolean labelMatched= true; if (labelMatcher != null) { labelMatched= labelMatcher.match(node.getLabel()); } if (valueMatcher != null) { if (node.getControlType() == PreferenceTreeNode.COMBO) { valueMatched= valueMatcher.match(fConfigBlock.getComboBox(node.getKey()).getText()); } else if (node.getControlType() == PreferenceTreeNode.CHECKBOX) { boolean checked= fConfigBlock.getCheckBox(node.getKey()).getSelection(); if (checked) { valueMatched= valueMatcher.match(PreferencesMessages.OptionsConfigurationBlock_On) || valueMatcher.match(PreferencesMessages.OptionsConfigurationBlock_Enabled); } else { valueMatched= valueMatcher.match(PreferencesMessages.OptionsConfigurationBlock_Off) || valueMatcher.match(PreferencesMessages.OptionsConfigurationBlock_Disabled); } } } return labelMatched && valueMatched; }