/******************************************************************************* * Copyright (c) 2009 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.jboss.tools.jsf.ui.el.refactoring; import org.jboss.tools.common.ui.widget.editor.CompositeEditor; import org.jboss.tools.common.ui.widget.editor.IFieldEditor; import org.jboss.tools.common.ui.widget.editor.LabelFieldEditor; import org.jboss.tools.common.ui.widget.editor.TextFieldEditor; public class FieldEditorFactory { public static IFieldEditor createTextEditor(String name, String label, String defaultValue) { CompositeEditor editor = new CompositeEditor(name,label, defaultValue); editor.addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,label), new TextFieldEditor(name,label, defaultValue)}); return editor; } }