});
JPanel panel = new JPanel(new FormLayout("fill:pref:nogrow,fill:5dlu:nogrow, fill:pref:grow", "fill:pref:grow"));
panel.add(form.getControl(), new CellConstraints(1, 1));
JTabbedPane pane = new JTabbedPane();
pane.addTab("Properties", new JScrollPane(area));
final PropertySheetTableModel propertySheetTableModel = new PropertySheetTableModel();
for(final Object property : form.getFormModel().getFieldNames())
{
Property p = new AbstractProperty()
{
public String getName()
{
return property.toString();
}
public String getDisplayName()
{
return property.toString();
}
public String getShortDescription()
{
return property.toString();
}
public Class getType()
{
return form.getFormModel().getFieldMetadata(property.toString()).getPropertyType();
}
public boolean isEditable()
{
return false;
}
public String getCategory()
{
return form.getFormModel().getId();
}
public Object getValue()
{
Object value = form.getFormModel().getValueModel(property.toString()).getValue();
if(value == null)
{
return "«null»";
}
else if(!StringUtils.hasText(value.toString()))
{
return "«empty string»";
}
else
{
return value;
}
}
public void readFromObject(Object o)
{
throw new UnsupportedOperationException("Method readFromObject not yet implemented");
}
public void writeToObject(Object o)
{
throw new UnsupportedOperationException("Method writeToObject not yet implemented");
}
};
propertySheetTableModel.addProperty(p);
}
final PropertySheetTable table = new PropertySheetTable(propertySheetTableModel);
new Thread(new Runnable()
{
public void run()
{
while(true)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
propertySheetTableModel.fireTableDataChanged();
//table.repaint();
}
});
try
{