public ULCComponent getComponent(String componentName) { for (TextFieldParameter textFieldParameter : textFieldParameters) { ULCTextField textField = textFieldParameter.getWidget(); if (textField.getName().equals(componentName)) return textField; } return null; }
@Override protected TextFieldParameter addTextField(String propertyName) { TextFieldParameter textFieldParameter = super.addTextField(propertyName); textFieldParameter.getWidget().setName(propertyName); textFieldParameters.add(textFieldParameter); return textFieldParameter; }
public void addKeyListener() { for (TextFieldParameter textFieldParameter : textFieldParameters) { ULCTextField textField = textFieldParameter.getWidget(); textField.addKeyListener( new IKeyListener() { @Override public void keyTyped(KeyEvent keyEvent) { (getModel()).updatePresentationState(); } }); } }
public void registerKeyboardAction(KeyStroke enter, IActionListener action) { for (TextFieldParameter textFieldParameter : textFieldParameters) { ULCTextField textField = textFieldParameter.getWidget(); textField.registerKeyboardAction(action, enter, ULCComponent.WHEN_FOCUSED); } }