Add Component.width() and Component.height().

Close #880.
Style issue - remove space between () and ]