Merge remote-tracking branch

'origin/GT-2853_dev747368_remove_tooltipmanager'

Conflicts:
	Ghidra/Framework/Docking/src/main/java/ghidra/util/task/TaskMonitorComponent.java
This commit is contained in:
ghidra1 2019-05-09 16:48:56 -04:00
commit 7da1abe3ea
44 changed files with 163 additions and 347 deletions

View file

@ -17,11 +17,12 @@ package ghidra;
import java.io.File;
import javax.swing.ToolTipManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import docking.DockingWindowManager;
import docking.ToolTipManager;
import docking.framework.SplashScreen;
import ghidra.base.help.GhidraHelpService;
import ghidra.framework.Application;
@ -131,9 +132,8 @@ public class GhidraRun implements GhidraLaunchable {
}
private void initializeTooltips() {
ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
int currentDelay = toolTipManager.getDismissDelay();
toolTipManager.setDismissDelay(currentDelay * 2);
int currentDelay = ToolTipManager.sharedInstance().getDismissDelay();
ToolTipManager.sharedInstance().setDismissDelay(currentDelay * 2);
}
/**

View file

@ -25,7 +25,6 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.Document;
import docking.ToolTipManager;
import docking.widgets.OptionDialog;
import docking.widgets.button.GRadioButton;
import docking.widgets.checkbox.GCheckBox;
@ -198,7 +197,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
infoPanel.add(nameLabel, gridBagConstraints);
nameTextField = new JTextField("");
ToolTipManager.setToolTipText(nameTextField, "Structure Name");
nameTextField.setToolTipText("Structure Name");
nameTextField.setEditable(true);
nameTextField.setMargin(TEXTFIELD_INSETS);
gridBagConstraints.insets = VERTICAL_INSETS;
@ -230,7 +229,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
descriptionTextField = new JTextField("");
descriptionTextField.setMargin(TEXTFIELD_INSETS);
ToolTipManager.setToolTipText(descriptionTextField, "Structure Description");
descriptionTextField.setToolTipText("Structure Description");
descriptionTextField.setEditable(true);
gridBagConstraints.insets = VERTICAL_INSETS;
gridBagConstraints.anchor = GridBagConstraints.LINE_START;
@ -261,7 +260,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
categoryStatusTextField = new JTextField(" ");
categoryStatusTextField.setEditable(false);
ToolTipManager.setToolTipText(categoryStatusTextField,
categoryStatusTextField.setToolTipText(
"Category of this composite data type.");
categoryStatusTextField.setMargin(TEXTFIELD_INSETS);
gridBagConstraints.insets = VERTICAL_INSETS;
@ -283,7 +282,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
gridBagConstraints.gridx = 4;
gridBagConstraints.gridy = 3;
internalAlignmentCheckBox.setSelected(model.viewComposite.isInternallyAligned());
ToolTipManager.setToolTipText(internalAlignmentCheckBox,
internalAlignmentCheckBox.setToolTipText(
"Whether or not the internal components of this structure are aligned.");
internalAlignmentCheckBox.setEnabled(true);
if (helpManager != null) {
@ -401,7 +400,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
"<HTML>" + "Sets this data type to have <B>no</B> minimum alignment<BR>" +
"when aligning this data type inside another data type.<BR>" +
"Align this data type based only on its components." + "</HTML>";
ToolTipManager.setToolTipText(defaultMinAlignButton, alignmentToolTip);
defaultMinAlignButton.setToolTipText(alignmentToolTip);
if (helpManager != null) {
helpManager.registerHelp(defaultMinAlignButton, new HelpLocation(
provider.getHelpTopic(), provider.getHelpName() + "_" + "AlignMinimum"));
@ -413,7 +412,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
String alignmentToolTip = "<HTML>" + "Sets this data type to have a minimum alignment<BR>" +
"that is a multiple of the <B>machine</B> alignment<BR>" +
"when aligning this data type inside another data type." + "</HTML>";
ToolTipManager.setToolTipText(machineMinAlignButton, alignmentToolTip);
machineMinAlignButton.setToolTipText(alignmentToolTip);
if (helpManager != null) {
helpManager.registerHelp(machineMinAlignButton, new HelpLocation(
provider.getHelpTopic(), provider.getHelpName() + "_" + "AlignMinimum"));
@ -425,7 +424,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
String alignmentToolTip = "<HTML>" + "Sets this data type to have a minimum alignment<BR>" +
"that is a multiple of the <B>specified value</B><BR>" +
"when aligning this data type inside another data type." + "</HTML>";
ToolTipManager.setToolTipText(byValueMinAlignButton, alignmentToolTip);
byValueMinAlignButton.setToolTipText(alignmentToolTip);
if (helpManager != null) {
helpManager.registerHelp(byValueMinAlignButton, new HelpLocation(
provider.getHelpTopic(), provider.getHelpName() + "_" + "AlignMinimum"));
@ -434,7 +433,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
minAlignValueTextField.setName("Minimum Alignment Value");
minAlignValueTextField.setEditable(true);
minAlignValueTextField.setMargin(TEXTFIELD_INSETS);
ToolTipManager.setToolTipText(minAlignValueTextField, alignmentToolTip);
minAlignValueTextField.setToolTipText(alignmentToolTip);
if (helpManager != null) {
helpManager.registerHelp(minAlignValueTextField, new HelpLocation(
provider.getHelpTopic(), provider.getHelpName() + "_" + "AlignMinimum"));
@ -495,13 +494,13 @@ public class CompEditorPanel extends CompositeEditorPanel {
gridBagConstraints.fill = GridBagConstraints.NONE;
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 3;
ToolTipManager.setToolTipText(actualAlignmentLabel, actualAlignmentToolTip);
actualAlignmentLabel.setToolTipText(actualAlignmentToolTip);
actualAlignmentPanel.add(actualAlignmentLabel, BorderLayout.EAST);
infoPanel.add(actualAlignmentPanel, gridBagConstraints);
actualAlignmentValueTextField = new JTextField(8);
actualAlignmentValueTextField.setText("" + ((CompEditorModel) model).getMinimumAlignment());
ToolTipManager.setToolTipText(actualAlignmentValueTextField, actualAlignmentToolTip);
actualAlignmentValueTextField.setToolTipText(actualAlignmentToolTip);
actualAlignmentValueTextField.setEditable(false);
if (helpManager != null) {
helpManager.registerHelp(actualAlignmentValueTextField, new HelpLocation(
@ -587,7 +586,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
}
});
ToolTipManager.setToolTipText(noPackingButton, packingToolTipText);
noPackingButton.setToolTipText(packingToolTipText);
if (helpManager != null) {
helpManager.registerHelp(noPackingButton, new HelpLocation(provider.getHelpTopic(),
provider.getHelpName() + "_" + "PackMaximum"));
@ -602,7 +601,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
"Note: An individual data type's alignment may override this value.</HTML>";
byValuePackingButton.addActionListener(e -> chooseByValuePacking());
ToolTipManager.setToolTipText(byValuePackingButton, packingToolTipText);
byValuePackingButton.setToolTipText(packingToolTipText);
if (helpManager != null) {
helpManager.registerHelp(byValuePackingButton, new HelpLocation(provider.getHelpTopic(),
provider.getHelpName() + "_" + "PackMaximum"));
@ -630,7 +629,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
}
});
ToolTipManager.setToolTipText(packingValueTextField, packingToolTipText);
packingValueTextField.setToolTipText(packingToolTipText);
if (helpManager != null) {
helpManager.registerHelp(packingValueTextField, new HelpLocation(
provider.getHelpTopic(), provider.getHelpName() + "_" + "PackMaximum"));
@ -722,7 +721,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
sizeLabel = new GDLabel("Size:");
ToolTipManager.setToolTipText(sizeLabel, "The current size in bytes.");
sizeLabel.setToolTipText("The current size in bytes.");
gridBagConstraints.anchor = GridBagConstraints.LINE_END;
gridBagConstraints.fill = GridBagConstraints.NONE;
gridBagConstraints.gridx = 0;
@ -732,7 +731,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
sizeStatusTextField = new JTextField(10);
sizeStatusTextField.setName("Total Length");
sizeStatusTextField.setEditable(false);
ToolTipManager.setToolTipText(sizeStatusTextField, "The current size in bytes.");
sizeStatusTextField.setToolTipText("The current size in bytes.");
sizeStatusTextField.setMargin(TEXTFIELD_INSETS);
gridBagConstraints.ipadx = 60;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;

View file

@ -32,7 +32,6 @@ import javax.swing.event.ChangeEvent;
import javax.swing.table.*;
import javax.swing.text.JTextComponent;
import docking.ToolTipManager;
import docking.action.DockingActionIf;
import docking.dnd.*;
import docking.help.Help;
@ -647,10 +646,10 @@ public abstract class CompositeEditorPanel extends JPanel
messageWidth = fm.stringWidth(text);
}
if (messageWidth > statusLabel.getWidth()) {
ToolTipManager.setToolTipText(statusLabel, text);
statusLabel.setToolTipText(text);
}
else {
ToolTipManager.setToolTipText(statusLabel, "Editor messages appear here.");
statusLabel.setToolTipText("Editor messages appear here.");
}
}

View file

@ -25,7 +25,6 @@ import javax.swing.event.DocumentListener;
import docking.ActionContext;
import docking.DialogComponentProvider;
import docking.ToolTipManager;
import docking.action.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
@ -126,7 +125,7 @@ public class AddressTableDialog extends DialogComponentProvider {
JPanel makeTablePanel = new JPanel(new FlowLayout());
makeTableButton = new JButton("Make Table");
ToolTipManager.setToolTipText(makeTableButton,
makeTableButton.setToolTipText(
"Make a table of addresses at the selected location(s).");
makeTablePanel.add(makeTableButton);
makeTableButton.setEnabled(false);
@ -134,7 +133,7 @@ public class AddressTableDialog extends DialogComponentProvider {
JPanel disassemblePanel = new JPanel(new FlowLayout());
disassembleTableButton = new JButton("Disassemble");
ToolTipManager.setToolTipText(disassembleTableButton,
disassembleTableButton.setToolTipText(
"Disassemble at all locations pointed to by the selected address table(s) members.");
disassembleTableButton.setEnabled(false);
disassemblePanel.add(disassembleTableButton);
@ -152,7 +151,7 @@ public class AddressTableDialog extends DialogComponentProvider {
searchOptionsPanel.setBorder(BorderFactory.createTitledBorder("Search Options"));
JLabel minLengthLabel = new GLabel("Minimum Length: ");
ToolTipManager.setToolTipText(minLengthLabel,
minLengthLabel.setToolTipText(
"The minimum number of consecutive addresses that will make an address table.");
minLengthField = new JTextField(5);
minLengthField.setName("Minimum Length");
@ -165,7 +164,7 @@ public class AddressTableDialog extends DialogComponentProvider {
alignLabel = new GDLabel("Alignment: ");
alignField = new JTextField(5);
alignField.setName("Alignment");
ToolTipManager.setToolTipText(alignLabel,
alignLabel.setToolTipText(
"Alignment that address tables and what they are pointing to must satisfy.");
int align = plugin.getProgram().getLanguage().getInstructionAlignment();
if (PseudoDisassembler.hasLowBitCodeModeInAddrValues(plugin.getProgram())) {
@ -176,7 +175,7 @@ public class AddressTableDialog extends DialogComponentProvider {
skipLabel = new GDLabel("Skip Length: ");
skipField = new JTextField(5);
skipField.setName("Skip");
ToolTipManager.setToolTipText(skipLabel,
skipLabel.setToolTipText(
"Number of bytes to skip between found addresses in a table.");
skipField.setText("0");
@ -195,7 +194,7 @@ public class AddressTableDialog extends DialogComponentProvider {
selectionButton = new GCheckBox("Search Selection");
selectionButton.setSelected(false);
ToolTipManager.setToolTipText(selectionButton,
selectionButton.setToolTipText(
"If checked, search only the current selection.");
JPanel searchOptionsWestPanel = new JPanel(new GridLayout(2, 1));
searchOptionsWestPanel.add(selectionButton);
@ -213,7 +212,7 @@ public class AddressTableDialog extends DialogComponentProvider {
shiftedAddressButton.setVisible(false);
}
ToolTipManager.setToolTipText(shiftedAddressButton,
shiftedAddressButton.setToolTipText(
"Search for tables of four byte values that when shifted left by two, are valid " +
"addresses in the current program.");
searchOptionsWestPanel.add(shiftedAddressButton);
@ -230,11 +229,11 @@ public class AddressTableDialog extends DialogComponentProvider {
autoLabelCB = new GCheckBox("Auto Label");
autoLabelCB.setSelected(true);
autoLabelCB.setEnabled(false);
ToolTipManager.setToolTipText(autoLabelCB,
autoLabelCB.setToolTipText(
"Label the top of the address table and all members of the table.");
offsetLabel = new GDLabel("Offset: ");
ToolTipManager.setToolTipText(offsetLabel,
offsetLabel.setToolTipText(
"Offset from the beginning of the selected table(s)");
offsetLabel.setEnabled(false);
@ -243,7 +242,7 @@ public class AddressTableDialog extends DialogComponentProvider {
viewOffset = new HintTextField(20);
viewOffset.setName("viewOffset");
ToolTipManager.setToolTipText(viewOffset,
viewOffset.setToolTipText(
"Address of the selected table starting at the given offset");
viewOffset.setHintText("table start address");
viewOffset.showHint();
@ -257,8 +256,7 @@ public class AddressTableDialog extends DialogComponentProvider {
offsetField = new JTextField(2);
offsetField.setName("offset");
ToolTipManager.setToolTipText(offsetField,
"Offset from the beginning of the selected table(s)");
offsetField.setToolTipText("Offset from the beginning of the selected table(s)");
offsetField.setText("0");
offsetField.setEnabled(false);
offsetField.addActionListener(

View file

@ -26,7 +26,6 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider;
import docking.ToolTipManager;
import docking.widgets.button.GRadioButton;
import docking.widgets.label.GDLabel;
import ghidra.app.util.AddressInput;
@ -239,7 +238,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
model.defaultSelected();
}
});
ToolTipManager.setToolTipText(defaultRB, "Use default fallthrough address");
defaultRB.setToolTipText("Use default fallthrough address");
userRB = new GRadioButton("User", false);
userRB.addActionListener(new ActionListener() {
@ -248,7 +247,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
model.userSelected();
}
});
ToolTipManager.setToolTipText(userRB, "Override default fallthrough address");
userRB.setToolTipText("Override default fallthrough address");
group.add(defaultRB);
group.add(userRB);
@ -273,7 +272,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
else {
button = new JButton(altText);
}
ToolTipManager.setToolTipText(button, "Go back to home address");
button.setToolTipText("Go back to home address");
return button;
}

View file

@ -20,11 +20,11 @@ import java.awt.event.*;
import java.util.Iterator;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
import org.jdesktop.animation.timing.Animator;
import docking.DockingWindowManager;
import docking.ToolTipManager;
import docking.util.AnimationUtils;
import docking.util.SwingAnimationCallback;
import ghidra.program.model.address.*;

View file

@ -22,7 +22,7 @@ import java.util.List;
import javax.swing.*;
import docking.ToolTipManager;
import docking.DockingUtils;
import docking.widgets.PopupWindow;
import docking.widgets.fieldpanel.field.Field;
import docking.widgets.fieldpanel.support.FieldLocation;
@ -104,7 +104,7 @@ public abstract class AbstractHoverProvider implements HoverProvider {
activeHoverService = null;
lastField = null;
ToolTipManager.sharedInstance().hideTipWindow();
DockingUtils.hideTipWindow();
if (popupWindow != null) {
popupWindow.dispose();

View file

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,6 +19,7 @@ import java.awt.Graphics;
import java.awt.event.MouseEvent;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
/**
* Panel to display markers. Normally placed to the left hand side
@ -33,7 +33,7 @@ public class MarkerPanel extends JPanel {
super();
this.manager = manager;
docking.ToolTipManager.sharedInstance().registerComponent(this);
ToolTipManager.sharedInstance().registerComponent(this);
}
@Override

View file

@ -22,10 +22,8 @@ import java.math.BigInteger;
import java.util.Arrays;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.*;
import docking.ToolTipManager;
import docking.action.DockingActionIf;
import docking.help.Help;
import ghidra.app.services.GoToService;

View file

@ -28,7 +28,6 @@ import javax.swing.JLabel;
import javax.swing.JPanel;
import docking.ActionContext;
import docking.ToolTipManager;
import docking.action.DockingAction;
import docking.action.MenuData;
import docking.widgets.label.GDLabel;
@ -99,7 +98,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
instructionLabel = new GDLabel(" ");
instructionPanel.setPreferredSize(
new Dimension(200, instructionLabel.getPreferredSize().height));
ToolTipManager.setToolTipText(instructionLabel, CURRENT_INSTRUCTION_PREPEND_STRING);
instructionLabel.setToolTipText(CURRENT_INSTRUCTION_PREPEND_STRING);
instructionPanel.add(instructionLabel);
instructionPanel.setName("Current Instruction");
tool.addStatusComponent(instructionPanel, true, false);
@ -117,7 +116,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
}
});
functionPanel.setPreferredSize(new Dimension(130, functionLabel.getPreferredSize().height));
ToolTipManager.setToolTipText(functionLabel, "Current Function");
functionLabel.setToolTipText("Current Function");
functionPanel.add(functionLabel);
functionPanel.setName("Current Function");
tool.addStatusComponent(functionPanel, true, false);
@ -125,7 +124,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
addressPanel = new JPanel(new BorderLayout());
addressLabel = new GDLabel(" ");
addressPanel.setPreferredSize(new Dimension(95, addressLabel.getPreferredSize().height));
ToolTipManager.setToolTipText(addressLabel, "Current Address");
addressLabel.setToolTipText("Current Address");
addressPanel.add(addressLabel);
addressPanel.setName("Current Address");
tool.addStatusComponent(addressPanel, true, false);
@ -338,25 +337,25 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
boolean insideFunction = currentFunction != null;
if (insideFunction) {
functionLabel.setText(" " + currentFunction.getName() + " ");
ToolTipManager.setToolTipText(functionLabel,
functionLabel.setToolTipText(
currentFunction.getName() + CURRENT_FUNCTION_APPEND_STRING);
}
else {
functionLabel.setText("");
ToolTipManager.setToolTipText(functionLabel, "");
functionLabel.setToolTipText("");
}
/// code added //
Instruction instr = getInstructionForCurrentProgram();
if (instr == null) {
instructionLabel.setText("");
ToolTipManager.setToolTipText(instructionLabel, "");
instructionLabel.setToolTipText("");
return;
}
String representation = instr.toString();
instructionLabel.setText(" " + representation + " ");
ToolTipManager.setToolTipText(instructionLabel,
instructionLabel.setToolTipText(
CURRENT_INSTRUCTION_PREPEND_STRING + representation);
// end code added ///
@ -381,7 +380,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
@Override
protected void programDeactivated(Program program) {
instructionLabel.setText("");
ToolTipManager.setToolTipText(instructionLabel, "");
instructionLabel.setToolTipText("");
if (connectedProvider != null) {
connectedProvider.setProgram(null);
}

View file

@ -15,21 +15,19 @@
*/
package ghidra.app.plugin.core.progmgr;
import java.awt.Dimension;
import java.awt.Graphics;
import java.util.Iterator;
import java.util.List;
import javax.swing.*;
import ghidra.framework.data.DomainObjectAdapterDB;
import ghidra.framework.model.Transaction;
import ghidra.framework.model.TransactionListener;
import ghidra.program.database.ProgramDB;
import ghidra.program.model.listing.Program;
import ghidra.util.HTMLUtilities;
import java.awt.Dimension;
import java.awt.Graphics;
import java.util.Iterator;
import java.util.List;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import resources.ResourceManager;
class TransactionMonitor extends JComponent implements TransactionListener {
@ -44,7 +42,7 @@ class TransactionMonitor extends JComponent implements TransactionListener {
super();
busyIcon = ResourceManager.loadImage("images/editbytes.gif");
prefSize = new Dimension(busyIcon.getIconWidth(), busyIcon.getIconHeight());
docking.ToolTipManager.sharedInstance().registerComponent(this);
ToolTipManager.sharedInstance().registerComponent(this);
}
void setProgram(Program p) {

View file

@ -22,7 +22,6 @@ import java.util.*;
import javax.swing.*;
import javax.swing.tree.DefaultTreeCellRenderer;
import docking.ToolTipManager;
import docking.widgets.GComponent;
import ghidra.program.model.listing.Group;
import resources.ResourceManager;
@ -163,12 +162,12 @@ class DnDTreeCellRenderer extends DefaultTreeCellRenderer {
setBackgroundSelectionColor(defaultSelectionColor);
setBackgroundNonSelectionColor(defaultNonSelectionColor);
}
ToolTipManager.setToolTipText(this, null);
setToolTipText(null);
}
else {
setBackgroundSelectionColor(defaultSelectionColor);
setBackgroundNonSelectionColor(defaultNonSelectionColor);
ToolTipManager.setToolTipText(this, dtree.getToolTipText(node));
setToolTipText(dtree.getToolTipText(node));
}
}

