added setMode( horizontal/vertical ) API