public void addToolbarComponent ( BaseComponent component , String action ) { BaseComponent ref = toolbar . getFirstChild ( ) ; if ( component instanceof Toolbar ) { BaseComponent child ; while ( ( child = component . getFirstChild ( ) ) != null ) { toolbar . addChild ( child , ref ) ; } } else { toolbar . addChild ( component , ref ) ; ActionUtil . addAction ( component , action ) ; } }
Adds a component to the toolbar .