Only enqueue CSS and JS when a widget is used!

I am currently adding CSS and JS files with my Widgets by adding actions.

See example for adding script:

add_action( 'wp_print_scripts', 'My_Widget_enqueue_my_scripts' );
function My_Widget_enqueue_my_scripts(){
global $blog_id;
if($blog_id!=1){return;} // only on main blog!
if(is_admin()){return;} // not in admin area
wp_enqueue_script('my-javascript', WP_PLUGIN_URL . '/my-plugin/my-javascript.js');
}

How can I restrict the adding of CSS and JS when the plugin is actually used on page.
Used = residing in a sidebar....