View file

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -85,7 +84,7 @@ public abstract class DragNDropTree extends JTree implements Draggable, Droppabl
plafSelectionColor = dndCellRenderer.getBackgroundSelectionColor();
nonSelectionDragColor = new Color(204, 204, 255);
initDragNDrop();
docking.ToolTipManager.sharedInstance().registerComponent(this);
ToolTipManager.sharedInstance().registerComponent(this);
autoscroller = new AutoscrollAdapter(this, getRowHeight());
disableJTreeTransferActions();
}

View file

@ -25,7 +25,6 @@ import javax.swing.border.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import docking.ToolTipManager;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput;
@ -103,7 +102,7 @@ class EditExternalReferencePanel extends EditReferencePanel {
extLibPath.setFocusable(false);
clearButton = new JButton("Clear");
ToolTipManager.setToolTipText(clearButton, "Remove Link to External Program");
clearButton.setToolTipText("Remove Link to External Program");
clearButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -112,7 +111,7 @@ class EditExternalReferencePanel extends EditReferencePanel {
});
editButton = new JButton("Edit");
ToolTipManager.setToolTipText(editButton, "Edit Link to External Program");
editButton.setToolTipText("Edit Link to External Program");
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

View file

@ -668,7 +668,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter
col.setMaxWidth(80);
col.setResizable(false);
docking.ToolTipManager.sharedInstance().registerComponent(refsTable);
ToolTipManager.sharedInstance().registerComponent(refsTable);
dropTargetAdapter = new DropTgtAdapter(dropHandler, DnDConstants.ACTION_COPY_OR_MOVE,
ACCEPTABLE_DROP_FLAVORS);

