Add basic Java API for layout