GT-2886 - fixed NPE when trying to beep

This commit is contained in:
dragonmacher 2019-05-22 14:38:33 -04:00
parent 146a83f953
commit 2f58ec7b47
8 changed files with 53 additions and 39 deletions

View file

@ -1909,7 +1909,7 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
}
/**
* Set the status text in the active component window.
* Set the status text in the active component window
* @param text status text
*/
public void setStatusText(String text) {
@ -1918,6 +1918,30 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
}
}
/**
* Set the status text in the active component window
*
* @param text string to be displayed in the Status display area
* @param beep whether to beep or not
*/
public void setStatusText(String text, boolean beep) {
if (root == null) {
return;
}
setStatusText(text);
if (beep) {
Toolkit.getDefaultToolkit().beep();
}
}
/**
* A convenience method to make an attention-grabbing noise to the user
*/
public static void beep() {
Toolkit.getDefaultToolkit().beep();
}
/**
* Set the menu group associated with a cascaded submenu. This allows
* a cascading menu item to be grouped with a specific set of actions.