db.introduceContexts(includedArrows, new DiagramBuilder.ContextFactory() {
public Context createContextFor(Container subdivisionOf, List<Contained> contents, InsertionInterface ii) {
Layout l = (subdivisionOf instanceof Context) ? ((Context)subdivisionOf).getLayoutDirection() : null;
return new Context(subdivisionOf.getID()+"-arrows", contents, false, null, l);
}
});
db.introduceContexts(includedGlyphs, new DiagramBuilder.ContextFactory() {
public Context createContextFor(Container subdivisionOf, List<Contained> contents, InsertionInterface ii) {
Layout l = null;
if (subdivisionOf instanceof Context) {
// clear layout direction as it is inherited by the child contexts now
l = ((Context)subdivisionOf).getLayoutDirection();
((Context)subdivisionOf).setLayoutDirection(null);
}
return new Context(subdivisionOf.getID()+"-glyphs", contents, false, null, l);
}
});
}