public class TreeNodeSpecification extends CompositeViewSpecification {
public TreeNodeSpecification() {
builder = new ViewBuilder() {
ViewBuilder objectBuilder = new ObjectFieldBuilder(new ViewFactory() {
@Override
public View createView(final Content content, final Axes axes, final int sequence) {
if (content.isTextParseable() || content.getAdapter() == null) {
return null;
} else if (content.isObject()) {
return new IconElementFactory().createView(content, axes, 0); // TreeNodeSpecification.this.createView(content,
// axes);
} else {
return TreeNodeSpecification.this.createView(content, axes, -1);
}
}
});
ViewBuilder collectiontBuilder = new CollectionElementBuilder(new IconElementFactory());
{
final Factory decorator = new ExpandableViewBorder.Factory(null, TreeNodeSpecification.this, null);
objectBuilder.addSubviewDecorator(decorator);
collectiontBuilder.addSubviewDecorator(decorator);
}
@Override