View file

@ -146,7 +146,7 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter {
JScrollPane sp = new JScrollPane(table);
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
docking.ToolTipManager.sharedInstance().registerComponent(table);
ToolTipManager.sharedInstance().registerComponent(table);
panel.add(sp, BorderLayout.CENTER);

View file

@ -86,7 +86,7 @@ class RelocationProvider extends ComponentProviderAdapter {
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
docking.ToolTipManager.sharedInstance().registerComponent(table);
ToolTipManager.sharedInstance().registerComponent(table);
panel.add(threadedPanel, BorderLayout.CENTER);

View file

@ -26,7 +26,6 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import docking.DockingWindowManager;
import docking.ToolTipManager;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
@ -155,11 +154,11 @@ class EditExternalLocationPanel extends JPanel {
extLibPathTextField.setFocusable(false);
clearButton = new JButton("Clear");
ToolTipManager.setToolTipText(clearButton, "Remove Link to External Program");
clearButton.setToolTipText("Remove Link to External Program");
clearButton.addActionListener(e -> extLibPathTextField.setText(null));
editButton = new JButton("Edit");
ToolTipManager.setToolTipText(editButton, "Edit Link to External Program");
editButton.setToolTipText("Edit Link to External Program");
editButton.addActionListener(e -> popupProgramChooser());
JPanel pathPanel = new JPanel(new BorderLayout());

View file

@ -19,9 +19,9 @@ import java.awt.Component;
import java.beans.PropertyEditorSupport;
import java.math.BigInteger;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import docking.ToolTipManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
@ -63,9 +63,9 @@ public class AddressFieldOptionsPropertyEditor extends PropertyEditorSupport
private AddressFieldOptionsWrappedOption addressFieldOptionsWrappedOption;
private Component editorComponent;
private JCheckBox padCheckBox;
private GCheckBox padCheckBox;
private IntegerTextField minDigitsField;
private JCheckBox showBlocknameCheckbox;
private GCheckBox showBlocknameCheckbox;
private GhidraComboBox<String> justificationCombobox;
public AddressFieldOptionsPropertyEditor() {
@ -76,38 +76,38 @@ public class AddressFieldOptionsPropertyEditor extends PropertyEditorSupport
// we want to have a panel with our options so that we may group them together
JPanel panel = new JPanel(new PairLayout(6, 10));
JLabel label = new GDLabel(SHOW_BLOCK_NAME_LABEL, SwingConstants.RIGHT);
ToolTipManager.setToolTipText(label, SHOW_BLOCKNAME_TOOLTIP);
GDLabel label = new GDLabel(SHOW_BLOCK_NAME_LABEL, SwingConstants.RIGHT);
label.setToolTipText(SHOW_BLOCKNAME_TOOLTIP);
panel.add(label);
showBlocknameCheckbox = new GCheckBox();
ToolTipManager.setToolTipText(showBlocknameCheckbox, SHOW_BLOCKNAME_TOOLTIP);
showBlocknameCheckbox.setToolTipText(SHOW_BLOCKNAME_TOOLTIP);
panel.add(showBlocknameCheckbox);
// the namespace checkbox will disable the text field options when it is not used
label = new GDLabel(PADDING_LABEL, SwingConstants.RIGHT);
ToolTipManager.setToolTipText(label, ADDRESS_PADDING_TOOLTIP);
label.setToolTipText(ADDRESS_PADDING_TOOLTIP);
panel.add(label);
padCheckBox = new GCheckBox();
panel.add(padCheckBox);
padCheckBox.setSelected(false);
ToolTipManager.setToolTipText(padCheckBox, ADDRESS_PADDING_TOOLTIP);
padCheckBox.setToolTipText(ADDRESS_PADDING_TOOLTIP);
label = new GDLabel(ADDRESS_DIGITS_LABEL, SwingConstants.RIGHT);
ToolTipManager.setToolTipText(label, MIN_HEX_DIGITS_TOOLTIP);
label.setToolTipText(MIN_HEX_DIGITS_TOOLTIP);
panel.add(label);
minDigitsField = new IntegerTextField(2);
minDigitsField.setAllowNegativeValues(false);
minDigitsField.setDecimalMode();
minDigitsField.setMaxValue(BigInteger.valueOf(32));
ToolTipManager.setToolTipText(minDigitsField.getComponent(), MIN_HEX_DIGITS_TOOLTIP);
minDigitsField.getComponent().setToolTipText(MIN_HEX_DIGITS_TOOLTIP);
panel.add(minDigitsField.getComponent());
label = new GDLabel(JUSTIFICATION_LABEL, SwingConstants.RIGHT);
ToolTipManager.setToolTipText(label, RIGHT_JUSTIFY_TOOLTIP);
label.setToolTipText(RIGHT_JUSTIFY_TOOLTIP);
panel.add(label);
justificationCombobox = new GhidraComboBox<>(new String[] { "Left", "Right" });
ToolTipManager.setToolTipText(justificationCombobox, RIGHT_JUSTIFY_TOOLTIP);
justificationCombobox.setToolTipText(RIGHT_JUSTIFY_TOOLTIP);
panel.add(justificationCombobox);
showBlocknameCheckbox.addItemListener(evt -> firePropertyChange());

View file

@ -26,7 +26,6 @@ import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.ToolTipManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import docking.widgets.textfield.IntegerTextField;
@ -69,13 +68,13 @@ public class ArrayElementPropertyEditor extends PropertyEditorSupport
// the namespace checkbox will disable the text field options when it is not used
groupElementsCheckBox = new GCheckBox(SHOW_MULTI_ELEMENTS_LABEL);
groupElementsCheckBox.setSelected(true);
ToolTipManager.setToolTipText(groupElementsCheckBox, SHOW_MULTI_ELEMENTS_TOOLTIP);
groupElementsCheckBox.setToolTipText(SHOW_MULTI_ELEMENTS_TOOLTIP);
panel.add(groupElementsCheckBox);
elementsPerLineField =
createLocalPrefixTextField(GROUP_SIZE_LABEL, GROUP_SIZE_LABEL_TOOLTIP, panel);
ToolTipManager.setToolTipText(elementsLabel, GROUP_SIZE_LABEL_TOOLTIP);
elementsLabel.setToolTipText(GROUP_SIZE_LABEL_TOOLTIP);
groupElementsCheckBox.addItemListener(new ItemListener() {
@Override

View file

@ -24,7 +24,6 @@ import javax.swing.border.TitledBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import docking.ToolTipManager;
import docking.widgets.checkbox.GCheckBox;
import ghidra.framework.options.CustomOptionsEditor;
import ghidra.util.HTMLUtilities;
@ -76,15 +75,15 @@ public class NamespacePropertyEditor extends PropertyEditorSupport implements Cu
// the namespace checkbox will disable the text field options when it is not used
showNonLocalCheckBox = new GCheckBox(DISPLAY_NON_LOCAL_NAMESPACE_LABEL);
showNonLocalCheckBox.setSelected(false);
ToolTipManager.setToolTipText(showNonLocalCheckBox, SHOW_NON_LOCAL_NAMESPACE_TOOLTIP);
showNonLocalCheckBox.setToolTipText(SHOW_NON_LOCAL_NAMESPACE_TOOLTIP);
showLocalCheckBox = new GCheckBox(DISPLAY_LOCAL_NAMESPACE_LABEL);
showLocalCheckBox.setSelected(false);
ToolTipManager.setToolTipText(showLocalCheckBox, SHOW_LOCAL_NAMESPACE_TOOLTIP);
showLocalCheckBox.setToolTipText(SHOW_LOCAL_NAMESPACE_TOOLTIP);
showLibraryInNamespaceCheckBox = new GCheckBox(DISPLAY_LIBRARY_IN_NAMESPACE_LABEL);
showLibraryInNamespaceCheckBox.setSelected(true);
ToolTipManager.setToolTipText(showLocalCheckBox, SHOW_LIBRARY_IN_NAMESPACE_TOOLTIP);
showLocalCheckBox.setToolTipText(SHOW_LIBRARY_IN_NAMESPACE_TOOLTIP);
panel.add(showNonLocalCheckBox);
panel.add(showLocalCheckBox);
@ -118,7 +117,7 @@ public class NamespacePropertyEditor extends PropertyEditorSupport implements Cu
textFieldPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
useLocalPrefixCheckBox = new GCheckBox("Use Local Namespace Override");
ToolTipManager.setToolTipText(useLocalPrefixCheckBox, tooltipText);
useLocalPrefixCheckBox.setToolTipText(tooltipText);
useLocalPrefixCheckBox.addItemListener(e -> {
textField.setEnabled(useLocalPrefixCheckBox.isSelected());
firePropertyChange();

View file

@ -27,7 +27,6 @@ import javax.swing.border.BevelBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import docking.ToolTipManager;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel;
import ghidra.framework.options.CustomOptionsEditor;
@ -206,15 +205,15 @@ public class ManualViewerCommandEditor extends PropertyEditorSupport
workPanel.setLayout(new PairLayout());
JLabel commandLabel = new GDLabel(COMMAND_STRING_LABEL);
ToolTipManager.setToolTipText(commandLabel, COMMAND_STRING_DESCRIPTION);
commandLabel.setToolTipText(COMMAND_STRING_DESCRIPTION);
commandField = new JTextField(30);
JLabel argumentsLabel = new GDLabel(COMMAND_ARGUMENTS_LABEL);
ToolTipManager.setToolTipText(argumentsLabel, COMMAND_ARGUMENTS_DESCRIPTION);
argumentsLabel.setToolTipText(COMMAND_ARGUMENTS_DESCRIPTION);
argumentsField = new JTextField(20);
JLabel formatLabel = new GDLabel(FILE_FORMAT_LABEL);
ToolTipManager.setToolTipText(formatLabel, FILE_FORMAT_DESCRIPTION);
formatLabel.setToolTipText(FILE_FORMAT_DESCRIPTION);
fileFormatComboBox = new GComboBox<>();
fileFormatComboBox.addItem(
ManualViewerCommandWrappedOption.HTTP_URL_REPLACEMENT_STRING);