More options when a table has no data

I'd like more display options when a table has no data.

At the moment I can just show a string, which appears in the table. I'd like one of two alternatives.

1. Show a rich text area with text of my choice, and don't show the table.

2. Show a notification in the same style as the notifications that a page rule can show, and don't show the table.

I can't do this with page rules, because the rules to determine if a page rule action should fire are not as sophisticated as the rules to determine what data a table should contain.