[REFACTOR] way to get orientation-dependent parameters
[SPLIT] logic into several classes
[ADD] gravity to layout itself.
[DELETE] fill lines as obsolete. Now it is replaced by gravity