// Path: src/main/java/wasr/widgets/FieldUIWidget.java
// public abstract class FieldUIWidget {
// 
//     private String label;
// 
//     public FieldUIWidget(String nodeId, String fieldId) {
//         label = UserSettings.getSelectedTemplateResource(nodeId + '.' + fieldId, nodeId + '.' + fieldId);
//     }
// 
//     public String getLabel() {
//         return label;
//     }
// 
//     public abstract JComponent getComponent();
// 
//     public abstract String getValue();
// 
//     public abstract void setValue(String value);
// 
//     void clear() {
//         setValue("");
//     }
// 
// }
// 
// Path: src/main/java/wasr/widgets/JTextFieldUIWidget.java
// public class JTextFieldUIWidget extends FieldUIWidget {
// 
//     private JTextField textField;
//     JPanel widgetPanel = new JPanel(new GridLayout(1, 1));
// 
//     public JTextFieldUIWidget(String nodeId, String fieldId) {
//         super(nodeId, fieldId);
//         textField = new JTextField();
//         widgetPanel.add(textField);
//         widgetPanel.setBorder(BorderFactory.createTitledBorder(this.getLabel()));
//     }
// 
// 
//     @Override
//     public JComponent getComponent() {
//         return widgetPanel;
//     }
// 
//     @Override
//     public String getValue() {
//         return textField.getText();
//     }
// 
//     @Override
//     public void setValue(String value) {
//         textField.setText(value);
//     }
// }


import org.apache.log4j.Logger;
import org.jdom2.Element;
import wasr.widgets.FieldUIWidget;
import wasr.widgets.JTextFieldUIWidget;
import java.util.HashMap;
import java.util.Map;
/*
 * Copyright 2013 Jason Gillam
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package wasr;




/**
 * User: Jason Gillam
 * Date: 11/7/12
 * Time: 10:14 PM
 */
public class FieldUI {
    private static Logger LOG = Logger.getLogger(FieldUI.class);

// Path: src/main/java/wasr/widgets/FieldUIWidget.java
// public abstract class FieldUIWidget {
// 
//     private String label;
// 
//     public FieldUIWidget(String nodeId, String fieldId) {
//         label = UserSettings.getSelectedTemplateResource(nodeId + '.' + fieldId, nodeId + '.' + fieldId);
//     }
// 
//     public String getLabel() {
//         return label;
//     }
// 
//     public abstract JComponent getComponent();
// 
//     public abstract String getValue();
// 
//     public abstract void setValue(String value);
// 
//     void clear() {
//         setValue("");
//     }
// 
// }
// 
// Path: src/main/java/wasr/widgets/JTextFieldUIWidget.java
// public class JTextFieldUIWidget extends FieldUIWidget {
// 
//     private JTextField textField;
//     JPanel widgetPanel = new JPanel(new GridLayout(1, 1));
// 
//     public JTextFieldUIWidget(String nodeId, String fieldId) {
//         super(nodeId, fieldId);
//         textField = new JTextField();
//         widgetPanel.add(textField);
//         widgetPanel.setBorder(BorderFactory.createTitledBorder(this.getLabel()));
//     }
// 
// 
//     @Override
//     public JComponent getComponent() {
//         return widgetPanel;
//     }
// 
//     @Override
//     public String getValue() {
//         return textField.getText();
//     }
// 
//     @Override
//     public void setValue(String value) {
//         textField.setText(value);
//     }
// }


// Path: src/main/java/wasr/FieldUI.java
import org.apache.log4j.Logger;
import org.jdom2.Element;
import wasr.widgets.FieldUIWidget;
import wasr.widgets.JTextFieldUIWidget;
import java.util.HashMap;
import java.util.Map;

/*
 * Copyright 2013 Jason Gillam
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package wasr;




/**
 * User: Jason Gillam
 * Date: 11/7/12
 * Time: 10:14 PM
 */
public class FieldUI {
    private static Logger LOG = Logger.getLogger(FieldUI.class);

    private static Map<String, FieldUIWidget> widgetMap = new HashMap<String, FieldUIWidget>();