JComponent component;
if (attributes != null && attributes.size() != 0) {
comps = new LinkedHashMap<String, JComponent>();
if (!head.getNameString().equalsIgnoreCase("Garasjetype")) {
beanAdapterAtt = new BeanAdapter(new IArticleAttributeModel(attributes.iterator()
.next()));
component = BasicComponentFactory.createFormattedTextField(beanAdapterAtt
.getValueModel(IArticleAttributeModel.PROPERTY_NUMBER_OF_ITEMS_LONG),
decimalFormat);
component.setName("TextFieldAntall");
comps.put("Antall", component);
}
AttributeChangeListener attributeChangeListener = new AttributeChangeListener();
for (IArticleAttribute att : attributes) {
beanAdapterAtt = new BeanAdapter(new IArticleAttributeModel(att));
beanAdapterAtt.addBeanPropertyChangeListener(attributeChangeListener);
if (att.isYesNo()) {
component = BasicComponentFactory.createCheckBox(beanAdapterAtt
.getValueModel(IArticleAttributeModel.PROPERTY_ATTRIBUTE_VALUE_BOOL), "");