jkteater
jkteater

Reputation: 1391

Is it possible to add a message bar/ toolbar at the bottom of a titleareadialog?

With my TitleAreaDialog is it possible to add a area or a bar across the bottom, below the buttons. That a message can be displayed to the users, when a operation is taking place.

Here is a example of what I am referring to

enter image description here

Upvotes: 2

Views: 584

Answers (1)

Baz
Baz

Reputation: 36894

AFAIK, this is not possible for JFace Dialogs. Depending on what exactly you are doing, you might want to have a look at JFace ApplicationWindow. This class has a method addStatusLine(). You would have to override the following method:

@Override
protected StatusLineManager createStatusLineManager() {
    StatusLineManager statusLineManager = new StatusLineManager();
    statusLineManager.setMessage(null, "YOUR_MESSAGE");
    return statusLineManager;
}

You can change the text with:

getStatusLineManager().setMessage("YOUR_NEW_MESSAGE");

Here is an excellent overview of the ApplicationWindow class.

Upvotes: 1

Related Questions