mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Fixed tooltip usage in memory search widget
This commit is contained in:
parent
98b938cc65
commit
b4f7c920e6
3 changed files with 55 additions and 8 deletions
|
@ -124,6 +124,8 @@ public class DockingUtils {
|
|||
private static final KeyStroke REDO_KEYSTROKE =
|
||||
KeyStroke.getKeyStroke(KeyEvent.VK_Y, CONTROL_KEY_MODIFIER_MASK);
|
||||
|
||||
private static boolean globalTooltipsEnabled = true;
|
||||
|
||||
public static JSeparator createToolbarSeparator() {
|
||||
Dimension sepDim = new Dimension(2, ICON_SIZE + 2);
|
||||
JSeparator separator = new JSeparator(SwingConstants.VERTICAL);
|
||||
|
@ -355,19 +357,36 @@ public class DockingUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the application-wide Java tooltip enablement.
|
||||
* @param enabled true if enabled; false prevents all Java tooltips
|
||||
* Not meant for public consumption. This is for application code to control tooltips on
|
||||
* behalf of the user.
|
||||
* @param enabled true if enabled
|
||||
*/
|
||||
public static void setTipWindowEnabled(boolean enabled) {
|
||||
public static void setGlobalTooltipEnabledOption(boolean enabled) {
|
||||
globalTooltipsEnabled = enabled;
|
||||
Swing.runLater(() -> ToolTipManager.sharedInstance().setEnabled(enabled));
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: calling this method has no effect
|
||||
* @param enabled true if enabled; false prevents all Java tooltips
|
||||
* @deprecated this method is not longer supported; controlling application tooltips should be
|
||||
* done through tool options in the UI
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "12")
|
||||
public static void setTipWindowEnabled(boolean enabled) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if application-wide Java tooltips are enabled.
|
||||
* @return true if application-wide Java tooltips are enabled.
|
||||
*/
|
||||
public static boolean isTipWindowEnabled() {
|
||||
return Swing.runNow(() -> ToolTipManager.sharedInstance().isEnabled());
|
||||
// Note: using this call would allow for client code to control tooltip enablement. We use
|
||||
// tool options to control enablement, which is reflected in the boolean used below.
|
||||
// return Swing.runNow(() -> ToolTipManager.sharedInstance().isEnabled());
|
||||
|
||||
return globalTooltipsEnabled;
|
||||
}
|
||||
|
||||
/** Hides any open tooltip window */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue