GT-2698 refactor JLabel -> GLabel, JComboBox -> GComboBox, renderers.

This commit is contained in:
dev747368 2019-04-15 15:29:00 -04:00
parent e0c25b0590
commit 6448f0da8f
280 changed files with 2277 additions and 1531 deletions

View File

@ -28,12 +28,15 @@ import javax.swing.event.DocumentListener;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import docking.*; import docking.ActionContext;
import docking.ComponentProvider;
import docking.action.ToggleDockingAction; import docking.action.ToggleDockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.menu.ActionState; import docking.menu.ActionState;
import docking.menu.MultiStateDockingAction; import docking.menu.MultiStateDockingAction;
import docking.widgets.*; import docking.widgets.*;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.examples.graph.layout.SampleGraphPluginDependencyLayoutProvider; import ghidra.examples.graph.layout.SampleGraphPluginDependencyLayoutProvider;
import ghidra.framework.plugintool.*; import ghidra.framework.plugintool.*;
import ghidra.graph.job.FilterVerticesJob; import ghidra.graph.job.FilterVerticesJob;
@ -145,7 +148,7 @@ public class SampleGraphProvider extends ComponentProviderAdapter {
JPanel panel = new JPanel(); JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.LINE_AXIS)); panel.setLayout(new BoxLayout(panel, BoxLayout.LINE_AXIS));
JLabel label = DockingUtils.createNonHtmlLabel("Vertex Filter: "); JLabel label = new GDLabel("Vertex Filter: ");
label.setToolTipText( label.setToolTipText(
"Vertices with names matching the filter will remain, along with connected vertices"); "Vertices with names matching the filter will remain, along with connected vertices");
panel.add(label); panel.add(label);
@ -197,7 +200,7 @@ public class SampleGraphProvider extends ComponentProviderAdapter {
fadedButton.setSelected(true); fadedButton.setSelected(true);
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel.add(DockingUtils.createNonHtmlLabel("Filtered Display: ")); panel.add(new GLabel("Filtered Display: "));
panel.add(fadedButton); panel.add(fadedButton);
panel.add(removedButton); panel.add(removedButton);
return panel; return panel;

View File

@ -23,7 +23,7 @@ import java.awt.event.ActionListener;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
public class SearchGuiSingle extends SearchBaseExtended { public class SearchGuiSingle extends SearchBaseExtended {
@ -50,7 +50,7 @@ public class SearchGuiSingle extends SearchBaseExtended {
opTwoCheckBox = new JCheckBox("Operand 2", false); opTwoCheckBox = new JCheckBox("Operand 2", false);
constCheckBox = new JCheckBox("Constants", false); constCheckBox = new JCheckBox("Constants", false);
searchButton = new JButton(); searchButton = new JButton();
jLabel1 = DockingUtils.createNonHtmlLabel(); jLabel1 = new GDLabel();
GroupLayout jPanel1Layout = new GroupLayout(jPanel1); GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout); jPanel1.setLayout(jPanel1Layout);

View File

@ -20,9 +20,11 @@ import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.ActionContext;
import docking.WindowPosition;
import docking.options.editor.ButtonPanelFactory; import docking.options.editor.ButtonPanelFactory;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.label.*;
import ghidra.app.context.ListingActionContext; import ghidra.app.context.ListingActionContext;
import ghidra.app.merge.tool.ListingMergePanel; import ghidra.app.merge.tool.ListingMergePanel;
import ghidra.app.nav.Navigatable; import ghidra.app.nav.Navigatable;
@ -205,13 +207,12 @@ class MergeManagerProvider extends ComponentProviderAdapter {
mainPanel.setLayout(new BorderLayout(0, 10)); mainPanel.setLayout(new BorderLayout(0, 10));
mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
nameLabel = DockingUtils.createNonHtmlLabel("Merge Programs", SwingConstants.LEFT); nameLabel = new GDLabel("Merge Programs", SwingConstants.LEFT);
JPanel iconPanel = new JPanel(); JPanel iconPanel = new JPanel();
new BoxLayout(iconPanel, BoxLayout.X_AXIS); new BoxLayout(iconPanel, BoxLayout.X_AXIS);
JLabel iconLabel = DockingUtils.createNonHtmlLabel(MERGE_ICON);
iconPanel.add(Box.createHorizontalStrut(5)); iconPanel.add(Box.createHorizontalStrut(5));
iconPanel.add(iconLabel); iconPanel.add(new GIconLabel(MERGE_ICON));
iconPanel.add(Box.createHorizontalStrut(5)); iconPanel.add(Box.createHorizontalStrut(5));
iconPanel.add(nameLabel); iconPanel.add(nameLabel);
@ -262,7 +263,7 @@ class MergeManagerProvider extends ComponentProviderAdapter {
phasePanel = new PhaseProgressPanel("Progress In Current Phase"); phasePanel = new PhaseProgressPanel("Progress In Current Phase");
defaultPanel.add(progressPanel); // panel with each phase and their status indicators. defaultPanel.add(progressPanel); // panel with each phase and their status indicators.
defaultPanel.add(DockingUtils.createNonHtmlLabel(" ")); // Blank separator label. defaultPanel.add(new GLabel(" ")); // Blank separator label.
defaultPanel.add(phasePanel); // panel for the current phase's progress and message. defaultPanel.add(phasePanel); // panel for the current phase's progress and message.
conflictPanel.add(defaultPanel, DEFAULT_ID); conflictPanel.add(defaultPanel, DEFAULT_ID);
conflictPanel.setPreferredSize(new Dimension(610, 500)); conflictPanel.setPreferredSize(new Dimension(610, 500));

View File

@ -22,7 +22,8 @@ import java.util.HashMap;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import docking.DockingUtils; import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
import ghidra.util.Msg; import ghidra.util.Msg;
import ghidra.util.layout.VerticalLayout; import ghidra.util.layout.VerticalLayout;
import resources.ResourceManager; import resources.ResourceManager;
@ -57,18 +58,18 @@ public class MergeProgressPanel extends JPanel {
BoxLayout bl = new BoxLayout(phasesTitlePanel, BoxLayout.X_AXIS); BoxLayout bl = new BoxLayout(phasesTitlePanel, BoxLayout.X_AXIS);
phasesTitlePanel.setLayout(bl); phasesTitlePanel.setLayout(bl);
phasesTitlePanel.add(Box.createHorizontalStrut(5)); phasesTitlePanel.add(Box.createHorizontalStrut(5));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel("Merge Status")); phasesTitlePanel.add(new GLabel("Merge Status"));
phasesTitlePanel.add(Box.createHorizontalStrut(15)); phasesTitlePanel.add(Box.createHorizontalStrut(15));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel("( ")); phasesTitlePanel.add(new GLabel("( "));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(DEFINED_ICON)); phasesTitlePanel.add(new GIconLabel(DEFINED_ICON));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(" = Pending")); phasesTitlePanel.add(new GLabel(" = Pending"));
phasesTitlePanel.add(Box.createHorizontalStrut(10)); phasesTitlePanel.add(Box.createHorizontalStrut(10));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(IN_PROGRESS_ICON)); phasesTitlePanel.add(new GIconLabel(IN_PROGRESS_ICON));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(" = In Progress")); phasesTitlePanel.add(new GLabel(" = In Progress"));
phasesTitlePanel.add(Box.createHorizontalStrut(10)); phasesTitlePanel.add(Box.createHorizontalStrut(10));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(COMPLETED_ICON)); phasesTitlePanel.add(new GIconLabel(COMPLETED_ICON));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(" = Completed")); phasesTitlePanel.add(new GLabel(" = Completed"));
phasesTitlePanel.add(DockingUtils.createNonHtmlLabel(" )")); phasesTitlePanel.add(new GLabel(" )"));
phasesTitlePanel.add(Box.createHorizontalStrut(5)); phasesTitlePanel.add(Box.createHorizontalStrut(5));
return phasesTitlePanel; return phasesTitlePanel;
} }
@ -84,8 +85,7 @@ public class MergeProgressPanel extends JPanel {
*/ */
public JPanel addInfo(String[] phase) { public JPanel addInfo(String[] phase) {
int phaseDepth = phase.length - 1; int phaseDepth = phase.length - 1;
JLabel imageLabel = DockingUtils.createNonHtmlLabel(DEFINED_ICON); JLabel imageLabel = new GIconLabel(DEFINED_ICON);
JLabel infoLabel = DockingUtils.createNonHtmlLabel(phase[phaseDepth]);
JPanel labelPanel = new JPanel(); JPanel labelPanel = new JPanel();
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS); BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS);
@ -94,7 +94,7 @@ public class MergeProgressPanel extends JPanel {
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(imageLabel); labelPanel.add(imageLabel);
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(infoLabel); labelPanel.add(new GLabel(phase[phaseDepth]));
imageMap.put(getPhaseString(phase), imageLabel); imageMap.put(getPhaseString(phase), imageLabel);
add(labelPanel); add(labelPanel);
return labelPanel; return labelPanel;

View File

@ -22,7 +22,8 @@ import java.awt.event.ActionListener;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import resources.ResourceManager; import resources.ResourceManager;
/** /**
@ -80,7 +81,7 @@ public class PhaseProgressPanel extends JPanel {
private void createProgressPanel() { private void createProgressPanel() {
titleLabel = DockingUtils.createNonHtmlLabel(title); titleLabel = new GDLabel(title);
add(titleLabel); add(titleLabel);
progressLayout.putConstraint(SpringLayout.WEST, titleLabel, 5, SpringLayout.WEST, this); progressLayout.putConstraint(SpringLayout.WEST, titleLabel, 5, SpringLayout.WEST, this);
progressLayout.putConstraint(SpringLayout.NORTH, titleLabel, 5, SpringLayout.NORTH, this); progressLayout.putConstraint(SpringLayout.NORTH, titleLabel, 5, SpringLayout.NORTH, this);
@ -96,9 +97,9 @@ public class PhaseProgressPanel extends JPanel {
doSetProgress(0); doSetProgress(0);
progressMessagePanel = new JPanel(new BorderLayout()); progressMessagePanel = new JPanel(new BorderLayout());
messageIcon = DockingUtils.createNonHtmlLabel(INFORM_ICON); messageIcon = new GIconLabel(INFORM_ICON);
messageIcon.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); messageIcon.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
messageLabel = DockingUtils.createNonHtmlLabel(DEFAULT_INFO); messageLabel = new GDLabel(DEFAULT_INFO);
progressMessagePanel.add(messageIcon, BorderLayout.WEST); progressMessagePanel.add(messageIcon, BorderLayout.WEST);
progressMessagePanel.add(messageLabel, BorderLayout.CENTER); progressMessagePanel.add(messageLabel, BorderLayout.CENTER);
doSetMessage(DEFAULT_INFO); doSetMessage(DEFAULT_INFO);

View File

@ -22,7 +22,8 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.merge.MergeConstants; import ghidra.app.merge.MergeConstants;
/** /**
@ -85,14 +86,13 @@ class CategoryConflictPanel extends JPanel {
panel.setLayout(new BorderLayout()); panel.setLayout(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JLabel clabel = DockingUtils.createNonHtmlLabel("Category: "); categoryLabel = new GDLabel("CategoryName");
categoryLabel = DockingUtils.createNonHtmlLabel("CategoryName");
categoryLabel.setForeground(MergeConstants.CONFLICT_COLOR); categoryLabel.setForeground(MergeConstants.CONFLICT_COLOR);
JPanel labelPanel = new JPanel(); JPanel labelPanel = new JPanel();
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS)); labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS));
labelPanel.add(clabel); labelPanel.add(new GLabel("Category: "));
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(categoryLabel); labelPanel.add(categoryLabel);

View File

@ -22,8 +22,8 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils;
import docking.widgets.MultiLineLabel; import docking.widgets.MultiLineLabel;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants; import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel; import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.framework.data.DomainObjectMergeManager; import ghidra.framework.data.DomainObjectMergeManager;
@ -179,7 +179,7 @@ class DataTypeMergePanel extends JPanel {
private JPanel createInfoPanel() { private JPanel createInfoPanel() {
Icon icon = ResourceManager.loadImage("images/information.png"); Icon icon = ResourceManager.loadImage("images/information.png");
JLabel imageLabel = DockingUtils.createNonHtmlLabel(icon); JLabel imageLabel = new GIconLabel(icon);
MultiLineLabel label = MultiLineLabel label =
new MultiLineLabel("A data type change in your checked out version conflicts with a " + new MultiLineLabel("A data type change in your checked out version conflicts with a " +

View File

@ -22,8 +22,8 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils;
import docking.widgets.MultiLineLabel; import docking.widgets.MultiLineLabel;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants; import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel; import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.app.plugin.core.datamgr.archive.SourceArchive; import ghidra.app.plugin.core.datamgr.archive.SourceArchive;
@ -174,7 +174,7 @@ class SourceArchiveMergePanel extends JPanel {
private JPanel createInfoPanel() { private JPanel createInfoPanel() {
Icon icon = ResourceManager.loadImage("images/information.png"); Icon icon = ResourceManager.loadImage("images/information.png");
JLabel imageLabel = DockingUtils.createNonHtmlLabel(icon); JLabel imageLabel = new GIconLabel(icon);
MultiLineLabel label = new MultiLineLabel( MultiLineLabel label = new MultiLineLabel(
"A source archive change in your checked out version conflicts with a " + "A source archive change in your checked out version conflicts with a " +

View File

@ -20,7 +20,7 @@ import java.awt.BorderLayout;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import docking.DockingUtils; import docking.widgets.label.GDHtmlLabel;
import ghidra.app.merge.util.ConflictUtility; import ghidra.app.merge.util.ConflictUtility;
import ghidra.program.model.address.*; import ghidra.program.model.address.*;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
@ -60,8 +60,8 @@ public class ConflictInfoPanel extends JPanel {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
setBorder(BorderFactory.createTitledBorder("Resolve Current Conflict")); setBorder(BorderFactory.createTitledBorder("Resolve Current Conflict"));
westLabel = DockingUtils.createHtmlLabel("<html></html>"); westLabel = new GDHtmlLabel("<html></html>");
eastLabel = DockingUtils.createHtmlLabel("<html></html>"); eastLabel = new GDHtmlLabel("<html></html>");
add(westLabel, BorderLayout.WEST); add(westLabel, BorderLayout.WEST);
add(eastLabel, BorderLayout.EAST); add(eastLabel, BorderLayout.EAST);
} }

View File

@ -21,10 +21,10 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils;
import docking.widgets.EmptyBorderButton; import docking.widgets.EmptyBorderButton;
import docking.widgets.fieldpanel.FieldPanel; import docking.widgets.fieldpanel.FieldPanel;
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator; import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants; import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.MergeManager; import ghidra.app.merge.MergeManager;
import ghidra.app.merge.util.ConflictCountPanel; import ghidra.app.merge.util.ConflictCountPanel;
@ -254,7 +254,7 @@ class ExternalAddConflictPanel extends JPanel implements CodeFormatService {
myTitlePanel = new TitledPanel(MergeConstants.MY_TITLE, myPanel, 5); myTitlePanel = new TitledPanel(MergeConstants.MY_TITLE, myPanel, 5);
latestTitlePanel.addTitleComponent(new ShowHeaderButton()); latestTitlePanel.addTitleComponent(new ShowHeaderButton());
myTitlePanel.addTitleComponent(DockingUtils.createNonHtmlLabel(new EmptyIcon(22, 22))); myTitlePanel.addTitleComponent(new GIconLabel(new EmptyIcon(22, 22)));
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
splitPane.setResizeWeight(0.5); splitPane.setResizeWeight(0.5);

View File

@ -20,7 +20,7 @@ import java.awt.BorderLayout;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import docking.DockingUtils; import docking.widgets.label.GDHtmlLabel;
import ghidra.app.merge.util.ConflictUtility; import ghidra.app.merge.util.ConflictUtility;
/** /**
@ -54,8 +54,8 @@ public class ExternalConflictInfoPanel extends JPanel {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
setBorder(BorderFactory.createTitledBorder("Resolve External Location Conflict")); setBorder(BorderFactory.createTitledBorder("Resolve External Location Conflict"));
westLabel = DockingUtils.createHtmlLabel("<html></html>"); westLabel = new GDHtmlLabel("<html></html>");
eastLabel = DockingUtils.createHtmlLabel("<html></html>"); eastLabel = new GDHtmlLabel("<html></html>");
add(westLabel, BorderLayout.WEST); add(westLabel, BorderLayout.WEST);
add(eastLabel, BorderLayout.EAST); add(eastLabel, BorderLayout.EAST);
} }

View File

@ -25,7 +25,7 @@ import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import javax.swing.table.TableModel; import javax.swing.table.TableModel;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.table.AbstractSortedTableModel; import docking.widgets.table.AbstractSortedTableModel;
import docking.widgets.table.GTable; import docking.widgets.table.GTable;
import ghidra.app.merge.util.ConflictUtility; import ghidra.app.merge.util.ConflictUtility;
@ -70,7 +70,7 @@ public class ScrollingListChoicesPanel extends ConflictPanel {
gbl = new GridBagLayout(); gbl = new GridBagLayout();
rowPanel = new JPanel(gbl); rowPanel = new JPanel(gbl);
setLayout(new BorderLayout()); setLayout(new BorderLayout());
headerLabel = DockingUtils.createNonHtmlLabel(" "); headerLabel = new GDLabel(" ");
headerLabel.setHorizontalAlignment(SwingConstants.CENTER); headerLabel.setHorizontalAlignment(SwingConstants.CENTER);
add(headerLabel, BorderLayout.NORTH); add(headerLabel, BorderLayout.NORTH);
setHeader(null); setHeader(null);

View File

@ -25,7 +25,8 @@ import javax.swing.border.Border;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.merge.util.ConflictUtility; import ghidra.app.merge.util.ConflictUtility;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
import ghidra.util.layout.MaximizeSpecificColumnGridLayout; import ghidra.util.layout.MaximizeSpecificColumnGridLayout;
@ -77,7 +78,7 @@ public class VariousChoicesPanel extends ConflictPanel {
rowPanel = new JPanel(layout); rowPanel = new JPanel(layout);
rowPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); rowPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
setLayout(new BorderLayout()); setLayout(new BorderLayout());
headerLabel = DockingUtils.createNonHtmlLabel(" "); headerLabel = new GDLabel(" ");
headerLabel.setHorizontalAlignment(SwingConstants.CENTER); headerLabel.setHorizontalAlignment(SwingConstants.CENTER);
add(headerLabel, BorderLayout.NORTH); add(headerLabel, BorderLayout.NORTH);
setHeader(null); setHeader(null);
@ -500,15 +501,13 @@ public class VariousChoicesPanel extends ConflictPanel {
return rows.size() > 0; return rows.size() > 0;
} }
private class MyLabel extends JLabel { private class MyLabel extends GLabel {
private final static long serialVersionUID = 1;
/** /**
* @param text the text of this label. * @param text the text of this label.
*/ */
public MyLabel(final String text) { public MyLabel(String text) {
super(text); super(text);
DockingUtils.turnOffHTMLRendering(this);
addComponentListener(new ComponentListener() { addComponentListener(new ComponentListener() {
@Override @Override

View File

@ -24,7 +24,8 @@ import javax.swing.border.Border;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.merge.util.ConflictUtility; import ghidra.app.merge.util.ConflictUtility;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
import ghidra.util.datastruct.LongArrayList; import ghidra.util.datastruct.LongArrayList;
@ -89,7 +90,7 @@ public class VerticalChoicesPanel extends ConflictPanel {
setBorder(BorderFactory.createTitledBorder("Resolve Conflict")); setBorder(BorderFactory.createTitledBorder("Resolve Conflict"));
setLayout(new BorderLayout()); setLayout(new BorderLayout());
headerLabel = DockingUtils.createNonHtmlLabel(" "); headerLabel = new GDLabel(" ");
headerLabel.setHorizontalAlignment(SwingConstants.CENTER); headerLabel.setHorizontalAlignment(SwingConstants.CENTER);
add(headerLabel, BorderLayout.NORTH); add(headerLabel, BorderLayout.NORTH);
@ -108,7 +109,7 @@ public class VerticalChoicesPanel extends ConflictPanel {
indent = Math.max(rb.getPreferredSize().width, cb.getPreferredSize().width); indent = Math.max(rb.getPreferredSize().width, cb.getPreferredSize().width);
defaultInsets = new Insets(DEFAULT_TOP, DEFAULT_LEFT, DEFAULT_BOTTOM, DEFAULT_RIGHT); defaultInsets = new Insets(DEFAULT_TOP, DEFAULT_LEFT, DEFAULT_BOTTOM, DEFAULT_RIGHT);
int labelHeight = (int) DockingUtils.createNonHtmlLabel("A").getPreferredSize().getHeight(); int labelHeight = (int) new GDLabel("A").getPreferredSize().getHeight();
double buttonHeight = new MyRadioButton("A", double buttonHeight = new MyRadioButton("A",
ListingMergeConstants.KEEP_LATEST).getPreferredSize().getHeight(); ListingMergeConstants.KEEP_LATEST).getPreferredSize().getHeight();
int borderHeight; int borderHeight;
@ -452,15 +453,13 @@ public class VerticalChoicesPanel extends ConflictPanel {
return allChoicesAreResolved(); return allChoicesAreResolved();
} }
private class MyLabel extends JLabel { private class MyLabel extends GLabel {
private final static long serialVersionUID = 1;
/** /**
* @param text the text of this label. * @param text the text of this label.
*/ */
public MyLabel(final String text) { public MyLabel(final String text) {
super(text); super(text);
DockingUtils.turnOffHTMLRendering(this);
addComponentListener(new ComponentListener() { addComponentListener(new ComponentListener() {
@Override @Override

View File

@ -22,7 +22,7 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import ghidra.app.merge.MergeConstants; import ghidra.app.merge.MergeConstants;
/** /**
@ -133,7 +133,7 @@ class ConflictPanel extends JPanel {
panel.setLayout(new BorderLayout()); panel.setLayout(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
propertyGroupLabel = DockingUtils.createNonHtmlLabel("Property Group: "); propertyGroupLabel = new GDLabel("Property Group: ");
JPanel namePanel = new JPanel(new BorderLayout()); JPanel namePanel = new JPanel(new BorderLayout());
namePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 10, 5)); namePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 10, 5));

View File

@ -22,7 +22,8 @@ import java.awt.event.ItemListener;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants; import ghidra.app.merge.MergeConstants;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import resources.ResourceManager; import resources.ResourceManager;
@ -126,10 +127,9 @@ class NameConflictsPanel extends JPanel {
JPanel iconPanel = new JPanel(); JPanel iconPanel = new JPanel();
iconPanel.setLayout(new BoxLayout(iconPanel, BoxLayout.X_AXIS)); iconPanel.setLayout(new BoxLayout(iconPanel, BoxLayout.X_AXIS));
conflictsLabel = conflictsLabel = new GDLabel("'My' name already exists in Latest Version");
DockingUtils.createNonHtmlLabel("'My' name already exists in Latest Version");
ImageIcon icon = ResourceManager.loadImage("images/information.png"); ImageIcon icon = ResourceManager.loadImage("images/information.png");
iconPanel.add(DockingUtils.createNonHtmlLabel(icon)); iconPanel.add(new GIconLabel(icon));
iconPanel.add(Box.createHorizontalStrut(5)); iconPanel.add(Box.createHorizontalStrut(5));
iconPanel.add(conflictsLabel); iconPanel.add(conflictsLabel);
iconPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); iconPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));

View File

@ -19,7 +19,8 @@ import java.awt.*;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import ghidra.util.layout.PairLayout; import ghidra.util.layout.PairLayout;
import resources.ResourceManager; import resources.ResourceManager;
@ -56,15 +57,13 @@ class TreeChangePanel extends JPanel {
nameLabel.setText(nameChanged ? "Name Changed" : "Name Not Changed"); nameLabel.setText(nameChanged ? "Name Changed" : "Name Not Changed");
nameLabel.setForeground(nameChanged ? CHANGED_COLOR : NO_CHANGE_COLOR); nameLabel.setForeground(nameChanged ? CHANGED_COLOR : NO_CHANGE_COLOR);
namePanel.remove(nameIconLabel); namePanel.remove(nameIconLabel);
nameIconLabel = nameIconLabel = new GIconLabel(nameChanged ? CHANGED_ICON : NO_CHANGE_ICON);
DockingUtils.createNonHtmlLabel(nameChanged ? CHANGED_ICON : NO_CHANGE_ICON);
namePanel.add(nameIconLabel, 0); namePanel.add(nameIconLabel, 0);
structureLabel.setText(structureChanged ? "Structure Changed" : "Structure Not Changed"); structureLabel.setText(structureChanged ? "Structure Changed" : "Structure Not Changed");
structureLabel.setForeground(structureChanged ? CHANGED_COLOR : NO_CHANGE_COLOR); structureLabel.setForeground(structureChanged ? CHANGED_COLOR : NO_CHANGE_COLOR);
structurePanel.remove(structureIconLabel); structurePanel.remove(structureIconLabel);
structureIconLabel = structureIconLabel = new GIconLabel(structureChanged ? CHANGED_ICON : NO_CHANGE_ICON);
DockingUtils.createNonHtmlLabel(structureChanged ? CHANGED_ICON : NO_CHANGE_ICON);
structurePanel.add(structureIconLabel, 0); structurePanel.add(structureIconLabel, 0);
} }
@ -72,16 +71,16 @@ class TreeChangePanel extends JPanel {
JPanel panel = new JPanel(new BorderLayout(0, 5)); JPanel panel = new JPanel(new BorderLayout(0, 5));
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
treeNameLabel = DockingUtils.createNonHtmlLabel("Tree Name"); treeNameLabel = new GDLabel("Tree Name");
Font font = treeNameLabel.getFont(); Font font = treeNameLabel.getFont();
font = new Font(font.getName(), Font.BOLD, font.getSize()); font = new Font(font.getName(), Font.BOLD, font.getSize());
treeNameLabel.setFont(font); treeNameLabel.setFont(font);
nameLabel = DockingUtils.createNonHtmlLabel("Name Changed"); nameLabel = new GDLabel("Name Changed");
nameIconLabel = DockingUtils.createNonHtmlLabel(CHANGED_ICON); nameIconLabel = new GIconLabel(CHANGED_ICON);
structureLabel = DockingUtils.createNonHtmlLabel("Structure Changed"); structureLabel = new GDLabel("Structure Changed");
structureIconLabel = DockingUtils.createNonHtmlLabel(CHANGED_ICON); structureIconLabel = new GIconLabel(CHANGED_ICON);
namePanel = new JPanel(new PairLayout(0, 5)); namePanel = new JPanel(new PairLayout(0, 5));
namePanel.add(nameIconLabel); namePanel.add(nameIconLabel);

View File

@ -30,9 +30,9 @@ import javax.swing.table.*;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import docking.DockingUtils;
import docking.options.editor.GenericOptionsComponent; import docking.options.editor.GenericOptionsComponent;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.label.GLabel;
import docking.widgets.table.*; import docking.widgets.table.*;
import ghidra.app.services.Analyzer; import ghidra.app.services.Analyzer;
import ghidra.framework.options.*; import ghidra.framework.options.*;
@ -522,7 +522,7 @@ class AnalysisPanel extends JPanel implements PropertyChangeListener {
List<Options> optionGroups = analysisOptions.getChildOptions(); List<Options> optionGroups = analysisOptions.getChildOptions();
noOptionsPanel = new JPanel(new VerticalLayout(5)); noOptionsPanel = new JPanel(new VerticalLayout(5));
noOptionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); noOptionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
noOptionsPanel.add(DockingUtils.createNonHtmlLabel("No options available.")); noOptionsPanel.add(new GLabel("No options available."));
for (Options optionsGroup : optionGroups) { for (Options optionsGroup : optionGroups) {
String analyzerName = optionsGroup.getName(); String analyzerName = optionsGroup.getName();

View File

@ -24,8 +24,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import javax.swing.*; import javax.swing.*;
import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.HTMLEditorKit;
import docking.DockingUtils;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.label.GLabel;
import ghidra.GhidraOptions; import ghidra.GhidraOptions;
import ghidra.app.services.ProgramManager; import ghidra.app.services.ProgramManager;
import ghidra.framework.model.DomainObject; import ghidra.framework.model.DomainObject;
@ -508,7 +508,7 @@ class AnalyzeAllOpenProgramsTask extends Task {
editorPane.setName("MESSAGE-COMPONENT"); editorPane.setName("MESSAGE-COMPONENT");
editorPane.setText(message); editorPane.setText(message);
editorPane.setBackground(DockingUtils.createNonHtmlLabel().getBackground()); editorPane.setBackground(new GLabel().getBackground());
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

View File

@ -21,9 +21,9 @@ import java.io.File;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.filechooser.GhidraFileChooser; import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.label.GDLabel;
import ghidra.framework.GenericRunInfo; import ghidra.framework.GenericRunInfo;
import ghidra.framework.model.ProjectLocator; import ghidra.framework.model.ProjectLocator;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -76,7 +76,7 @@ public class ArchiveDialog extends DialogComponentProvider {
GridBagLayout gbl = new GridBagLayout(); GridBagLayout gbl = new GridBagLayout();
JPanel outerPanel = new JPanel(gbl); JPanel outerPanel = new JPanel(gbl);
archiveLabel = DockingUtils.createNonHtmlLabel(" Archive File "); archiveLabel = new GDLabel(" Archive File ");
archiveField = new JTextField(); archiveField = new JTextField();
archiveField.setName("archiveField"); archiveField.setName("archiveField");
archiveField.setColumns(NUM_TEXT_COLUMNS); archiveField.setColumns(NUM_TEXT_COLUMNS);

View File

@ -23,8 +23,8 @@ import java.io.File;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.filechooser.GhidraFileChooser; import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.label.GDLabel;
import ghidra.framework.GenericRunInfo; import ghidra.framework.GenericRunInfo;
import ghidra.framework.model.ProjectLocator; import ghidra.framework.model.ProjectLocator;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
@ -77,7 +77,7 @@ public class RestoreDialog extends DialogComponentProvider {
protected JPanel buildMainPanel() { protected JPanel buildMainPanel() {
// Create the individual components that make up the panel. // Create the individual components that make up the panel.
archiveLabel = DockingUtils.createNonHtmlLabel(" Archive File "); archiveLabel = new GDLabel(" Archive File ");
archiveField = new JTextField(); archiveField = new JTextField();
archiveField.setColumns(NUM_TEXT_COLUMNS); archiveField.setColumns(NUM_TEXT_COLUMNS);
archiveField.setName("archiveField"); archiveField.setName("archiveField");
@ -116,7 +116,7 @@ public class RestoreDialog extends DialogComponentProvider {
Font font = archiveBrowse.getFont(); Font font = archiveBrowse.getFont();
archiveBrowse.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); archiveBrowse.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
restoreLabel = DockingUtils.createNonHtmlLabel(" Restore Directory "); restoreLabel = new GDLabel(" Restore Directory ");
restoreField = new JTextField(); restoreField = new JTextField();
restoreField.setName("restoreField"); restoreField.setName("restoreField");
restoreField.setColumns(RestoreDialog.NUM_TEXT_COLUMNS); restoreField.setColumns(RestoreDialog.NUM_TEXT_COLUMNS);
@ -133,7 +133,7 @@ public class RestoreDialog extends DialogComponentProvider {
font = restoreBrowse.getFont(); font = restoreBrowse.getFont();
restoreBrowse.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); restoreBrowse.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
projectNameLabel = DockingUtils.createNonHtmlLabel(" Project Name "); projectNameLabel = new GDLabel(" Project Name ");
projectNameField = new JTextField(); projectNameField = new JTextField();
projectNameField.setName("projectNameField"); projectNameField.setName("projectNameField");
projectNameField.setColumns(RestoreDialog.NUM_TEXT_COLUMNS); projectNameField.setColumns(RestoreDialog.NUM_TEXT_COLUMNS);

View File

@ -23,9 +23,9 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.swing.*; import javax.swing.*;
import javax.swing.text.BadLocationException; import javax.swing.text.BadLocationException;
import docking.DockingUtils;
import docking.EmptyBorderToggleButton; import docking.EmptyBorderToggleButton;
import docking.widgets.autocomplete.*; import docking.widgets.autocomplete.*;
import docking.widgets.label.GDLabel;
import docking.widgets.textfield.TextFieldLinker; import docking.widgets.textfield.TextFieldLinker;
import ghidra.GhidraApplicationLayout; import ghidra.GhidraApplicationLayout;
import ghidra.GhidraLaunchable; import ghidra.GhidraLaunchable;
@ -706,7 +706,7 @@ public class AssemblyDualTextField {
Box hbox = Box.createHorizontalBox(); Box hbox = Box.createHorizontalBox();
dialog.add(hbox, BorderLayout.NORTH); dialog.add(hbox, BorderLayout.NORTH);
JLabel addrlabel = DockingUtils.createNonHtmlLabel(String.format(ADDR_FORMAT, curAddr)); JLabel addrlabel = new GDLabel(String.format(ADDR_FORMAT, curAddr));
hbox.add(addrlabel); hbox.add(addrlabel);
AssemblyDualTextField input = new AssemblyDualTextField(); AssemblyDualTextField input = new AssemblyDualTextField();

View File

@ -30,6 +30,8 @@ import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
import ghidra.program.model.listing.*; import ghidra.program.model.listing.*;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
@ -120,7 +122,6 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
ranges = plugin.getProgramSelection().getNumAddressRanges(); ranges = plugin.getProgramSelection().getNumAddressRanges();
} }
JLabel locationLabel = DockingUtils.createNonHtmlLabel("Address: ", SwingConstants.RIGHT);
locationTextField = new JTextField(50); locationTextField = new JTextField(50);
locationTextField.setText(address.toString()); locationTextField.setText(address.toString());
if (hasSelection && ranges > 1) { if (hasSelection && ranges > 1) {
@ -132,7 +133,6 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
locationTextField.setMinimumSize(locationTextField.getPreferredSize()); locationTextField.setMinimumSize(locationTextField.getPreferredSize());
locationTextField.addKeyListener(listener); locationTextField.addKeyListener(listener);
JLabel categoryLabel = DockingUtils.createNonHtmlLabel("Category: ", SwingConstants.RIGHT);
categoryComboBox = new GhidraComboBox<>(getModel()); categoryComboBox = new GhidraComboBox<>(getModel());
categoryComboBox.setEditable(true); categoryComboBox.setEditable(true);
categoryComboBox.addKeyListener(listener); categoryComboBox.addKeyListener(listener);
@ -140,8 +140,6 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
categoryTextField = (JTextField) categoryComboBox.getEditor().getEditorComponent(); categoryTextField = (JTextField) categoryComboBox.getEditor().getEditorComponent();
categoryTextField.addKeyListener(listener); categoryTextField.addKeyListener(listener);
JLabel commentLabel =
DockingUtils.createNonHtmlLabel("Description: ", SwingConstants.RIGHT);
commentTextField = new JTextField(20); commentTextField = new JTextField(20);
commentTextField.addKeyListener(listener); commentTextField.addKeyListener(listener);
@ -161,7 +159,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
gbc.weighty = 0; gbc.weighty = 0;
gbc.fill = GridBagConstraints.NONE; gbc.fill = GridBagConstraints.NONE;
gbc.anchor = GridBagConstraints.EAST; gbc.anchor = GridBagConstraints.EAST;
mainPanel.add(categoryLabel, gbc); mainPanel.add(new GLabel("Category: ", SwingConstants.RIGHT), gbc);
gbc.gridx = 2; gbc.gridx = 2;
gbc.gridy = 1; gbc.gridy = 1;
@ -177,7 +175,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
gbc.weighty = 0; gbc.weighty = 0;
gbc.fill = GridBagConstraints.NONE; gbc.fill = GridBagConstraints.NONE;
gbc.anchor = GridBagConstraints.EAST; gbc.anchor = GridBagConstraints.EAST;
mainPanel.add(locationLabel, gbc); mainPanel.add(new GLabel("Address: ", SwingConstants.RIGHT), gbc);
gbc.gridx = 2; gbc.gridx = 2;
gbc.gridy = 0; gbc.gridy = 0;
@ -193,7 +191,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
gbc.weighty = 0; gbc.weighty = 0;
gbc.fill = GridBagConstraints.NONE; gbc.fill = GridBagConstraints.NONE;
gbc.anchor = GridBagConstraints.EAST; gbc.anchor = GridBagConstraints.EAST;
mainPanel.add(commentLabel, gbc); mainPanel.add(new GLabel("Description: ", SwingConstants.RIGHT), gbc);
gbc.gridx = 2; gbc.gridx = 2;
gbc.gridy = 2; gbc.gridy = 2;
@ -204,7 +202,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
mainPanel.add(commentTextField, gbc); mainPanel.add(commentTextField, gbc);
ImageIcon icon = BookmarkNavigator.NOTE_ICON; ImageIcon icon = BookmarkNavigator.NOTE_ICON;
JLabel imageLabel = DockingUtils.createNonHtmlLabel(icon); JLabel imageLabel = new GIconLabel(icon);
imageLabel.setPreferredSize( imageLabel.setPreferredSize(
new Dimension(icon.getIconWidth() + 20, icon.getIconHeight() + 20)); new Dimension(icon.getIconWidth() + 20, icon.getIconHeight() + 20));

View File

@ -22,7 +22,7 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.program.model.listing.*; import ghidra.program.model.listing.*;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
@ -60,8 +60,8 @@ class FilterDialog extends DialogComponentProvider {
JPanel p = new JPanel(new BorderLayout()); JPanel p = new JPanel(new BorderLayout());
p.add(buttons[i], BorderLayout.WEST); p.add(buttons[i], BorderLayout.WEST);
buttons[i].setSelected(provider.isShowingType(types[i].getTypeString())); buttons[i].setSelected(provider.isShowingType(types[i].getTypeString()));
JLabel l = DockingUtils.createNonHtmlLabel(types[i].getTypeString(), types[i].getIcon(), JLabel l =
SwingConstants.LEFT); new GLabel(types[i].getTypeString(), types[i].getIcon(), SwingConstants.LEFT);
p.add(l, BorderLayout.CENTER); p.add(l, BorderLayout.CENTER);
panel.add(p); panel.add(p);
} }

View File

@ -24,10 +24,12 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import docking.*; import docking.ActionContext;
import docking.WindowPosition;
import docking.action.*; import docking.action.*;
import docking.util.GraphicsUtils; import docking.util.GraphicsUtils;
import docking.widgets.dialogs.NumberInputDialog; import docking.widgets.dialogs.NumberInputDialog;
import docking.widgets.label.GLabel;
import docking.widgets.tree.*; import docking.widgets.tree.*;
import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin; import docking.widgets.tree.support.GTreeSelectionEvent.EventOrigin;
import docking.widgets.tree.support.GTreeSelectionListener; import docking.widgets.tree.support.GTreeSelectionListener;
@ -791,8 +793,7 @@ public class CallTreeProvider extends ComponentProviderAdapter implements Domain
private JPanel createTreePanel(boolean isIncoming, GTree tree) { private JPanel createTreePanel(boolean isIncoming, GTree tree) {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(DockingUtils.createNonHtmlLabel(isIncoming ? "Incoming Calls" : "Outgoing Calls"), panel.add(new GLabel(isIncoming ? "Incoming Calls" : "Outgoing Calls"), BorderLayout.NORTH);
BorderLayout.NORTH);
panel.add(tree, BorderLayout.CENTER); panel.add(tree, BorderLayout.CENTER);
return panel; return panel;

View File

@ -23,8 +23,8 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.ActionContext; import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*; import docking.action.*;
import docking.widgets.label.GDLabel;
import ghidra.app.context.ProgramContextAction; import ghidra.app.context.ProgramContextAction;
import ghidra.framework.plugintool.ComponentProviderAdapter; import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
@ -93,7 +93,7 @@ public class ComputeChecksumsProvider extends ComponentProviderAdapter {
resultsMainPanel.add(tablePanel); resultsMainPanel.add(tablePanel);
main.add(resultsMainPanel, BorderLayout.CENTER); main.add(resultsMainPanel, BorderLayout.CENTER);
errorStatus = DockingUtils.createNonHtmlLabel(" "); errorStatus = new GDLabel(" ");
errorStatus.setName("message"); errorStatus.setName("message");
errorStatus.setHorizontalAlignment(SwingConstants.CENTER); errorStatus.setHorizontalAlignment(SwingConstants.CENTER);
errorStatus.setForeground(Color.RED); errorStatus.setForeground(Color.RED);

View File

@ -24,7 +24,7 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.context.ListingActionContext; import ghidra.app.context.ListingActionContext;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
@ -114,8 +114,7 @@ public class ClearDialog extends DialogComponentProvider {
panel = new JPanel(); panel = new JPanel();
panel.setLayout(new BorderLayout(10, 10)); panel.setLayout(new BorderLayout(10, 10));
JLabel label = DockingUtils.createNonHtmlLabel("Clear Options:"); panel.add(new GLabel("Clear Options:"), BorderLayout.NORTH);
panel.add(label, BorderLayout.NORTH);
JPanel cbPanel = new JPanel(); JPanel cbPanel = new JPanel();
BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS); BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS);

View File

@ -22,7 +22,7 @@ import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.context.ListingActionContext; import ghidra.app.context.ListingActionContext;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
@ -91,8 +91,7 @@ public class ClearFlowDialog extends DialogComponentProvider {
panel = new JPanel(); panel = new JPanel();
panel.setLayout(new BorderLayout(10, 10)); panel.setLayout(new BorderLayout(10, 10));
JLabel label = DockingUtils.createNonHtmlLabel("Clear Flow Options:"); panel.add(new GLabel("Clear Flow Options:"), BorderLayout.NORTH);
panel.add(label, BorderLayout.NORTH);
JPanel cbPanel = new JPanel(); JPanel cbPanel = new JPanel();
BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS); BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS);

View File

@ -26,7 +26,7 @@ import javax.swing.text.JTextComponent;
import docking.*; import docking.*;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GComboBox;
import ghidra.app.util.viewer.field.AnnotatedStringHandler; import ghidra.app.util.viewer.field.AnnotatedStringHandler;
import ghidra.app.util.viewer.field.Annotation; import ghidra.app.util.viewer.field.Annotation;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -266,7 +266,7 @@ public class CommentsDialog extends DialogComponentProvider implements KeyListen
AnnotationAdapterWrapper[] annotations = getAnnotationAdapterWrappers(); AnnotationAdapterWrapper[] annotations = getAnnotationAdapterWrappers();
Arrays.sort(annotations); Arrays.sort(annotations);
JComboBox<AnnotationAdapterWrapper> annotationsComboBox = new GhidraComboBox<>(annotations); GComboBox<AnnotationAdapterWrapper> annotationsComboBox = new GComboBox<>(annotations);
JButton addAnnotationButton = new JButton("Add Annotation"); JButton addAnnotationButton = new JButton("Add Annotation");
addAnnotationButton.addActionListener(new ActionListener() { addAnnotationButton.addActionListener(new ActionListener() {
@Override @Override

View File

@ -25,9 +25,9 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.text.Document; import javax.swing.text.Document;
import docking.DockingUtils;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.label.GDLabel;
import ghidra.program.model.data.Category; import ghidra.program.model.data.Category;
import ghidra.program.model.data.Composite; import ghidra.program.model.data.Composite;
import ghidra.program.model.data.Composite.AlignmentType; import ghidra.program.model.data.Composite.AlignmentType;
@ -186,7 +186,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
private void setupName() { private void setupName() {
GridBagConstraints gridBagConstraints = new GridBagConstraints(); GridBagConstraints gridBagConstraints = new GridBagConstraints();
nameLabel = DockingUtils.createNonHtmlLabel("Name:"); nameLabel = new GDLabel("Name:");
gridBagConstraints.insets = LEFT_INSETS; gridBagConstraints.insets = LEFT_INSETS;
gridBagConstraints.anchor = GridBagConstraints.LINE_END; gridBagConstraints.anchor = GridBagConstraints.LINE_END;
gridBagConstraints.fill = GridBagConstraints.NONE; gridBagConstraints.fill = GridBagConstraints.NONE;
@ -217,7 +217,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
private void setupDescription() { private void setupDescription() {
GridBagConstraints gridBagConstraints = new GridBagConstraints(); GridBagConstraints gridBagConstraints = new GridBagConstraints();
descriptionLabel = DockingUtils.createNonHtmlLabel("Description:"); descriptionLabel = new GDLabel("Description:");
gridBagConstraints.insets = LEFT_INSETS; gridBagConstraints.insets = LEFT_INSETS;
gridBagConstraints.anchor = GridBagConstraints.LINE_END; gridBagConstraints.anchor = GridBagConstraints.LINE_END;
gridBagConstraints.fill = GridBagConstraints.NONE; gridBagConstraints.fill = GridBagConstraints.NONE;
@ -248,7 +248,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
private void setupCategory() { private void setupCategory() {
GridBagConstraints gridBagConstraints = new GridBagConstraints(); GridBagConstraints gridBagConstraints = new GridBagConstraints();
categoryLabel = DockingUtils.createNonHtmlLabel("Category:"); categoryLabel = new GDLabel("Category:");
gridBagConstraints.insets = LEFT_INSETS; gridBagConstraints.insets = LEFT_INSETS;
gridBagConstraints.anchor = GridBagConstraints.LINE_END; gridBagConstraints.anchor = GridBagConstraints.LINE_END;
gridBagConstraints.fill = GridBagConstraints.NONE; gridBagConstraints.fill = GridBagConstraints.NONE;
@ -487,7 +487,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
"aligning this data type inside another data type." + "</HTML>"; "aligning this data type inside another data type." + "</HTML>";
JPanel actualAlignmentPanel = new JPanel(new BorderLayout()); JPanel actualAlignmentPanel = new JPanel(new BorderLayout());
actualAlignmentLabel = DockingUtils.createNonHtmlLabel("Alignment:"); actualAlignmentLabel = new GDLabel("Alignment:");
gridBagConstraints.insets = new Insets(2, 7, 2, 2); gridBagConstraints.insets = new Insets(2, 7, 2, 2);
gridBagConstraints.anchor = GridBagConstraints.EAST; gridBagConstraints.anchor = GridBagConstraints.EAST;
gridBagConstraints.fill = GridBagConstraints.NONE; gridBagConstraints.fill = GridBagConstraints.NONE;
@ -719,7 +719,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
protected void setupSize() { protected void setupSize() {
GridBagConstraints gridBagConstraints = new GridBagConstraints(); GridBagConstraints gridBagConstraints = new GridBagConstraints();
sizeLabel = DockingUtils.createNonHtmlLabel("Size:"); sizeLabel = new GDLabel("Size:");
ToolTipManager.setToolTipText(sizeLabel, "The current size in bytes."); ToolTipManager.setToolTipText(sizeLabel, "The current size in bytes.");
gridBagConstraints.anchor = GridBagConstraints.LINE_END; gridBagConstraints.anchor = GridBagConstraints.LINE_END;
gridBagConstraints.fill = GridBagConstraints.NONE; gridBagConstraints.fill = GridBagConstraints.NONE;

View File

@ -32,7 +32,6 @@ import javax.swing.event.ChangeEvent;
import javax.swing.table.*; import javax.swing.table.*;
import javax.swing.text.JTextComponent; import javax.swing.text.JTextComponent;
import docking.DockingUtils;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.action.DockingActionIf; import docking.action.DockingActionIf;
import docking.dnd.*; import docking.dnd.*;
@ -43,6 +42,8 @@ import docking.widgets.DropDownSelectionTextField;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.fieldpanel.support.FieldRange; import docking.widgets.fieldpanel.support.FieldRange;
import docking.widgets.fieldpanel.support.FieldSelection; import docking.widgets.fieldpanel.support.FieldSelection;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import docking.widgets.table.GTable; import docking.widgets.table.GTable;
import docking.widgets.table.GTableCellRenderer; import docking.widgets.table.GTableCellRenderer;
import docking.widgets.textfield.GValidatedTextField; import docking.widgets.textfield.GValidatedTextField;
@ -603,7 +604,7 @@ public abstract class CompositeEditorPanel extends JPanel
private JPanel createStatusPanel() { private JPanel createStatusPanel() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
statusLabel = DockingUtils.createNonHtmlLabel(" "); statusLabel = new GDLabel(" ");
statusLabel.setHorizontalAlignment(SwingConstants.CENTER); statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
statusLabel.setForeground(Color.blue); statusLabel.setForeground(Color.blue);
statusLabel.addComponentListener(new ComponentAdapter() { statusLabel.addComponentListener(new ComponentAdapter() {
@ -657,7 +658,7 @@ public abstract class CompositeEditorPanel extends JPanel
JPanel panel = new JPanel(); JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
JLabel label = DockingUtils.createNonHtmlLabel(name + ":", SwingConstants.RIGHT); JLabel label = new GLabel(name + ":", SwingConstants.RIGHT);
label.setPreferredSize(new Dimension(label.getPreferredSize())); label.setPreferredSize(new Dimension(label.getPreferredSize()));
panel.add(label); panel.add(label);
panel.add(Box.createHorizontalStrut(2)); panel.add(Box.createHorizontalStrut(2));

View File

@ -23,8 +23,8 @@ import javax.swing.border.Border;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import docking.DockingUtils;
import docking.widgets.EmptyBorderButton; import docking.widgets.EmptyBorderButton;
import docking.widgets.label.GLabel;
import resources.ResourceManager; import resources.ResourceManager;
public class SearchControlPanel extends JPanel { public class SearchControlPanel extends JPanel {
@ -43,8 +43,7 @@ public class SearchControlPanel extends JPanel {
this.editorPanel = editorPanel; this.editorPanel = editorPanel;
setLayout(new BorderLayout()); setLayout(new BorderLayout());
JLabel label = DockingUtils.createNonHtmlLabel("Search: "); add(new GLabel("Search: "), BorderLayout.WEST);
add(label, BorderLayout.WEST);
textField = new JTextField(20); textField = new JTextField(20);
add(textField, BorderLayout.CENTER); add(textField, BorderLayout.CENTER);
add(buildButtonPanel(), BorderLayout.EAST); add(buildButtonPanel(), BorderLayout.EAST);

View File

@ -27,6 +27,7 @@ import javax.swing.event.TableModelListener;
import javax.swing.table.*; import javax.swing.table.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.widgets.combobox.GComboBox;
import docking.widgets.dialogs.StringChoices; import docking.widgets.dialogs.StringChoices;
import docking.widgets.table.DefaultSortedTableModel; import docking.widgets.table.DefaultSortedTableModel;
import docking.widgets.table.GTable; import docking.widgets.table.GTable;
@ -719,7 +720,7 @@ public class DataSettingsDialog extends DialogComponentProvider {
final static int BOOLEAN = 1; final static int BOOLEAN = 1;
private int mode; private int mode;
private JComboBox<String> comboBox = new JComboBox<>(); private GComboBox<String> comboBox = new GComboBox<>();
SettingsEditor() { SettingsEditor() {
comboBox.addItemListener(new ItemListener() { comboBox.addItemListener(new ItemListener() {

View File

@ -20,7 +20,7 @@ import java.awt.BorderLayout;
import javax.swing.JPanel; import javax.swing.JPanel;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GHtmlLabel;
import ghidra.program.model.data.*; import ghidra.program.model.data.*;
import ghidra.util.HTMLUtilities; import ghidra.util.HTMLUtilities;
@ -52,7 +52,7 @@ public class DataOrganizationDialog extends DialogComponentProvider {
this.dataOrganization = dataOrganization; this.dataOrganization = dataOrganization;
JPanel headerPanel = new JPanel(); JPanel headerPanel = new JPanel();
headerPanel.add(DockingUtils.createHtmlLabel("<HTML>Alignment Information for <b>" + headerPanel.add(new GHtmlLabel("<HTML>Alignment Information for <b>" +
HTMLUtilities.friendlyEncodeHTML(dataTypeManager.getName()) + "</b>.</HTML>")); HTMLUtilities.friendlyEncodeHTML(dataTypeManager.getName()) + "</b>.</HTML>"));
alignPanel = new DataOrganizationPanel(); alignPanel = new DataOrganizationPanel();

View File

@ -21,7 +21,7 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.program.model.data.DataOrganizationImpl; import ghidra.program.model.data.DataOrganizationImpl;
import ghidra.util.layout.PairLayout; import ghidra.util.layout.PairLayout;
@ -62,41 +62,41 @@ public class DataOrganizationPanel extends JPanel {
setUpDoubleSize(); setUpDoubleSize();
setUpLongDoubleSize(); setUpLongDoubleSize();
add(DockingUtils.createNonHtmlLabel("")); add(new GLabel(""));
add(DockingUtils.createNonHtmlLabel("")); add(new GLabel(""));
add(DockingUtils.createNonHtmlLabel("Absolute Max Alignment")); add(new GLabel("Absolute Max Alignment"));
add(absoluteMaxAlignComponent); add(absoluteMaxAlignComponent);
add(DockingUtils.createNonHtmlLabel("Machine Alignment")); add(new GLabel("Machine Alignment"));
add(machineAlignComponent); add(machineAlignComponent);
add(DockingUtils.createNonHtmlLabel("Default Alignment")); add(new GLabel("Default Alignment"));
add(defaultAlignComponent); add(defaultAlignComponent);
add(DockingUtils.createNonHtmlLabel("Default Pointer Alignment")); add(new GLabel("Default Pointer Alignment"));
add(pointerAlignComponent); add(pointerAlignComponent);
add(DockingUtils.createNonHtmlLabel("")); add(new GLabel(""));
add(DockingUtils.createNonHtmlLabel("")); add(new GLabel(""));
add(DockingUtils.createNonHtmlLabel("Signed-Char:")); add(new GLabel("Signed-Char:"));
add(charIsSignedCheckbox); add(charIsSignedCheckbox);
add(DockingUtils.createNonHtmlLabel("Char Size")); add(new GLabel("Char Size"));
add(charSizeComponent); add(charSizeComponent);
add(DockingUtils.createNonHtmlLabel("Wide-Char Size")); add(new GLabel("Wide-Char Size"));
add(wcharSizeComponent); add(wcharSizeComponent);
add(DockingUtils.createNonHtmlLabel("Short Size")); add(new GLabel("Short Size"));
add(shortSizeComponent); add(shortSizeComponent);
add(DockingUtils.createNonHtmlLabel("Integer Size")); add(new GLabel("Integer Size"));
add(integerSizeComponent); add(integerSizeComponent);
add(DockingUtils.createNonHtmlLabel("Long Size")); add(new GLabel("Long Size"));
add(longSizeComponent); add(longSizeComponent);
add(DockingUtils.createNonHtmlLabel("LongLong Size")); add(new GLabel("LongLong Size"));
add(longLongSizeComponent); add(longLongSizeComponent);
add(DockingUtils.createNonHtmlLabel("Float Size")); add(new GLabel("Float Size"));
add(floatSizeComponent); add(floatSizeComponent);
add(DockingUtils.createNonHtmlLabel("Double Size")); add(new GLabel("Double Size"));
add(doubleSizeComponent); add(doubleSizeComponent);
add(DockingUtils.createNonHtmlLabel("LongDouble Size")); add(new GLabel("LongDouble Size"));
add(longDoubleSizeComponent); add(longDoubleSizeComponent);
add(DockingUtils.createNonHtmlLabel("")); add(new GLabel(""));
add(DockingUtils.createNonHtmlLabel("")); add(new GLabel(""));
} }
public void setOrganization(DataOrganizationImpl dataOrganization) { public void setOrganization(DataOrganizationImpl dataOrganization) {

View File

@ -21,7 +21,7 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.label.GDHtmlLabel;
import ghidra.app.util.ToolTipUtils; import ghidra.app.util.ToolTipUtils;
import ghidra.app.util.html.HTMLDataTypeRepresentation; import ghidra.app.util.html.HTMLDataTypeRepresentation;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
@ -60,8 +60,8 @@ class DataTypeComparePanel extends JPanel {
leftPanel = new JPanel(new BorderLayout()); leftPanel = new JPanel(new BorderLayout());
rightPanel = new JPanel(new BorderLayout()); rightPanel = new JPanel(new BorderLayout());
leftPanelLabel = DockingUtils.createHtmlLabel(); leftPanelLabel = new GDHtmlLabel();
rightPanelLabel = DockingUtils.createHtmlLabel(); rightPanelLabel = new GDHtmlLabel();
leftPanelLabel.setBorder(BorderFactory.createEmptyBorder(2, 8, 2, 0)); leftPanelLabel.setBorder(BorderFactory.createEmptyBorder(2, 8, 2, 0));
rightPanelLabel.setBorder(BorderFactory.createEmptyBorder(2, 8, 2, 0)); rightPanelLabel.setBorder(BorderFactory.createEmptyBorder(2, 8, 2, 0));
@ -70,12 +70,12 @@ class DataTypeComparePanel extends JPanel {
add(leftPanel); add(leftPanel);
add(rightPanel); add(rightPanel);
dtLabel1 = DockingUtils.createHtmlLabel(); dtLabel1 = new GDHtmlLabel();
dtLabel1.setOpaque(true); dtLabel1.setOpaque(true);
dtLabel1.setBackground(Color.WHITE); dtLabel1.setBackground(Color.WHITE);
dtLabel1.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 0)); dtLabel1.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 0));
dtLabel1.setVerticalAlignment(SwingConstants.TOP); dtLabel1.setVerticalAlignment(SwingConstants.TOP);
dtLabel2 = DockingUtils.createHtmlLabel(); dtLabel2 = new GDHtmlLabel();
dtLabel2.setOpaque(true); dtLabel2.setOpaque(true);
dtLabel2.setBackground(Color.WHITE); dtLabel2.setBackground(Color.WHITE);
dtLabel2.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 0)); dtLabel2.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 0));

View File

@ -23,7 +23,7 @@ import javax.swing.SwingUtilities;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import docking.DockingUtils; import docking.widgets.label.GDHtmlLabel;
import ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler; import ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler;
import ghidra.app.plugin.core.datamgr.archive.SourceArchive; import ghidra.app.plugin.core.datamgr.archive.SourceArchive;
import ghidra.app.util.ToolTipUtils; import ghidra.app.util.ToolTipUtils;
@ -377,8 +377,8 @@ public class DataTypeSynchronizer {
private static String createHTMLSpacerString(String htmlContent, String otherHTMLContent) { private static String createHTMLSpacerString(String htmlContent, String otherHTMLContent) {
// unfortunately, to get the displayed widths, we have to have rendered content, which // unfortunately, to get the displayed widths, we have to have rendered content, which
// is what the JLabels below are doing for us // is what the JLabels below are doing for us
JLabel label1 = DockingUtils.createHtmlLabel("<HTML>" + htmlContent); JLabel label1 = new GDHtmlLabel("<HTML>" + htmlContent);
JLabel label2 = DockingUtils.createHtmlLabel("<HTML>" + otherHTMLContent); JLabel label2 = new GDHtmlLabel("<HTML>" + otherHTMLContent);
int maxPixelWidth = int maxPixelWidth =
Math.max(label1.getPreferredSize().width, label2.getPreferredSize().width); Math.max(label1.getPreferredSize().width, label2.getPreferredSize().width);

View File

@ -21,8 +21,8 @@ import javax.swing.event.ChangeEvent;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import docking.widgets.list.GListCellRenderer; import docking.widgets.list.GListCellRenderer;
import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin; import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin;
import ghidra.app.plugin.core.datamgr.tree.ArchiveNode; import ghidra.app.plugin.core.datamgr.tree.ArchiveNode;
@ -59,18 +59,18 @@ public class CreateTypeDefDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new PairLayout()); JPanel panel = new JPanel(new PairLayout());
// category info // category info
panel.add(DockingUtils.createNonHtmlLabel("Category:")); panel.add(new GLabel("Category:"));
panel.add(DockingUtils.createNonHtmlLabel(category.getCategoryPath().getPath())); panel.add(new GLabel(category.getCategoryPath().getPath()));
// name info // name info
nameTextField = new JTextField(15); nameTextField = new JTextField(15);
panel.add(DockingUtils.createNonHtmlLabel("Name:")); panel.add(new GLabel("Name:"));
panel.add(nameTextField); panel.add(nameTextField);
// data type info // data type info
dataTypeEditor = dataTypeEditor =
new DataTypeSelectionEditor(plugin.getTool(), Integer.MAX_VALUE, AllowedDataTypes.ALL); new DataTypeSelectionEditor(plugin.getTool(), Integer.MAX_VALUE, AllowedDataTypes.ALL);
panel.add(DockingUtils.createNonHtmlLabel("Data type:")); panel.add(new GLabel("Data type:"));
panel.add(dataTypeEditor.getEditorComponent()); panel.add(dataTypeEditor.getEditorComponent());
dataTypeEditor.addCellEditorListener(new CellEditorListener() { dataTypeEditor.addCellEditorListener(new CellEditorListener() {
@ -90,7 +90,6 @@ public class CreateTypeDefDialog extends DialogComponentProvider {
dataTypeManagerBox = new GhidraComboBox<>(); dataTypeManagerBox = new GhidraComboBox<>();
dataTypeManagerBox.setRenderer( dataTypeManagerBox.setRenderer(
GListCellRenderer.createDefaultCellTextRenderer(dtm -> dtm.getName())); GListCellRenderer.createDefaultCellTextRenderer(dtm -> dtm.getName()));
DockingUtils.turnOffHTMLRendering(dataTypeManagerBox);
DataTypeManager[] dataTypeManagers = plugin.getDataTypeManagers(); DataTypeManager[] dataTypeManagers = plugin.getDataTypeManagers();
for (DataTypeManager manager : dataTypeManagers) { for (DataTypeManager manager : dataTypeManagers) {
@ -115,7 +114,7 @@ public class CreateTypeDefDialog extends DialogComponentProvider {
dataTypeManagerBox.setSelectedItem(itemToSelect); dataTypeManagerBox.setSelectedItem(itemToSelect);
panel.add(DockingUtils.createNonHtmlLabel("Archive:")); panel.add(new GLabel("Archive:"));
panel.add(dataTypeManagerBox); panel.add(dataTypeManagerBox);
panel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); panel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));

View File

@ -21,8 +21,8 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.ComponentProvider; import docking.ComponentProvider;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.compositeeditor.*; import ghidra.app.plugin.core.compositeeditor.*;
import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin; import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin;
import ghidra.app.plugin.core.datamgr.archive.SourceArchive; import ghidra.app.plugin.core.datamgr.archive.SourceArchive;
@ -575,7 +575,7 @@ public class DataTypeEditorManager
} }
setCallingConventionChoices(choices); setCallingConventionChoices(choices);
parentPanel.add(DockingUtils.createNonHtmlLabel("Calling Convention:")); parentPanel.add(new GLabel("Calling Convention:"));
parentPanel.add(callingConventionComboBox); parentPanel.add(callingConventionComboBox);
} }

View File

@ -24,9 +24,10 @@ import javax.swing.event.*;
import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellEditor;
import javax.swing.table.TableModel; import javax.swing.table.TableModel;
import docking.DockingUtils;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import docking.widgets.table.GTableCellRenderer; import docking.widgets.table.GTableCellRenderer;
import docking.widgets.table.GTableTextCellEditor; import docking.widgets.table.GTableTextCellEditor;
import docking.widgets.textfield.GValidatedTextField; import docking.widgets.textfield.GValidatedTextField;
@ -382,7 +383,7 @@ class EnumEditorPanel extends JPanel {
JPanel panel = new JPanel(); JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
JLabel label = DockingUtils.createNonHtmlLabel("Name:", SwingConstants.RIGHT); JLabel label = new GLabel("Name:", SwingConstants.RIGHT);
label.setPreferredSize(new Dimension(descLabel.getPreferredSize())); label.setPreferredSize(new Dimension(descLabel.getPreferredSize()));
panel.add(label); panel.add(label);
panel.add(Box.createHorizontalStrut(2)); panel.add(Box.createHorizontalStrut(2));
@ -398,7 +399,7 @@ class EnumEditorPanel extends JPanel {
JPanel panel = new JPanel(); JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
descLabel = DockingUtils.createNonHtmlLabel("Description:", SwingConstants.RIGHT); descLabel = new GDLabel("Description:", SwingConstants.RIGHT);
panel.add(descLabel); panel.add(descLabel);
panel.add(Box.createHorizontalStrut(2)); panel.add(Box.createHorizontalStrut(2));
@ -431,13 +432,13 @@ class EnumEditorPanel extends JPanel {
} }
}); });
JLabel label = DockingUtils.createNonHtmlLabel("Category:", SwingConstants.RIGHT); JLabel label = new GLabel("Category:", SwingConstants.RIGHT);
label.setPreferredSize(new Dimension(descLabel.getPreferredSize())); label.setPreferredSize(new Dimension(descLabel.getPreferredSize()));
panel.add(label); panel.add(label);
panel.add(Box.createHorizontalStrut(2)); panel.add(Box.createHorizontalStrut(2));
panel.add(categoryField); panel.add(categoryField);
panel.add(Box.createHorizontalStrut(20)); panel.add(Box.createHorizontalStrut(20));
panel.add(DockingUtils.createNonHtmlLabel("Size:")); panel.add(new GLabel("Size:"));
panel.add(Box.createHorizontalStrut(5)); panel.add(Box.createHorizontalStrut(5));
panel.add(sizeComboBox); panel.add(sizeComboBox);

View File

@ -21,7 +21,8 @@ import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import resources.ResourceManager; import resources.ResourceManager;
@ -141,19 +142,14 @@ public class ConflictDialog extends DialogComponentProvider {
} }
private JPanel createLabelPanel(String dtName, String categoryPath) { private JPanel createLabelPanel(String dtName, String categoryPath) {
JLabel imageLabel = DockingUtils.createNonHtmlLabel(INFORM_ICON);
JLabel infoLabel = DockingUtils.createNonHtmlLabel(
"Conflict exists in " + categoryPath + " for " + dtName);
JPanel labelPanel = new JPanel(); JPanel labelPanel = new JPanel();
labelPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 20)); labelPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 20));
BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS); BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS);
labelPanel.setLayout(bl); labelPanel.setLayout(bl);
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(imageLabel); labelPanel.add(new GIconLabel(INFORM_ICON));
labelPanel.add(Box.createHorizontalStrut(5)); labelPanel.add(Box.createHorizontalStrut(5));
labelPanel.add(infoLabel); labelPanel.add(new GLabel("Conflict exists in " + categoryPath + " for " + dtName));
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(labelPanel); panel.add(labelPanel);

View File

@ -24,9 +24,9 @@ import javax.swing.*;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.filter.FilterOptions; import docking.widgets.filter.FilterOptions;
import docking.widgets.filter.TextFilterStrategy; import docking.widgets.filter.TextFilterStrategy;
import docking.widgets.label.GDLabel;
import docking.widgets.tree.*; import docking.widgets.tree.*;
import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin; import ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin;
import ghidra.app.plugin.core.datamgr.tree.DataTypeArchiveGTree; import ghidra.app.plugin.core.datamgr.tree.DataTypeArchiveGTree;
@ -99,7 +99,7 @@ public class DataTypeChooserDialog extends DialogComponentProvider {
private JComponent createWorkPanel() { private JComponent createWorkPanel() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
messageLabel = DockingUtils.createNonHtmlLabel("Choose the data type you wish to use."); messageLabel = new GDLabel("Choose the data type you wish to use.");
messageLabel.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 2)); messageLabel.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 2));
panel.add(messageLabel, BorderLayout.NORTH); panel.add(messageLabel, BorderLayout.NORTH);
panel.add(this.tree, BorderLayout.CENTER); panel.add(this.tree, BorderLayout.CENTER);

View File

@ -490,11 +490,11 @@ public class DataTypeUtils {
// JFrame frame = new JFrame(); // JFrame frame = new JFrame();
// JPanel panel = new JPanel(); // JPanel panel = new JPanel();
// //
// JLabel label1 = DockingUtils.createNonHtmlLabel(); // JLabel label1 = new GDLabel();
// Icon icon = getOpenFolderIcon( false ); // Icon icon = getOpenFolderIcon( false );
// label1.setIcon( icon ); // label1.setIcon( icon );
// //
// JLabel label2 = DockingUtils.createNonHtmlLabel(); // JLabel label2 = new GDLabel();
// Icon icon2 = ResourceManager.getDisabledIcon( (ImageIcon) icon ); // Icon icon2 = ResourceManager.getDisabledIcon( (ImageIcon) icon );
// label2.setIcon( icon2 ); // label2.setIcon( icon2 );
// //

View File

@ -29,6 +29,7 @@ import docking.action.ToolBarData;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.filter.FilterListener; import docking.widgets.filter.FilterListener;
import docking.widgets.filter.FilterTextField; import docking.widgets.filter.FilterTextField;
import docking.widgets.label.GLabel;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.StringUtilities; import ghidra.util.StringUtilities;
@ -317,7 +318,7 @@ class FilterAction extends ToggleDockingAction {
JPanel filterPanel = new JPanel(new BorderLayout()); JPanel filterPanel = new JPanel(new BorderLayout());
filterField = new FilterTextField(checkboxPanel); filterField = new FilterTextField(checkboxPanel);
filterPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); filterPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
filterPanel.add(DockingUtils.createNonHtmlLabel("Filter:"), BorderLayout.WEST); filterPanel.add(new GLabel("Filter:"), BorderLayout.WEST);
filterPanel.add(filterField, BorderLayout.CENTER); filterPanel.add(filterField, BorderLayout.CENTER);
filterField.addFilterListener(filterListener); filterField.addFilterListener(filterListener);

View File

@ -23,9 +23,12 @@ import javax.swing.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import docking.*; import docking.ActionContext;
import docking.DialogComponentProvider;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.action.*; import docking.action.*;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.events.ProgramSelectionPluginEvent; import ghidra.app.events.ProgramSelectionPluginEvent;
import ghidra.app.services.GoToService; import ghidra.app.services.GoToService;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
@ -147,7 +150,7 @@ public class AddressTableDialog extends DialogComponentProvider {
JPanel searchOptionsPanel = new JPanel(new BorderLayout()); JPanel searchOptionsPanel = new JPanel(new BorderLayout());
searchOptionsPanel.setBorder(BorderFactory.createTitledBorder("Search Options")); searchOptionsPanel.setBorder(BorderFactory.createTitledBorder("Search Options"));
JLabel minLengthLabel = DockingUtils.createNonHtmlLabel("Minimum Length: "); JLabel minLengthLabel = new GLabel("Minimum Length: ");
ToolTipManager.setToolTipText(minLengthLabel, ToolTipManager.setToolTipText(minLengthLabel,
"The minimum number of consecutive addresses that will make an address table."); "The minimum number of consecutive addresses that will make an address table.");
minLengthField = new JTextField(5); minLengthField = new JTextField(5);
@ -158,7 +161,7 @@ public class AddressTableDialog extends DialogComponentProvider {
minLengthPanel.add(minLengthLabel); minLengthPanel.add(minLengthLabel);
minLengthPanel.add(minLengthField); minLengthPanel.add(minLengthField);
alignLabel = DockingUtils.createNonHtmlLabel("Alignment: "); alignLabel = new GDLabel("Alignment: ");
alignField = new JTextField(5); alignField = new JTextField(5);
alignField.setName("Alignment"); alignField.setName("Alignment");
ToolTipManager.setToolTipText(alignLabel, ToolTipManager.setToolTipText(alignLabel,
@ -169,7 +172,7 @@ public class AddressTableDialog extends DialogComponentProvider {
} }
alignField.setText("" + align); alignField.setText("" + align);
skipLabel = DockingUtils.createNonHtmlLabel("Skip Length: "); skipLabel = new GDLabel("Skip Length: ");
skipField = new JTextField(5); skipField = new JTextField(5);
skipField.setName("Skip"); skipField.setName("Skip");
ToolTipManager.setToolTipText(skipLabel, ToolTipManager.setToolTipText(skipLabel,
@ -229,12 +232,12 @@ public class AddressTableDialog extends DialogComponentProvider {
ToolTipManager.setToolTipText(autoLabelCB, ToolTipManager.setToolTipText(autoLabelCB,
"Label the top of the address table and all members of the table."); "Label the top of the address table and all members of the table.");
offsetLabel = DockingUtils.createNonHtmlLabel("Offset: "); offsetLabel = new GDLabel("Offset: ");
ToolTipManager.setToolTipText(offsetLabel, ToolTipManager.setToolTipText(offsetLabel,
"Offset from the beginning of the selected table(s)"); "Offset from the beginning of the selected table(s)");
offsetLabel.setEnabled(false); offsetLabel.setEnabled(false);
JLabel viewOffsetLabel = DockingUtils.createNonHtmlLabel(" "); JLabel viewOffsetLabel = new GDLabel(" ");
viewOffsetLabel.setEnabled(false); viewOffsetLabel.setEnabled(false);
viewOffset = new HintTextField(20); viewOffset = new HintTextField(20);

View File

@ -25,7 +25,7 @@ import java.util.ArrayList;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.util.bean.FixedBitSizeValueField; import ghidra.app.util.bean.FixedBitSizeValueField;
import ghidra.program.model.lang.Register; import ghidra.program.model.lang.Register;
import ghidra.program.model.lang.RegisterValue; import ghidra.program.model.lang.RegisterValue;
@ -63,8 +63,8 @@ public class ProcessorStateDialog extends DialogComponentProvider {
for (int i = 0; i < fields.length; i++) { for (int i = 0; i < fields.length; i++) {
Register register = registerList.get(i); Register register = registerList.get(i);
int numbits = register.getBitLength(); int numbits = register.getBitLength();
JLabel label = DockingUtils.createNonHtmlLabel(register.getName() + " [ " + JLabel label = new GLabel(register.getName() + " [ " + register.getBitLength() +
register.getBitLength() + " bit" + ((numbits == 1) ? "" : "s") + " ] :"); " bit" + ((numbits == 1) ? "" : "s") + " ] :");
label.setHorizontalAlignment(SwingConstants.TRAILING); label.setHorizontalAlignment(SwingConstants.TRAILING);
label.setToolTipText(register.getDescription()); label.setToolTipText(register.getDescription());
workPanel.add(label); workPanel.add(label);

View File

@ -18,8 +18,8 @@ package ghidra.app.plugin.core.disassembler;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.cmd.disassemble.SetFlowOverrideCmd; import ghidra.app.cmd.disassemble.SetFlowOverrideCmd;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.listing.*; import ghidra.program.model.listing.*;
@ -97,7 +97,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
FlowType flowType = instruction.getFlowType(); FlowType flowType = instruction.getFlowType();
panel.add(DockingUtils.createNonHtmlLabel( panel.add(new GLabel(
"Current Flow: " + flowType.getName() + (flowType.isConditional() ? "*" : ""))); "Current Flow: " + flowType.getName() + (flowType.isConditional() ? "*" : "")));
panel.add(Box.createGlue()); panel.add(Box.createGlue());
@ -111,7 +111,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
JPanel panel = new JPanel(); JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.add(DockingUtils.createNonHtmlLabel(note)); panel.add(new GLabel(note));
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
@ -140,7 +140,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
flowOverrideComboBox.setSelectedItem(flowOverride); flowOverrideComboBox.setSelectedItem(flowOverride);
} }
panel.add(DockingUtils.createNonHtmlLabel("Instruction Flow:")); panel.add(new GLabel("Instruction Flow:"));
panel.add(flowOverrideComboBox); panel.add(flowOverrideComboBox);
panel.add(Box.createGlue()); panel.add(Box.createGlue());

View File

@ -24,9 +24,9 @@ import javax.swing.*;
import javax.swing.table.*; import javax.swing.table.*;
import docking.ActionContext; import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*; import docking.action.*;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.label.GLabel;
import ghidra.app.context.ProgramActionContext; import ghidra.app.context.ProgramActionContext;
import ghidra.app.services.DataTypeManagerService; import ghidra.app.services.DataTypeManagerService;
import ghidra.app.services.GoToService; import ghidra.app.services.GoToService;
@ -219,8 +219,7 @@ public class EquateTableProvider extends ComponentProviderAdapter {
setEquateTableRenderer(); setEquateTableRenderer();
JPanel equatesPanel = new JPanel(new BorderLayout()); JPanel equatesPanel = new JPanel(new BorderLayout());
equatesPanel.add(DockingUtils.createNonHtmlLabel("Equates", SwingConstants.CENTER), equatesPanel.add(new GLabel("Equates", SwingConstants.CENTER), BorderLayout.NORTH);
BorderLayout.NORTH);
equatesPanel.add(equatesTablePane, BorderLayout.CENTER); equatesPanel.add(equatesTablePane, BorderLayout.CENTER);
equatesPanel.add(equatesFilterPanel, BorderLayout.SOUTH); equatesPanel.add(equatesFilterPanel, BorderLayout.SOUTH);
@ -247,8 +246,7 @@ public class EquateTableProvider extends ComponentProviderAdapter {
setReferenceTableRenderer(); setReferenceTableRenderer();
JPanel referencesPanel = new JPanel(new BorderLayout()); JPanel referencesPanel = new JPanel(new BorderLayout());
referencesPanel.add(DockingUtils.createNonHtmlLabel("References", SwingConstants.CENTER), referencesPanel.add(new GLabel("References", SwingConstants.CENTER), "North");
"North");
referencesPanel.add(referencesTablePane, "Center"); referencesPanel.add(referencesTablePane, "Center");
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////

View File

@ -27,12 +27,12 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.options.editor.ButtonPanelFactory; import docking.options.editor.ButtonPanelFactory;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.filechooser.GhidraFileChooser; import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.help.AboutDomainObjectUtils; import ghidra.app.plugin.core.help.AboutDomainObjectUtils;
import ghidra.app.util.*; import ghidra.app.util.*;
import ghidra.app.util.exporter.Exporter; import ghidra.app.util.exporter.Exporter;
@ -184,16 +184,16 @@ public class ExporterDialog extends DialogComponentProvider implements AddressFa
private Component buildMainPanel() { private Component buildMainPanel() {
JPanel panel = new JPanel(new PairLayout(5, 5)); JPanel panel = new JPanel(new PairLayout(5, 5));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(DockingUtils.createNonHtmlLabel("Format: ", SwingConstants.RIGHT)); panel.add(new GLabel("Format: ", SwingConstants.RIGHT));
panel.add(buildFormatChooser()); panel.add(buildFormatChooser());
panel.add(DockingUtils.createNonHtmlLabel("Output File: ", SwingConstants.RIGHT)); panel.add(new GLabel("Output File: ", SwingConstants.RIGHT));
panel.add(buildFilePanel()); panel.add(buildFilePanel());
return panel; return panel;
} }
private Component buildSelectionCheckboxPanel() { private Component buildSelectionCheckboxPanel() {
JPanel panel = new JPanel(new PairLayout(5, 5)); JPanel panel = new JPanel(new PairLayout(5, 5));
selectionOnlyLabel = DockingUtils.createNonHtmlLabel("Selection Only:"); selectionOnlyLabel = new GLabel("Selection Only:");
panel.add(selectionOnlyLabel); panel.add(selectionOnlyLabel);
panel.add(buildSelectionCheckbox()); panel.add(buildSelectionCheckbox());
return panel; return panel;

View File

@ -26,8 +26,8 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.widgets.label.GDLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
@ -192,13 +192,13 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(new TitledBorder("Home")); panel.setBorder(new TitledBorder("Home"));
addressLabel = DockingUtils.createNonHtmlLabel("01001000"); addressLabel = new GDLabel("01001000");
Font font = addressLabel.getFont(); Font font = addressLabel.getFont();
Font monoFont = new Font("monospaced", font.getStyle(), font.getSize()); Font monoFont = new Font("monospaced", font.getStyle(), font.getSize());
addressLabel.setFont(monoFont); addressLabel.setFont(monoFont);
instLabel = DockingUtils.createNonHtmlLabel("jmp DAT_01001000"); instLabel = new GDLabel("jmp DAT_01001000");
instLabel.setFont(monoFont); instLabel.setFont(monoFont);
homeButton = createButton("images/go-home.png", "Home"); homeButton = createButton("images/go-home.png", "Home");

View File

@ -22,8 +22,9 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.cmd.function.ApplyFunctionSignatureCmd; import ghidra.app.cmd.function.ApplyFunctionSignatureCmd;
import ghidra.app.services.DataTypeManagerService; import ghidra.app.services.DataTypeManagerService;
import ghidra.app.util.cparser.C.ParseException; import ghidra.app.util.cparser.C.ParseException;
@ -128,7 +129,7 @@ public class EditFunctionSignatureDialog extends DialogComponentProvider {
String signature = function.getPrototypeString(false, false); String signature = function.getPrototypeString(false, false);
signatureField = new JTextField(signature.length()); // add some extra room to edit signatureField = new JTextField(signature.length()); // add some extra room to edit
signatureField.setText(signature); signatureField.setText(signature);
signatureLabel = DockingUtils.createNonHtmlLabel("Signature:"); signatureLabel = new GDLabel("Signature:");
signaturePanel.add(signatureLabel); signaturePanel.add(signatureLabel);
signaturePanel.add(signatureField); signaturePanel.add(signatureField);
@ -165,7 +166,7 @@ public class EditFunctionSignatureDialog extends DialogComponentProvider {
function.getProgram().getFunctionManager().getCallingConventionNames(); function.getProgram().getFunctionManager().getCallingConventionNames();
String[] choices = callingConventions.toArray(new String[callingConventions.size()]); String[] choices = callingConventions.toArray(new String[callingConventions.size()]);
setCallingConventionChoices(choices); setCallingConventionChoices(choices);
parentPanel.add(DockingUtils.createNonHtmlLabel("Calling Convention:")); parentPanel.add(new GLabel("Calling Convention:"));
parentPanel.add(callingConventionComboBox); parentPanel.add(callingConventionComboBox);
} }
@ -215,7 +216,7 @@ public class EditFunctionSignatureDialog extends DialogComponentProvider {
callFixupComboBox.setSelectedItem(callFixupName); callFixupComboBox.setSelectedItem(callFixupName);
} }
callFixupPanel.add(DockingUtils.createNonHtmlLabel("Call-Fixup:")); callFixupPanel.add(new GLabel("Call-Fixup:"));
callFixupPanel.add(callFixupComboBox); callFixupPanel.add(callFixupComboBox);
callFixupPanel.add(Box.createGlue()); callFixupPanel.add(Box.createGlue());

View File

@ -21,7 +21,7 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.util.*; import ghidra.app.util.*;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
@ -358,7 +358,7 @@ public class ThunkReferenceAddressDialog extends DialogComponentProvider {
JPanel mainPanel = new JPanel(new PairLayout(5, 5)); JPanel mainPanel = new JPanel(new PairLayout(5, 5));
refFunctionField = new JTextField(20); refFunctionField = new JTextField(20);
mainPanel.add(DockingUtils.createNonHtmlLabel("Destination Function/Address:")); mainPanel.add(new GLabel("Destination Function/Address:"));
mainPanel.add(refFunctionField); mainPanel.add(refFunctionField);
mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));

View File

@ -30,6 +30,8 @@ import javax.swing.table.TableCellEditor;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.DockingUtils;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import docking.widgets.table.*; import docking.widgets.table.*;
import generic.util.WindowUtilities; import generic.util.WindowUtilities;
import ghidra.app.services.DataTypeManagerService; import ghidra.app.services.DataTypeManagerService;
@ -290,9 +292,9 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
panel.setBorder(BorderFactory.createEmptyBorder(0, 5, 15, 15)); panel.setBorder(BorderFactory.createEmptyBorder(0, 5, 15, 15));
JPanel leftPanel = new JPanel(new PairLayout(4, 8)); JPanel leftPanel = new JPanel(new PairLayout(4, 8));
leftPanel.add(DockingUtils.createNonHtmlLabel("Function Name:")); leftPanel.add(new GLabel("Function Name:"));
leftPanel.add(createNameField()); leftPanel.add(createNameField());
leftPanel.add(DockingUtils.createNonHtmlLabel("Calling Convention")); leftPanel.add(new GLabel("Calling Convention"));
leftPanel.add(createCallingConventionCombo()); leftPanel.add(createCallingConventionCombo());
leftPanel.setBorder(BorderFactory.createEmptyBorder(14, 0, 0, 10)); leftPanel.setBorder(BorderFactory.createEmptyBorder(14, 0, 0, 10));
@ -327,7 +329,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
private JComponent createCallingConventionCombo() { private JComponent createCallingConventionCombo() {
List<String> callingConventionNames = model.getCallingConventionNames(); List<String> callingConventionNames = model.getCallingConventionNames();
String[] names = new String[callingConventionNames.size()]; String[] names = new String[callingConventionNames.size()];
callingConventionComboBox = new JComboBox<>(callingConventionNames.toArray(names)); callingConventionComboBox = new GComboBox<>(callingConventionNames.toArray(names));
callingConventionComboBox.setSelectedItem(model.getCallingConventionName()); callingConventionComboBox.setSelectedItem(model.getCallingConventionName());
callingConventionComboBox.addItemListener(e -> model.setCallingConventionName( callingConventionComboBox.addItemListener(e -> model.setCallingConventionName(
(String) callingConventionComboBox.getSelectedItem())); (String) callingConventionComboBox.getSelectedItem()));
@ -335,7 +337,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
} }
private JComponent createCallFixupComboPanel() { private JComponent createCallFixupComboPanel() {
callFixupComboBox = new JComboBox<>(); callFixupComboBox = new GComboBox<>();
String[] callFixupNames = model.getCallFixupNames(); String[] callFixupNames = model.getCallFixupNames();
callFixupComboBox.addItem(FunctionEditorModel.NONE_CHOICE); callFixupComboBox.addItem(FunctionEditorModel.NONE_CHOICE);

View File

@ -25,8 +25,9 @@ import javax.swing.event.*;
import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellEditor;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.DropDownSelectionTextField; import docking.widgets.DropDownSelectionTextField;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import docking.widgets.table.GTable; import docking.widgets.table.GTable;
import ghidra.app.services.DataTypeManagerService; import ghidra.app.services.DataTypeManagerService;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
@ -161,7 +162,7 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
JPanel panel = new JPanel(new PairLayout(10, 4)); JPanel panel = new JPanel(new PairLayout(10, 4));
panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20)); panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
panel.add(DockingUtils.createNonHtmlLabel("Datatype: ")); panel.add(new GLabel("Datatype: "));
dataTypeEditor = new ParameterDataTypeCellEditor(this, service); dataTypeEditor = new ParameterDataTypeCellEditor(this, service);
@ -211,11 +212,11 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
}); });
panel.add(dataTypeEditComponent); panel.add(dataTypeEditComponent);
panel.add(DockingUtils.createNonHtmlLabel("Datatype Size: ")); panel.add(new GLabel("Datatype Size: "));
sizeLabel = DockingUtils.createNonHtmlLabel("" + size); sizeLabel = new GDLabel("" + size);
panel.add(sizeLabel); panel.add(sizeLabel);
panel.add(DockingUtils.createNonHtmlLabel("Allocated Size:")); panel.add(new GLabel("Allocated Size:"));
currentSizeLabel = DockingUtils.createNonHtmlLabel(""); currentSizeLabel = new GDLabel("");
panel.add(currentSizeLabel); panel.add(currentSizeLabel);
setFocusComponent(textField); setFocusComponent(textField);

View File

@ -23,7 +23,7 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import docking.widgets.textfield.HintTextField; import docking.widgets.textfield.HintTextField;
import ghidra.app.cmd.function.CreateFunctionTagCmd; import ghidra.app.cmd.function.CreateFunctionTagCmd;
import ghidra.app.context.ProgramActionContext; import ghidra.app.context.ProgramActionContext;
@ -377,7 +377,6 @@ public class FunctionTagsComponentProvider extends ComponentProviderAdapter
*/ */
private JPanel createFilterPanel() { private JPanel createFilterPanel() {
filterPanel = new JPanel(new BorderLayout()); filterPanel = new JPanel(new BorderLayout());
JLabel label = DockingUtils.createNonHtmlLabel(" Filter:");
filterInputTF = new HintTextField(""); filterInputTF = new HintTextField("");
filterInputTF.setName("filterInputTF"); filterInputTF.setName("filterInputTF");
@ -398,7 +397,7 @@ public class FunctionTagsComponentProvider extends ComponentProviderAdapter
} }
}); });
filterPanel.add(label, BorderLayout.WEST); filterPanel.add(new GLabel(" Filter:"), BorderLayout.WEST);
filterPanel.add(filterInputTF, BorderLayout.CENTER); filterPanel.add(filterInputTF, BorderLayout.CENTER);
return filterPanel; return filterPanel;
@ -412,12 +411,11 @@ public class FunctionTagsComponentProvider extends ComponentProviderAdapter
private JPanel createInputPanel() { private JPanel createInputPanel() {
inputPanel = new JPanel(new BorderLayout()); inputPanel = new JPanel(new BorderLayout());
JLabel label = DockingUtils.createNonHtmlLabel(" Create new tag(s):");
tagInputTF = new HintTextField("tag 1, tag 2, ..."); tagInputTF = new HintTextField("tag 1, tag 2, ...");
tagInputTF.setName("tagInputTF"); tagInputTF.setName("tagInputTF");
tagInputTF.addActionListener(e -> processCreates()); tagInputTF.addActionListener(e -> processCreates());
inputPanel.add(label, BorderLayout.WEST); inputPanel.add(new GLabel(" Create new tag(s):"), BorderLayout.WEST);
inputPanel.add(tagInputTF, BorderLayout.CENTER); inputPanel.add(tagInputTF, BorderLayout.CENTER);
return inputPanel; return inputPanel;

View File

@ -20,12 +20,13 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.*; import java.util.*;
import javax.swing.*; import javax.swing.DefaultListModel;
import javax.swing.JPanel;
import docking.DockingUtils;
import docking.DockingWindowManager; import docking.DockingWindowManager;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.dialogs.InputDialog; import docking.widgets.dialogs.InputDialog;
import docking.widgets.label.GLabel;
import ghidra.app.cmd.function.ChangeFunctionTagCmd; import ghidra.app.cmd.function.ChangeFunctionTagCmd;
import ghidra.app.cmd.function.DeleteFunctionTagCmd; import ghidra.app.cmd.function.DeleteFunctionTagCmd;
import ghidra.framework.cmd.Command; import ghidra.framework.cmd.Command;
@ -150,9 +151,7 @@ public abstract class TagListPanel extends JPanel {
} }
}); });
JLabel label = DockingUtils.createNonHtmlLabel(title); add(new GLabel(title), BorderLayout.NORTH);
add(label, BorderLayout.NORTH);
add(list, BorderLayout.CENTER); add(list, BorderLayout.CENTER);
} }

View File

@ -21,10 +21,12 @@ import java.util.*;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.ActionContext;
import docking.ComponentProvider;
import docking.action.*; import docking.action.*;
import docking.help.Help; import docking.help.Help;
import docking.help.HelpService; import docking.help.HelpService;
import docking.widgets.combobox.GComboBox;
import docking.widgets.fieldpanel.internal.FieldPanelCoordinator; import docking.widgets.fieldpanel.internal.FieldPanelCoordinator;
import ghidra.app.util.viewer.util.CodeComparisonPanel; import ghidra.app.util.viewer.util.CodeComparisonPanel;
import ghidra.app.util.viewer.util.CodeComparisonPanelActionContext; import ghidra.app.util.viewer.util.CodeComparisonPanelActionContext;
@ -159,8 +161,7 @@ public abstract class FunctionChoiceComparisonPanel extends FunctionComparisonPa
private Component createLeftChoicePanel() { private Component createLeftChoicePanel() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
leftComboBox = new JComboBox<>(leftWrappedFunctions); leftComboBox = new GComboBox<>(leftWrappedFunctions);
DockingUtils.turnOffHTMLRendering(leftComboBox);
adjustSelectedLeftFunction(); adjustSelectedLeftFunction();
leftComboBox.addItemListener(e -> { leftComboBox.addItemListener(e -> {
WrappedFunction wrappedFunction = (WrappedFunction) leftComboBox.getSelectedItem(); WrappedFunction wrappedFunction = (WrappedFunction) leftComboBox.getSelectedItem();
@ -173,8 +174,7 @@ public abstract class FunctionChoiceComparisonPanel extends FunctionComparisonPa
private Component createRightChoicePanel() { private Component createRightChoicePanel() {
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
rightComboBox = new JComboBox<>(rightWrappedFunctions); rightComboBox = new GComboBox<>(rightWrappedFunctions);
DockingUtils.turnOffHTMLRendering(rightComboBox);
adjustSelectedRightFunction(); adjustSelectedRightFunction();
rightComboBox.addItemListener(e -> { rightComboBox.addItemListener(e -> {
WrappedFunction wrappedFunction = (WrappedFunction) rightComboBox.getSelectedItem(); WrappedFunction wrappedFunction = (WrappedFunction) rightComboBox.getSelectedItem();

View File

@ -21,7 +21,7 @@ import java.awt.FlowLayout;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
/** /**
* Simple panel containing a JLabel for displaying error messages. * Simple panel containing a JLabel for displaying error messages.
@ -37,7 +37,7 @@ public class MessagePanel extends JPanel {
*/ */
public MessagePanel() { public MessagePanel() {
setLayout(new FlowLayout(FlowLayout.CENTER)); setLayout(new FlowLayout(FlowLayout.CENTER));
msgLabel = DockingUtils.createNonHtmlLabel(NO_STATUS); msgLabel = new GDLabel(NO_STATUS);
add(msgLabel); add(msgLabel);
} }

View File

@ -18,8 +18,8 @@ package ghidra.app.plugin.core.label;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import ghidra.app.cmd.label.AddLabelCmd; import ghidra.app.cmd.label.AddLabelCmd;
import ghidra.app.cmd.refs.AssociateSymbolCmd; import ghidra.app.cmd.refs.AssociateSymbolCmd;
import ghidra.app.context.ListingActionContext; import ghidra.app.context.ListingActionContext;
@ -60,7 +60,7 @@ public class OperandLabelDialog extends DialogComponentProvider {
JPanel mainPanel = new JPanel(new PairLayout(5, 5)); JPanel mainPanel = new JPanel(new PairLayout(5, 5));
mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
label = DockingUtils.createNonHtmlLabel("Label: "); label = new GDLabel("Label: ");
myChoice = new GhidraComboBox<>(); myChoice = new GhidraComboBox<>();
myChoice.setName("MYCHOICE"); myChoice.setName("MYCHOICE");

View File

@ -22,8 +22,9 @@ import javax.swing.*;
import javax.swing.event.*; import javax.swing.event.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.misc.RegisterField; import ghidra.app.plugin.core.misc.RegisterField;
import ghidra.app.util.*; import ghidra.app.util.*;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -145,31 +146,27 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
lengthField.setChangeListener(e -> lengthChanged()); lengthField.setChangeListener(e -> lengthChanged());
addrField.addChangeListener(ev -> addrChanged()); addrField.addChangeListener(ev -> addrChanged());
JLabel readLabel = DockingUtils.createNonHtmlLabel("Read");
readCB = new JCheckBox(); readCB = new JCheckBox();
readCB.setName("Read"); readCB.setName("Read");
JLabel writeLabel = DockingUtils.createNonHtmlLabel("Write");
writeCB = new JCheckBox(); writeCB = new JCheckBox();
writeCB.setName("Write"); writeCB.setName("Write");
JLabel executeLabel = DockingUtils.createNonHtmlLabel("Execute");
executeCB = new JCheckBox(); executeCB = new JCheckBox();
executeCB.setName("Execute"); executeCB.setName("Execute");
JLabel volatileLabel = DockingUtils.createNonHtmlLabel("Volatile");
volatileCB = new JCheckBox(); volatileCB = new JCheckBox();
volatileCB.setName("Volatile"); volatileCB.setName("Volatile");
JPanel topPanel = new JPanel(new PairLayout(4, 10, 150)); JPanel topPanel = new JPanel(new PairLayout(4, 10, 150));
topPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 4, 5)); topPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 4, 5));
topPanel.add(DockingUtils.createNonHtmlLabel("Block Name:", SwingConstants.RIGHT)); topPanel.add(new GLabel("Block Name:", SwingConstants.RIGHT));
topPanel.add(nameField); topPanel.add(nameField);
topPanel.add(DockingUtils.createNonHtmlLabel("Start Addr:", SwingConstants.RIGHT)); topPanel.add(new GLabel("Start Addr:", SwingConstants.RIGHT));
topPanel.add(addrField); topPanel.add(addrField);
topPanel.add(DockingUtils.createNonHtmlLabel("Length:", SwingConstants.RIGHT)); topPanel.add(new GLabel("Length:", SwingConstants.RIGHT));
topPanel.add(lengthField); topPanel.add(lengthField);
topPanel.add(DockingUtils.createNonHtmlLabel("Comment:", SwingConstants.RIGHT)); topPanel.add(new GLabel("Comment:", SwingConstants.RIGHT));
topPanel.add(commentField); topPanel.add(commentField);
JPanel execPanel = new JPanel(); JPanel execPanel = new JPanel();
@ -178,19 +175,19 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
execPanel.setLayout(bl); execPanel.setLayout(bl);
execPanel.add(Box.createHorizontalStrut(10)); execPanel.add(Box.createHorizontalStrut(10));
execPanel.add(readLabel); execPanel.add(new GLabel("Read"));
execPanel.add(readCB); execPanel.add(readCB);
execPanel.add(Box.createHorizontalStrut(10)); execPanel.add(Box.createHorizontalStrut(10));
execPanel.add(writeLabel); execPanel.add(new GLabel("Write"));
execPanel.add(writeCB); execPanel.add(writeCB);
execPanel.add(Box.createHorizontalStrut(10)); execPanel.add(Box.createHorizontalStrut(10));
execPanel.add(executeLabel); execPanel.add(new GLabel("Execute"));
execPanel.add(executeCB); execPanel.add(executeCB);
execPanel.add(Box.createHorizontalStrut(10)); execPanel.add(Box.createHorizontalStrut(10));
execPanel.add(volatileLabel); execPanel.add(new GLabel("Volatile"));
execPanel.add(volatileCB); execPanel.add(volatileCB);
JPanel panel = new JPanel(); JPanel panel = new JPanel();
@ -412,7 +409,7 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
} }
private void createInitializedPanel() { private void createInitializedPanel() {
initialValueLabel = DockingUtils.createNonHtmlLabel("Initial Value"); initialValueLabel = new GDLabel("Initial Value");
initialValueField = new RegisterField(8, null, false); initialValueField = new RegisterField(8, null, false);
initialValueField.setName("Initial Value"); initialValueField.setName("Initial Value");
initialValueField.setEnabled(false); initialValueField.setEnabled(false);
@ -428,7 +425,6 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
private JPanel createAddressPanel() { private JPanel createAddressPanel() {
JPanel addressPanel = new JPanel(new PairLayout()); JPanel addressPanel = new JPanel(new PairLayout());
JLabel addrToAddLabel = DockingUtils.createNonHtmlLabel("Source Addr:");
baseAddrField = new AddressInput(); baseAddrField = new AddressInput();
baseAddrField.setAddressFactory(addrFactory); baseAddrField.setAddressFactory(addrFactory);
baseAddrField.setName("Source Addr"); baseAddrField.setName("Source Addr");
@ -442,7 +438,7 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
} }
baseAddrField.setAddress(minAddr); baseAddrField.setAddress(minAddr);
model.setBaseAddress(minAddr); model.setBaseAddress(minAddr);
addressPanel.add(addrToAddLabel); addressPanel.add(new GLabel("Source Addr:"));
addressPanel.add(baseAddrField); addressPanel.add(baseAddrField);
addressPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); addressPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
return addressPanel; return addressPanel;

View File

@ -24,7 +24,9 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.*; import docking.ComponentProvider;
import docking.DialogComponentProvider;
import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.misc.RegisterField; import ghidra.app.plugin.core.misc.RegisterField;
import ghidra.app.util.*; import ghidra.app.util.*;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -127,33 +129,29 @@ class ExpandBlockDialog extends DialogComponentProvider implements ChangeListene
endAddressInput.setAddress(end); endAddressInput.setAddress(end);
endAddressInput.setAddressSpaceEditable(false); endAddressInput.setAddressSpaceEditable(false);
boolean isExpandUp = dialogType == EXPAND_UP;
startField = new JTextField(10); startField = new JTextField(10);
startField.setName("StartAddress"); startField.setName("StartAddress");
startField.setEnabled(isExpandUp);
startField.setText(start.toString());
endField = new JTextField(10); endField = new JTextField(10);
endField.setName("EndAddress"); endField.setName("EndAddress");
startField.setText(start.toString()); endField.setEnabled(!isExpandUp);
endField.setText(end.toString()); endField.setText(end.toString());
JLabel startLabel = DockingUtils.createNonHtmlLabel("Start Address:", SwingConstants.RIGHT);
JLabel endLabel = DockingUtils.createNonHtmlLabel("End Address:", SwingConstants.RIGHT);
if (dialogType == EXPAND_UP) {
endField.setEnabled(false);
startLabel.setText("New Start Address:");
}
else {
startField.setEnabled(false);
endLabel.setText("New End Address:");
}
lengthField = new RegisterField(32, null, false); lengthField = new RegisterField(32, null, false);
lengthField.setName("BlockLength"); lengthField.setName("BlockLength");
lengthField.setValue(Long.valueOf(model.getLength())); lengthField.setValue(Long.valueOf(model.getLength()));
panel.add(startLabel); panel.add(
panel.add((dialogType == EXPAND_UP) ? (JComponent) startAddressInput : startField); new GLabel(isExpandUp ? "New Start Address:" : "Start Address:", SwingConstants.RIGHT));
panel.add(endLabel); panel.add(isExpandUp ? (JComponent) startAddressInput : startField);
panel.add((dialogType == EXPAND_UP) ? (JComponent) endField : endAddressInput); panel.add(
panel.add(DockingUtils.createNonHtmlLabel("Block Length:", SwingConstants.RIGHT)); new GLabel(isExpandUp ? "End Address:" : "New End Address:", SwingConstants.RIGHT));
panel.add(isExpandUp ? (JComponent) endField : endAddressInput);
panel.add(new GLabel("Block Length:", SwingConstants.RIGHT));
panel.add(lengthField); panel.add(lengthField);
JPanel mainPanel = new JPanel(new BorderLayout()); JPanel mainPanel = new JPanel(new BorderLayout());

View File

@ -24,9 +24,9 @@ import javax.swing.table.TableColumn;
import javax.swing.table.TableModel; import javax.swing.table.TableModel;
import docking.ActionContext; import docking.ActionContext;
import docking.DockingUtils;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.ToolBarData; import docking.action.ToolBarData;
import docking.widgets.label.GLabel;
import docking.widgets.table.*; import docking.widgets.table.*;
import docking.widgets.textfield.GValidatedTextField.MaxLengthField; import docking.widgets.textfield.GValidatedTextField.MaxLengthField;
import ghidra.app.context.ProgramActionContext; import ghidra.app.context.ProgramActionContext;
@ -177,8 +177,7 @@ class MemoryMapProvider extends ComponentProviderAdapter {
enableOptions(model); enableOptions(model);
}); });
memPanel.add(DockingUtils.createNonHtmlLabel("Memory Blocks", SwingConstants.CENTER), memPanel.add(new GLabel("Memory Blocks", SwingConstants.CENTER), BorderLayout.NORTH);
BorderLayout.NORTH);
memPanel.add(memPane, BorderLayout.CENTER); memPanel.add(memPane, BorderLayout.CENTER);
return memPanel; return memPanel;

View File

@ -22,7 +22,8 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.cmd.memory.MoveBlockListener; import ghidra.app.cmd.memory.MoveBlockListener;
import ghidra.app.cmd.memory.MoveBlockTask; import ghidra.app.cmd.memory.MoveBlockTask;
import ghidra.app.util.*; import ghidra.app.util.*;
@ -157,16 +158,16 @@ public class MoveBlockDialog extends DialogComponentProvider implements MoveBloc
private JPanel buildMainPanel() { private JPanel buildMainPanel() {
JPanel panel = new JPanel(new PairLayout(5, 20, 150)); JPanel panel = new JPanel(new PairLayout(5, 20, 150));
panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20)); panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
blockNameLabel = DockingUtils.createNonHtmlLabel(".text"); blockNameLabel = new GDLabel(".text");
blockNameLabel.setName("blockName"); // name components for junits blockNameLabel.setName("blockName"); // name components for junits
origStartLabel = DockingUtils.createNonHtmlLabel("1001000"); origStartLabel = new GDLabel("1001000");
origStartLabel.setName("origStart"); origStartLabel.setName("origStart");
origEndLabel = DockingUtils.createNonHtmlLabel("1002000"); origEndLabel = new GDLabel("1002000");
origEndLabel.setName("origEnd"); origEndLabel.setName("origEnd");
lengthLabel = DockingUtils.createNonHtmlLabel("4096 (0x1000)"); lengthLabel = new GDLabel("4096 (0x1000)");
lengthLabel.setName("length"); lengthLabel.setName("length");
newStartField = new AddressInput(); newStartField = new AddressInput();
@ -188,17 +189,17 @@ public class MoveBlockDialog extends DialogComponentProvider implements MoveBloc
} }
}); });
panel.add(DockingUtils.createNonHtmlLabel("Name:", SwingConstants.RIGHT)); panel.add(new GLabel("Name:", SwingConstants.RIGHT));
panel.add(blockNameLabel); panel.add(blockNameLabel);
panel.add(DockingUtils.createNonHtmlLabel("Start Address:", SwingConstants.RIGHT)); panel.add(new GLabel("Start Address:", SwingConstants.RIGHT));
panel.add(origStartLabel); panel.add(origStartLabel);
panel.add(DockingUtils.createNonHtmlLabel("End Address:", SwingConstants.RIGHT)); panel.add(new GLabel("End Address:", SwingConstants.RIGHT));
panel.add(origEndLabel); panel.add(origEndLabel);
panel.add(DockingUtils.createNonHtmlLabel("Length:", SwingConstants.RIGHT)); panel.add(new GLabel("Length:", SwingConstants.RIGHT));
panel.add(lengthLabel); panel.add(lengthLabel);
panel.add(DockingUtils.createNonHtmlLabel("New Start Address:", SwingConstants.RIGHT)); panel.add(new GLabel("New Start Address:", SwingConstants.RIGHT));
panel.add(newStartField); panel.add(newStartField);
panel.add(DockingUtils.createNonHtmlLabel("New End Address:", SwingConstants.RIGHT)); panel.add(new GLabel("New End Address:", SwingConstants.RIGHT));
panel.add(newEndField); panel.add(newEndField);
return panel; return panel;
} }

View File

@ -24,7 +24,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.misc.RegisterField; import ghidra.app.plugin.core.misc.RegisterField;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
@ -118,13 +118,13 @@ class SplitBlockDialog extends DialogComponentProvider {
blockOneLengthField = new RegisterField(32, null, false); blockOneLengthField = new RegisterField(32, null, false);
blockOneLengthField.setName("BlockOneLength"); blockOneLengthField.setName("BlockOneLength");
panelOne.add(DockingUtils.createNonHtmlLabel("Block Name:", SwingConstants.RIGHT)); panelOne.add(new GLabel("Block Name:", SwingConstants.RIGHT));
panelOne.add(blockOneNameField); panelOne.add(blockOneNameField);
panelOne.add(DockingUtils.createNonHtmlLabel("Start Address:", SwingConstants.RIGHT)); panelOne.add(new GLabel("Start Address:", SwingConstants.RIGHT));
panelOne.add(blockOneStartField); panelOne.add(blockOneStartField);
panelOne.add(DockingUtils.createNonHtmlLabel("End Address:", SwingConstants.RIGHT)); panelOne.add(new GLabel("End Address:", SwingConstants.RIGHT));
panelOne.add(blockOneEnd); panelOne.add(blockOneEnd);
panelOne.add(DockingUtils.createNonHtmlLabel("Block Length:", SwingConstants.RIGHT)); panelOne.add(new GLabel("Block Length:", SwingConstants.RIGHT));
panelOne.add(blockOneLengthField); panelOne.add(blockOneLengthField);
JPanel panelTwo = new JPanel(new PairLayout(5, 5, 150)); JPanel panelTwo = new JPanel(new PairLayout(5, 5, 150));
@ -139,13 +139,13 @@ class SplitBlockDialog extends DialogComponentProvider {
blockTwoLengthField = new RegisterField(32, null, false); blockTwoLengthField = new RegisterField(32, null, false);
blockTwoLengthField.setName("BlockTwoLength"); blockTwoLengthField.setName("BlockTwoLength");
panelTwo.add(DockingUtils.createNonHtmlLabel("Block Name:", SwingConstants.RIGHT)); panelTwo.add(new GLabel("Block Name:", SwingConstants.RIGHT));
panelTwo.add(blockTwoNameField); panelTwo.add(blockTwoNameField);
panelTwo.add(DockingUtils.createNonHtmlLabel("Start Address:", SwingConstants.RIGHT)); panelTwo.add(new GLabel("Start Address:", SwingConstants.RIGHT));
panelTwo.add(blockTwoStart); panelTwo.add(blockTwoStart);
panelTwo.add(DockingUtils.createNonHtmlLabel("End Address:", SwingConstants.RIGHT)); panelTwo.add(new GLabel("End Address:", SwingConstants.RIGHT));
panelTwo.add(blockTwoEndField); panelTwo.add(blockTwoEndField);
panelTwo.add(DockingUtils.createNonHtmlLabel("Block Length:", SwingConstants.RIGHT)); panelTwo.add(new GLabel("Block Length:", SwingConstants.RIGHT));
panelTwo.add(blockTwoLengthField); panelTwo.add(blockTwoLengthField);
JPanel mainPanel = new JPanel(); JPanel mainPanel = new JPanel();

View File

@ -21,7 +21,7 @@ import java.awt.event.MouseEvent;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.util.layout.PairLayout; import ghidra.util.layout.PairLayout;
/** /**
@ -51,7 +51,7 @@ public class AddressTypeOverviewLegendPanel extends JPanel {
for (AddressType addressType : values) { for (AddressType addressType : values) {
JPanel panel = new ColorPanel(addressType); JPanel panel = new ColorPanel(addressType);
add(panel); add(panel);
add(DockingUtils.createNonHtmlLabel(addressType.getDescription())); add(new GLabel(addressType.getDescription()));
} }
} }

View File

@ -25,8 +25,8 @@ import javax.swing.border.LineBorder;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils;
import docking.util.GraphicsUtils; import docking.util.GraphicsUtils;
import docking.widgets.label.GLabel;
/** /**
* Class used by the entropy legend panel to show known entropy ranges. * Class used by the entropy legend panel to show known entropy ranges.
@ -134,7 +134,7 @@ public class KnotPanel extends JPanel implements ComponentListener {
ArrayList<KnotRecord> knots = palette.getKnots(); ArrayList<KnotRecord> knots = palette.getKnots();
for (KnotRecord record : knots) { for (KnotRecord record : knots) {
JLabel label = DockingUtils.createNonHtmlLabel(record.name); JLabel label = new GLabel(record.name);
label.setFont(FONT); label.setFont(FONT);
label.setBorder(new ToplessLineBorder(Color.BLACK)); label.setBorder(new ToplessLineBorder(Color.BLACK));
label.setHorizontalAlignment(SwingConstants.CENTER); label.setHorizontalAlignment(SwingConstants.CENTER);

View File

@ -27,9 +27,11 @@ import java.util.List;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import docking.*; import docking.ActionContext;
import docking.ToolTipManager;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.action.MenuData; import docking.action.MenuData;
import docking.widgets.label.GDLabel;
import ghidra.app.CorePluginPackage; import ghidra.app.CorePluginPackage;
import ghidra.app.context.*; import ghidra.app.context.*;
import ghidra.app.plugin.PluginCategoryNames; import ghidra.app.plugin.PluginCategoryNames;
@ -94,7 +96,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
private void createStatusPanels() { private void createStatusPanels() {
instructionPanel = new JPanel(new BorderLayout()); instructionPanel = new JPanel(new BorderLayout());
instructionLabel = DockingUtils.createNonHtmlLabel(" "); instructionLabel = new GDLabel(" ");
instructionPanel.setPreferredSize( instructionPanel.setPreferredSize(
new Dimension(200, instructionLabel.getPreferredSize().height)); new Dimension(200, instructionLabel.getPreferredSize().height));
ToolTipManager.setToolTipText(instructionLabel, CURRENT_INSTRUCTION_PREPEND_STRING); ToolTipManager.setToolTipText(instructionLabel, CURRENT_INSTRUCTION_PREPEND_STRING);
@ -103,7 +105,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
tool.addStatusComponent(instructionPanel, true, false); tool.addStatusComponent(instructionPanel, true, false);
functionPanel = new JPanel(new BorderLayout()); functionPanel = new JPanel(new BorderLayout());
functionLabel = DockingUtils.createNonHtmlLabel(" "); functionLabel = new GDLabel(" ");
functionLabel.addMouseListener(new MouseAdapter() { functionLabel.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
@ -121,7 +123,7 @@ public class ShowInstructionInfoPlugin extends ProgramPlugin {
tool.addStatusComponent(functionPanel, true, false); tool.addStatusComponent(functionPanel, true, false);
addressPanel = new JPanel(new BorderLayout()); addressPanel = new JPanel(new BorderLayout());
addressLabel = DockingUtils.createNonHtmlLabel(" "); addressLabel = new GDLabel(" ");
addressPanel.setPreferredSize(new Dimension(95, addressLabel.getPreferredSize().height)); addressPanel.setPreferredSize(new Dimension(95, addressLabel.getPreferredSize().height));
ToolTipManager.setToolTipText(addressLabel, "Current Address"); ToolTipManager.setToolTipText(addressLabel, "Current Address");
addressPanel.add(addressLabel); addressPanel.add(addressLabel);

View File

@ -24,8 +24,9 @@ import java.util.Map.Entry;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*; import javax.swing.border.*;
import docking.DockingUtils;
import docking.util.KeyBindingUtils; import docking.util.KeyBindingUtils;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GIconLabel;
import generic.util.WindowUtilities; import generic.util.WindowUtilities;
import ghidra.framework.model.ProjectLocator; import ghidra.framework.model.ProjectLocator;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
@ -53,6 +54,7 @@ public class MultiTabPanel extends JPanel {
private static final Font LABEL_FONT = new Font("Tahoma", Font.PLAIN, 11); private static final Font LABEL_FONT = new Font("Tahoma", Font.PLAIN, 11);
private static final Font LIST_LABEL_FONT = new Font("Tahoma", Font.BOLD, 9); private static final Font LIST_LABEL_FONT = new Font("Tahoma", Font.BOLD, 9);
private static final String DEFAULT_HIDDEN_COUNT_STR = "99";
/** A list of tabs that are hidden from view due to space constraints */ /** A list of tabs that are hidden from view due to space constraints */
private List<TabPanel> hiddenTabList; private List<TabPanel> hiddenTabList;
@ -228,7 +230,7 @@ public class MultiTabPanel extends JPanel {
final JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 1)); final JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 1));
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 10)); labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 10));
JLabel nameLabel = DockingUtils.createNonHtmlLabel(); JLabel nameLabel = new GDLabel();
nameLabel.setIconTextGap(1); nameLabel.setIconTextGap(1);
nameLabel.setName("objectName"); // junit access nameLabel.setName("objectName"); // junit access
nameLabel.setFont(LABEL_FONT); nameLabel.setFont(LABEL_FONT);
@ -237,9 +239,7 @@ public class MultiTabPanel extends JPanel {
labelPanel.add(nameLabel); labelPanel.add(nameLabel);
JLabel iconLabel = DockingUtils.createNonHtmlLabel(EMPTY16_ICON); JLabel iconLabel = new GIconLabel(isSelected ? CLOSE_ICON : EMPTY16_ICON);
Icon icon = isSelected ? CLOSE_ICON : EMPTY16_ICON;
iconLabel.setIcon(icon);
iconLabel.setToolTipText("Close"); iconLabel.setToolTipText("Close");
iconLabel.setName("Close"); // junit access iconLabel.setName("Close"); // junit access
@ -643,7 +643,7 @@ public class MultiTabPanel extends JPanel {
} }
private JLabel createLabel() { private JLabel createLabel() {
JLabel newLabel = DockingUtils.createNonHtmlLabel(LIST_ICON, SwingConstants.LEFT); JLabel newLabel = new GDLabel(DEFAULT_HIDDEN_COUNT_STR, LIST_ICON, SwingConstants.LEFT);
newLabel.setIconTextGap(0); newLabel.setIconTextGap(0);
newLabel.setFont(LIST_LABEL_FONT); newLabel.setFont(LIST_LABEL_FONT);
newLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4)); newLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4));
@ -682,7 +682,6 @@ public class MultiTabPanel extends JPanel {
} }
}); });
newLabel.setText("99");
newLabel.setPreferredSize(newLabel.getPreferredSize()); newLabel.setPreferredSize(newLabel.getPreferredSize());
return newLabel; return newLabel;

View File

@ -22,8 +22,8 @@ import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeCellRenderer;
import docking.DockingUtils;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.widgets.AbstractGCellRenderer;
import ghidra.program.model.listing.Group; import ghidra.program.model.listing.Group;
import resources.ResourceManager; import resources.ResourceManager;
@ -87,7 +87,7 @@ class DnDTreeCellRenderer extends DefaultTreeCellRenderer {
* @param enable true to enable HTML rendering; false to disable it * @param enable true to enable HTML rendering; false to disable it
*/ */
public void setHTMLRenderingEnabled(boolean enable) { public void setHTMLRenderingEnabled(boolean enable) {
putClientProperty(AbstractGCellRenderer.HTML_DISABLE_STRING, !enable); putClientProperty(DockingUtils.HTML_DISABLE_STRING, !enable);
} }
void setSelectionForDrag(Color color) { void setSelectionForDrag(Color color) {

View File

@ -21,7 +21,9 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.ComponentProvider;
import docking.WindowPosition;
import docking.widgets.label.GDLabel;
import ghidra.app.services.GoToService; import ghidra.app.services.GoToService;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
@ -126,7 +128,7 @@ public class FunctionReachabilityProvider extends ComponentProvider {
inputPanel.setLayout(new BoxLayout(inputPanel, BoxLayout.PAGE_AXIS)); inputPanel.setLayout(new BoxLayout(inputPanel, BoxLayout.PAGE_AXIS));
fromAddressField = new JTextField(15); fromAddressField = new JTextField(15);
fromFunctionLabel = DockingUtils.createNonHtmlLabel(); fromFunctionLabel = new GDLabel();
JButton swapButton = new JButton("Swap"); JButton swapButton = new JButton("Swap");
swapButton.addActionListener(e -> { swapButton.addActionListener(e -> {
@ -137,7 +139,7 @@ public class FunctionReachabilityProvider extends ComponentProvider {
}); });
toAddressField = new JTextField(15); toAddressField = new JTextField(15);
toFunctionLabel = DockingUtils.createNonHtmlLabel(); toFunctionLabel = new GDLabel();
JButton goButton = new JButton("Go"); JButton goButton = new JButton("Go");
goButton.addActionListener(e -> findPaths()); goButton.addActionListener(e -> findPaths());

View File

@ -25,9 +25,9 @@ import javax.swing.border.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import docking.DockingUtils;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.framework.main.DataTreeDialog; import ghidra.framework.main.DataTreeDialog;
import ghidra.framework.model.DomainFile; import ghidra.framework.model.DomainFile;
@ -70,9 +70,7 @@ class EditExternalReferencePanel extends EditReferencePanel {
topPanel.setBorder( topPanel.setBorder(
new CompoundBorder(new TitledBorder("External Program"), new EmptyBorder(0, 5, 5, 5))); new CompoundBorder(new TitledBorder("External Program"), new EmptyBorder(0, 5, 5, 5)));
JLabel label = DockingUtils.createNonHtmlLabel("Name:"); topPanel.add(new GLabel("Name:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
topPanel.add(label);
extLibName = new GhidraComboBox<>(); extLibName = new GhidraComboBox<>();
extLibName.setEditable(true); extLibName.setEditable(true);
extLibName.addDocumentListener(new DocumentListener() { extLibName.addDocumentListener(new DocumentListener() {
@ -130,24 +128,18 @@ class EditExternalReferencePanel extends EditReferencePanel {
buttonPanel.add(editButton); buttonPanel.add(editButton);
pathPanel.add(buttonPanel, BorderLayout.EAST); pathPanel.add(buttonPanel, BorderLayout.EAST);
label = DockingUtils.createNonHtmlLabel("Path:"); topPanel.add(new GLabel("Path:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
topPanel.add(label);
topPanel.add(pathPanel); topPanel.add(pathPanel);
JPanel bottomPanel = new JPanel(new PairLayout(10, 10, 160)); JPanel bottomPanel = new JPanel(new PairLayout(10, 10, 160));
bottomPanel.setBorder(new CompoundBorder(new TitledBorder("External Reference Data"), bottomPanel.setBorder(new CompoundBorder(new TitledBorder("External Reference Data"),
new EmptyBorder(0, 5, 5, 5))); new EmptyBorder(0, 5, 5, 5)));
label = DockingUtils.createNonHtmlLabel("Label:"); bottomPanel.add(new GLabel("Label:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
bottomPanel.add(label);
extLabel = new JTextField(); extLabel = new JTextField();
bottomPanel.add(extLabel); bottomPanel.add(extLabel);
label = DockingUtils.createNonHtmlLabel("Address:"); bottomPanel.add(new GLabel("Address:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
bottomPanel.add(label);
extAddr = new AddressInput(); extAddr = new AddressInput();
bottomPanel.add(extAddr); bottomPanel.add(extAddr);

View File

@ -30,8 +30,9 @@ import javax.swing.table.AbstractTableModel;
import org.jdom.Element; import org.jdom.Element;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.program.model.address.*; import ghidra.program.model.address.*;
import ghidra.program.model.listing.*; import ghidra.program.model.listing.*;
@ -103,7 +104,7 @@ class EditMemoryReferencePanel extends EditReferencePanel {
}); });
offsetField = new JTextField(); offsetField = new JTextField();
addrLabel = DockingUtils.createNonHtmlLabel("Base Address:"); addrLabel = new GDLabel("Base Address:");
addrLabel.setHorizontalAlignment(SwingConstants.RIGHT); addrLabel.setHorizontalAlignment(SwingConstants.RIGHT);
Dimension d = addrLabel.getPreferredSize(); Dimension d = addrLabel.getPreferredSize();
addrLabel.setPreferredSize(d); addrLabel.setPreferredSize(d);
@ -142,9 +143,7 @@ class EditMemoryReferencePanel extends EditReferencePanel {
add(addrLabel); add(addrLabel);
add(addrPanel); add(addrPanel);
JLabel label = DockingUtils.createNonHtmlLabel("Ref-Type:"); add(new GLabel("Ref-Type:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
add(label);
add(refTypes); add(refTypes);
enableOffsetField(false); enableOffsetField(false);

View File

@ -17,12 +17,11 @@ package ghidra.app.plugin.core.references;
import java.util.*; import java.util.*;
import javax.swing.JLabel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
import ghidra.program.model.lang.Register; import ghidra.program.model.lang.Register;
import ghidra.program.model.listing.*; import ghidra.program.model.listing.*;
@ -60,14 +59,9 @@ class EditRegisterReferencePanel extends EditReferencePanel {
refTypes = new GhidraComboBox<>(REGISTER_REF_TYPES); refTypes = new GhidraComboBox<>(REGISTER_REF_TYPES);
JLabel label = DockingUtils.createNonHtmlLabel("Register:"); add(new GLabel("Register:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
add(label);
add(regList); add(regList);
add(new GLabel("Ref-Type:", SwingConstants.RIGHT));
label = DockingUtils.createNonHtmlLabel("Ref-Type:");
label.setHorizontalAlignment(SwingConstants.RIGHT);
add(label);
add(refTypes); add(refTypes);
} }

View File

@ -15,11 +15,12 @@
*/ */
package ghidra.app.plugin.core.references; package ghidra.app.plugin.core.references;
import javax.swing.*; import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import docking.DockingUtils;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.cmd.function.CallDepthChangeInfo; import ghidra.app.cmd.function.CallDepthChangeInfo;
import ghidra.program.model.address.AddressSpace; import ghidra.program.model.address.AddressSpace;
import ghidra.program.model.listing.*; import ghidra.program.model.listing.*;
@ -60,14 +61,9 @@ class EditStackReferencePanel extends EditReferencePanel {
refTypes = new GhidraComboBox<>(STACK_REF_TYPES); refTypes = new GhidraComboBox<>(STACK_REF_TYPES);
JLabel label = DockingUtils.createNonHtmlLabel("Stack Offset:"); add(new GLabel("Stack Offset:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
add(label);
add(stackOffset); add(stackOffset);
add(new GLabel("Ref-Type:", SwingConstants.RIGHT));
label = DockingUtils.createNonHtmlLabel("Ref-Type:");
label.setHorizontalAlignment(SwingConstants.RIGHT);
add(label);
add(refTypes); add(refTypes);
} }

View File

@ -27,11 +27,11 @@ import javax.swing.border.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils;
import docking.action.DockingAction; import docking.action.DockingAction;
import docking.dnd.DropTgtAdapter; import docking.dnd.DropTgtAdapter;
import docking.dnd.Droppable; import docking.dnd.Droppable;
import docking.util.KeyBindingUtils; import docking.util.KeyBindingUtils;
import docking.widgets.label.GDLabel;
import ghidra.app.util.*; import ghidra.app.util.*;
import ghidra.app.util.viewer.field.BrowserCodeUnitFormat; import ghidra.app.util.viewer.field.BrowserCodeUnitFormat;
import ghidra.program.model.address.Address; import ghidra.program.model.address.Address;
@ -217,21 +217,21 @@ class InstructionPanel extends JPanel implements ChangeListener {
Border border = new TitledBorder(new EtchedBorder(), "Source"); Border border = new TitledBorder(new EtchedBorder(), "Source");
setBorder(border); setBorder(border);
addressLabel = DockingUtils.createNonHtmlLabel("FFFFFFFF"); // use a default addressLabel = new GDLabel("FFFFFFFF"); // use a default
Font font = addressLabel.getFont(); Font font = addressLabel.getFont();
monoFont = new Font("monospaced", font.getStyle(), font.getSize()); monoFont = new Font("monospaced", font.getStyle(), font.getSize());
addressLabel.setFont(monoFont); addressLabel.setFont(monoFont);
addressLabel.setName("addressLabel"); addressLabel.setName("addressLabel");
mnemonicLabel = DockingUtils.createNonHtmlLabel("movl"); mnemonicLabel = new GDLabel("movl");
mnemonicLabel.setFont(monoFont); mnemonicLabel.setFont(monoFont);
mnemonicLabel.setName("mnemonicLabel"); mnemonicLabel.setName("mnemonicLabel");
mnemonicLabel.addMouseListener(mouseListener); mnemonicLabel.addMouseListener(mouseListener);
operandLabels = new JLabel[Program.MAX_OPERANDS]; operandLabels = new JLabel[Program.MAX_OPERANDS];
for (int i = 0; i < operandLabels.length; i++) { for (int i = 0; i < operandLabels.length; i++) {
operandLabels[i] = DockingUtils.createNonHtmlLabel("%ebp, "); operandLabels[i] = new GDLabel("%ebp, ");
operandLabels[i].setName("operandLabels[" + i + "]"); operandLabels[i].setName("operandLabels[" + i + "]");
operandLabels[i].setFont(monoFont); operandLabels[i].setFont(monoFont);
operandLabels[i].addMouseListener(mouseListener); operandLabels[i].addMouseListener(mouseListener);

View File

@ -23,7 +23,8 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -145,17 +146,14 @@ public class OffsetTableDialog extends DialogComponentProvider {
addrInput.setAddressFactory(addrFactory); addrInput.setAddressFactory(addrFactory);
addrInput.setAddress(defaultAddress); addrInput.setAddress(defaultAddress);
JLabel label = DockingUtils.createNonHtmlLabel("Enter Base Address:", SwingConstants.RIGHT); panel.add(new GLabel("Enter Base Address:", SwingConstants.RIGHT));
panel.add(label);
panel.add(addrInput); panel.add(addrInput);
JLabel sizeLabel = comboBox = new GComboBox<>(new String[] { "1", "2", "4", "8" });
DockingUtils.createNonHtmlLabel("Select Data Size (Bytes):", SwingConstants.RIGHT);
comboBox = new JComboBox<>(new String[] { "1", "2", "4", "8" });
int pointerSize = defaultAddress.getPointerSize(); int pointerSize = defaultAddress.getPointerSize();
comboBox.setSelectedItem(Integer.toString(pointerSize)); comboBox.setSelectedItem(Integer.toString(pointerSize));
panel.add(sizeLabel); panel.add(new GLabel("Select Data Size (Bytes):", SwingConstants.RIGHT));
panel.add(comboBox); panel.add(comboBox);
signedCheckBox = new JCheckBox("Signed Data Value(s)", true); signedCheckBox = new JCheckBox("Signed Data Value(s)", true);

View File

@ -22,7 +22,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.app.util.bean.FixedBitSizeValueField; import ghidra.app.util.bean.FixedBitSizeValueField;
import ghidra.program.model.address.*; import ghidra.program.model.address.*;
@ -50,10 +50,6 @@ class EditRegisterValueDialog extends DialogComponentProvider {
private JComponent buildWorkPanel(Register register, Address start, Address end, private JComponent buildWorkPanel(Register register, Address start, Address end,
BigInteger value, AddressFactory factory) { BigInteger value, AddressFactory factory) {
JLabel regLabel = DockingUtils.createNonHtmlLabel("Register:");
JLabel startAddrLabel = DockingUtils.createNonHtmlLabel("Start Address:");
JLabel endAddrLabel = DockingUtils.createNonHtmlLabel("End Address:");
JLabel valueLabel = DockingUtils.createNonHtmlLabel("Value:");
JTextField registerField = JTextField registerField =
new JTextField(register.getName() + " (" + register.getBitLength() + ")"); new JTextField(register.getName() + " (" + register.getBitLength() + ")");
@ -80,13 +76,13 @@ class EditRegisterValueDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new PairLayout(5, 1)); JPanel panel = new JPanel(new PairLayout(5, 1));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(regLabel); panel.add(new GLabel("Register:"));
panel.add(registerField); panel.add(registerField);
panel.add(startAddrLabel); panel.add(new GLabel("Start Address:"));
panel.add(startAddrField); panel.add(startAddrField);
panel.add(endAddrLabel); panel.add(new GLabel("End Address:"));
panel.add(endAddrField); panel.add(endAddrField);
panel.add(valueLabel); panel.add(new GLabel("Value:"));
panel.add(registerValueField); panel.add(registerValueField);
return panel; return panel;

View File

@ -26,7 +26,8 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.bean.FixedBitSizeValueField; import ghidra.app.util.bean.FixedBitSizeValueField;
import ghidra.program.model.address.*; import ghidra.program.model.address.*;
import ghidra.program.model.lang.Register; import ghidra.program.model.lang.Register;
@ -74,12 +75,7 @@ public class SetRegisterValueDialog extends DialogComponentProvider {
} }
private JComponent buildWorkPanel(Register[] registers) { private JComponent buildWorkPanel(Register[] registers) {
JLabel regLabel = DockingUtils.createNonHtmlLabel("Register:"); registerComboBox = new GComboBox<>(wrapRegisters(registers));
JLabel valueLabel = DockingUtils.createNonHtmlLabel("Value:");
JLabel addressLabel = DockingUtils.createNonHtmlLabel("Address(es):");
addressLabel.setVerticalAlignment(SwingConstants.TOP);
registerComboBox = new JComboBox<>(wrapRegisters(registers));
Font f = registerComboBox.getFont().deriveFont(13f); Font f = registerComboBox.getFont().deriveFont(13f);
registerComboBox.setFont(f); registerComboBox.setFont(f);
registerValueField = new FixedBitSizeValueField(32, true, false); registerValueField = new FixedBitSizeValueField(32, true, false);
@ -114,15 +110,17 @@ public class SetRegisterValueDialog extends DialogComponentProvider {
gbc.insets = new Insets(5, 5, 1, 5); gbc.insets = new Insets(5, 5, 1, 5);
gbc.gridx = 0; gbc.gridx = 0;
gbc.gridy = 0; gbc.gridy = 0;
panel.add(regLabel, gbc); panel.add(new GLabel("Register:"), gbc);
gbc.gridy = 1; gbc.gridy = 1;
if (useValueField) { if (useValueField) {
panel.add(valueLabel, gbc); panel.add(new GLabel("Value:"), gbc);
} }
gbc.gridy = 2; gbc.gridy = 2;
gbc.anchor = GridBagConstraints.NORTHWEST; gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.insets = new Insets(10, 5, 1, 5); gbc.insets = new Insets(10, 5, 1, 5);
GLabel addressLabel = new GLabel("Address(es):");
addressLabel.setVerticalAlignment(SwingConstants.TOP);
panel.add(addressLabel, gbc); panel.add(addressLabel, gbc);
gbc.insets = new Insets(5, 5, 1, 5); gbc.insets = new Insets(5, 5, 1, 5);

View File

@ -21,8 +21,10 @@ import java.awt.Component;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import docking.*; import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.help.HelpService; import docking.help.HelpService;
import docking.widgets.label.GLabel;
import docking.widgets.textfield.IntegerTextField; import docking.widgets.textfield.IntegerTextField;
import ghidra.app.plugin.core.scalartable.RangeFilterTextField.FilterType; import ghidra.app.plugin.core.scalartable.RangeFilterTextField.FilterType;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -325,13 +327,13 @@ public class ScalarSearchDialog extends DialogComponentProvider {
setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
add(Box.createHorizontalStrut(4)); add(Box.createHorizontalStrut(4));
add(DockingUtils.createNonHtmlLabel("Min:")); add(new GLabel("Min:"));
add(Box.createHorizontalStrut(5)); add(Box.createHorizontalStrut(5));
add(createMinFilterWidget()); add(createMinFilterWidget());
add(Box.createHorizontalStrut(10)); add(Box.createHorizontalStrut(10));
add(DockingUtils.createNonHtmlLabel("Max:")); add(new GLabel("Max:"));
add(Box.createHorizontalStrut(5)); add(Box.createHorizontalStrut(5));
add(createMaxFilterWidget()); add(createMaxFilterWidget());
} }

View File

@ -26,6 +26,7 @@ import docking.*;
import docking.action.*; import docking.action.*;
import docking.help.HelpService; import docking.help.HelpService;
import docking.tool.util.DockingToolConstants; import docking.tool.util.DockingToolConstants;
import docking.widgets.label.GLabel;
import docking.widgets.table.GTableFilterPanel; import docking.widgets.table.GTableFilterPanel;
import docking.widgets.table.TableFilter; import docking.widgets.table.TableFilter;
import ghidra.app.events.ProgramSelectionPluginEvent; import ghidra.app.events.ProgramSelectionPluginEvent;
@ -331,7 +332,7 @@ public class ScalarSearchProvider extends ComponentProviderAdapter
setBorder(lowerBorder); setBorder(lowerBorder);
add(Box.createHorizontalStrut(4)); add(Box.createHorizontalStrut(4));
add(DockingUtils.createNonHtmlLabel("Min:")); add(new GLabel("Min:"));
add(Box.createHorizontalStrut(19)); add(Box.createHorizontalStrut(19));
minField = createFilterWidget(FilterType.MIN); minField = createFilterWidget(FilterType.MIN);
@ -339,7 +340,7 @@ public class ScalarSearchProvider extends ComponentProviderAdapter
add(Box.createHorizontalStrut(10)); add(Box.createHorizontalStrut(10));
add(DockingUtils.createNonHtmlLabel("Max:")); add(new GLabel("Max:"));
add(Box.createHorizontalStrut(5)); add(Box.createHorizontalStrut(5));
maxField = createFilterWidget(FilterType.MAX); maxField = createFilterWidget(FilterType.MAX);
add(maxField.getComponent()); add(maxField.getComponent());

View File

@ -21,6 +21,7 @@ import java.awt.Component;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.*;
import docking.widgets.label.GLabel;
import ghidra.framework.plugintool.Plugin; import ghidra.framework.plugintool.Plugin;
import ghidra.util.HelpLocation; import ghidra.util.HelpLocation;
import ghidra.util.ReservedKeyBindings; import ghidra.util.ReservedKeyBindings;
@ -34,7 +35,6 @@ class KeyBindingInputDialog extends DialogComponentProvider implements KeyEntryL
Plugin plugin, HelpLocation help) { Plugin plugin, HelpLocation help) {
super("Assign Script Key Binding", true, true, true, false); super("Assign Script Key Binding", true, true, true, false);
JLabel label = DockingUtils.createNonHtmlLabel(scriptName);
kbField = new KeyEntryTextField(20, this); kbField = new KeyEntryTextField(20, this);
kbField.setName("KEY_BINDING"); kbField.setName("KEY_BINDING");
kbField.setText( kbField.setText(
@ -42,7 +42,7 @@ class KeyBindingInputDialog extends DialogComponentProvider implements KeyEntryL
JPanel panel = new JPanel(new BorderLayout(10, 10)); JPanel panel = new JPanel(new BorderLayout(10, 10));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(label, BorderLayout.NORTH); panel.add(new GLabel(scriptName), BorderLayout.NORTH);
panel.add(kbField, BorderLayout.CENTER); panel.add(kbField, BorderLayout.CENTER);
addWorkPanel(panel); addWorkPanel(panel);

View File

@ -25,8 +25,10 @@ import javax.swing.*;
import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionListener;
import docking.*; import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.MultiLineLabel; import docking.widgets.MultiLineLabel;
import docking.widgets.label.GLabel;
import docking.widgets.list.ListPanel; import docking.widgets.list.ListPanel;
import generic.jar.ResourceFile; import generic.jar.ResourceFile;
import generic.util.Path; import generic.util.Path;
@ -99,12 +101,11 @@ public class SaveDialog extends DialogComponentProvider implements ListSelection
} }
private JPanel buildNamePanel() { private JPanel buildNamePanel() {
JLabel label = DockingUtils.createNonHtmlLabel("Enter script file name:");
nameField = new JTextField(20); nameField = new JTextField(20);
nameField.setText(scriptFile == null ? "" : scriptFile.getName()); nameField.setText(scriptFile == null ? "" : scriptFile.getName());
JPanel panel = new JPanel(new BorderLayout(10, 10)); JPanel panel = new JPanel(new BorderLayout(10, 10));
panel.add(label, BorderLayout.NORTH); panel.add(new GLabel("Enter script file name:"), BorderLayout.NORTH);
panel.add(nameField, BorderLayout.CENTER); panel.add(nameField, BorderLayout.CENTER);
return panel; return panel;
} }

View File

@ -27,7 +27,8 @@ import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import docking.DockingUtils; import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel;
import ghidra.util.StringUtilities; import ghidra.util.StringUtilities;
public class AsciiSearchFormat extends SearchFormat { public class AsciiSearchFormat extends SearchFormat {
@ -55,9 +56,9 @@ public class AsciiSearchFormat extends SearchFormat {
changeListener.stateChanged(new ChangeEvent(this)); changeListener.stateChanged(new ChangeEvent(this));
} }
}; };
searchType = DockingUtils.createNonHtmlLabel("Encoding: "); searchType = new GDLabel("Encoding: ");
encodingCB = new JComboBox<>(supportedCharsets); encodingCB = new GComboBox<>(supportedCharsets);
encodingCB.setName("Encoding Options"); encodingCB.setName("Encoding Options");
encodingCB.setSelectedIndex(0); encodingCB.setSelectedIndex(0);
encodingCB.addActionListener(al); encodingCB.addActionListener(al);

View File

@ -28,6 +28,8 @@ import javax.swing.text.*;
import docking.*; import docking.*;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.util.*; import ghidra.util.*;
@ -294,10 +296,8 @@ class MemSearchDialog extends DialogComponentProvider {
JPanel labelPanel = new JPanel(); JPanel labelPanel = new JPanel();
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
labelPanel.setLayout(new GridLayout(0, 1)); labelPanel.setLayout(new GridLayout(0, 1));
JLabel valueLabel = DockingUtils.createNonHtmlLabel("Search Value: "); labelPanel.add(new GLabel("Search Value: "));
labelPanel.add(valueLabel); labelPanel.add(new GLabel("Hex Sequence: "));
JLabel hexSeqLabel = DockingUtils.createNonHtmlLabel("Hex Sequence: ");
labelPanel.add(hexSeqLabel);
JPanel inputPanel = new JPanel(); JPanel inputPanel = new JPanel();
inputPanel.setLayout(new GridLayout(0, 1)); inputPanel.setLayout(new GridLayout(0, 1));
@ -315,7 +315,7 @@ class MemSearchDialog extends DialogComponentProvider {
}); });
inputPanel.add(valueComboBox); inputPanel.add(valueComboBox);
hexSeqField = DockingUtils.createNonHtmlLabel(); hexSeqField = new GDLabel();
hexSeqField.setName("HexSequenceField"); hexSeqField.setName("HexSequenceField");
hexSeqField.setBorder(BorderFactory.createLoweredBevelBorder()); hexSeqField.setBorder(BorderFactory.createLoweredBevelBorder());
inputPanel.add(hexSeqField); inputPanel.add(hexSeqField);
@ -468,7 +468,7 @@ class MemSearchDialog extends DialogComponentProvider {
} }
private Component buildAlignmentPanel() { private Component buildAlignmentPanel() {
alignLabel = DockingUtils.createNonHtmlLabel("Alignment: "); alignLabel = new GDLabel("Alignment: ");
alignField = new JTextField(5); alignField = new JTextField(5);
alignField.setName("Alignment"); alignField.setName("Alignment");
alignField.setText("0"); alignField.setText("0");

View File

@ -27,6 +27,7 @@ import javax.swing.text.*;
import docking.*; import docking.*;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.program.util.*; import ghidra.program.util.*;
@ -216,7 +217,6 @@ class SearchTextDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createEmptyBorder(4, 4, 10, 4)); panel.setBorder(BorderFactory.createEmptyBorder(4, 4, 10, 4));
panel.setLayout(new BorderLayout()); panel.setLayout(new BorderLayout());
JLabel searchLabel = DockingUtils.createNonHtmlLabel("Search for:");
valueComboBox = new GhidraComboBox<>(); valueComboBox = new GhidraComboBox<>();
valueComboBox.setEditable(true); valueComboBox.setEditable(true);
valueField = (JTextField) valueComboBox.getEditor().getEditorComponent(); valueField = (JTextField) valueComboBox.getEditor().getEditorComponent();
@ -240,7 +240,7 @@ class SearchTextDialog extends DialogComponentProvider {
JPanel searchPanel = new JPanel(); JPanel searchPanel = new JPanel();
BoxLayout bl = new BoxLayout(searchPanel, BoxLayout.X_AXIS); BoxLayout bl = new BoxLayout(searchPanel, BoxLayout.X_AXIS);
searchPanel.setLayout(bl); searchPanel.setLayout(bl);
searchPanel.add(searchLabel); searchPanel.add(new GLabel("Search for:"));
searchPanel.add(Box.createHorizontalStrut(5)); searchPanel.add(Box.createHorizontalStrut(5));
searchPanel.add(valueComboBox); searchPanel.add(valueComboBox);
JPanel outerPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); JPanel outerPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));

View File

@ -22,7 +22,9 @@ import java.math.BigInteger;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.ComponentProvider;
import docking.DialogComponentProvider;
import docking.widgets.label.GLabel;
import docking.widgets.textfield.IntegerTextField; import docking.widgets.textfield.IntegerTextField;
import ghidra.app.nav.Navigatable; import ghidra.app.nav.Navigatable;
import ghidra.app.nav.NavigationUtils; import ghidra.app.nav.NavigationUtils;
@ -90,13 +92,13 @@ class SelectBlockDialog extends DialogComponentProvider {
gbc.gridx = 0; gbc.gridx = 0;
gbc.gridy = 0; gbc.gridy = 0;
main.add(DockingUtils.createNonHtmlLabel("Ending Address:"), gbc); main.add(new GLabel("Ending Address:"), gbc);
gbc.gridx++; gbc.gridx++;
toAddressField = new JTextField(10); toAddressField = new JTextField(10);
main.add(toAddressField, gbc); main.add(toAddressField, gbc);
gbc.gridx = 0; gbc.gridx = 0;
gbc.gridy++; gbc.gridy++;
main.add(DockingUtils.createNonHtmlLabel("Length: "), gbc); main.add(new GLabel("Length: "), gbc);
gbc.gridx++; gbc.gridx++;
numberInputField = new IntegerTextField(10); numberInputField = new IntegerTextField(10);
numberInputField.setMaxValue(BigInteger.valueOf(Integer.MAX_VALUE)); numberInputField.setMaxValue(BigInteger.valueOf(Integer.MAX_VALUE));

View File

@ -25,9 +25,9 @@ import javax.swing.*;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.options.editor.ButtonPanelFactory; import docking.options.editor.ButtonPanelFactory;
import docking.widgets.filechooser.GhidraFileChooser; import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.label.GLabel;
import docking.widgets.textfield.IntegerTextField; import docking.widgets.textfield.IntegerTextField;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.program.model.address.AddressSetView; import ghidra.program.model.address.AddressSetView;
@ -179,7 +179,7 @@ public class SearchStringDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new PairLayout(10, 2)); JPanel panel = new JPanel(new PairLayout(10, 2));
JLabel minLengthLabel = DockingUtils.createNonHtmlLabel("Minimum Length: "); JLabel minLengthLabel = new GLabel("Minimum Length: ");
minLengthLabel.setName("minLen"); minLengthLabel.setName("minLen");
minLengthLabel.setToolTipText("<html>Searches for valid ascii or ascii unicode strings " + minLengthLabel.setToolTipText("<html>Searches for valid ascii or ascii unicode strings " +
"greater or equal to minimum search length.<br> The null characters are not included " + "greater or equal to minimum search length.<br> The null characters are not included " +
@ -190,7 +190,7 @@ public class SearchStringDialog extends DialogComponentProvider {
minLengthField.getComponent().setName("minDefault"); minLengthField.getComponent().setName("minDefault");
panel.add(minLengthField.getComponent()); panel.add(minLengthField.getComponent());
JLabel alignLabel = DockingUtils.createNonHtmlLabel("Alignment: "); JLabel alignLabel = new GLabel("Alignment: ");
alignLabel.setName("alignment"); alignLabel.setName("alignment");
alignLabel.setToolTipText( alignLabel.setToolTipText(
"<html>Searches for strings that start on the given alignment<br>" + "<html>Searches for strings that start on the given alignment<br>" +
@ -213,7 +213,7 @@ public class SearchStringDialog extends DialogComponentProvider {
*/ */
private void createModelFieldPanel(JPanel panel) { private void createModelFieldPanel(JPanel panel) {
JLabel modelLabel = DockingUtils.createNonHtmlLabel("Word Model: "); JLabel modelLabel = new GLabel("Word Model: ");
modelLabel.setName("wordModel"); modelLabel.setName("wordModel");
modelLabel.setToolTipText( modelLabel.setToolTipText(
"<html>" + "Strings Analyzer model used to detect high-confidence words.<br> " + "<html>" + "Strings Analyzer model used to detect high-confidence words.<br> " +

View File

@ -25,6 +25,7 @@ import javax.swing.*;
import docking.ActionContext; import docking.ActionContext;
import docking.DockingUtils; import docking.DockingUtils;
import docking.action.*; import docking.action.*;
import docking.widgets.label.GLabel;
import docking.widgets.table.*; import docking.widgets.table.*;
import docking.widgets.table.threaded.ThreadedTableModel; import docking.widgets.table.threaded.ThreadedTableModel;
import docking.widgets.textfield.IntegerTextField; import docking.widgets.textfield.IntegerTextField;
@ -377,12 +378,10 @@ public class StringTableProvider extends ComponentProviderAdapter implements Dom
} }
private Component buildOffsetPanel() { private Component buildOffsetPanel() {
JLabel offsetLabel = DockingUtils.createNonHtmlLabel("Offset: ");
offsetField = new IntegerTextField(4, 0L); offsetField = new IntegerTextField(4, 0L);
offsetField.setAllowNegativeValues(false); offsetField.setAllowNegativeValues(false);
offsetField.addChangeListener(e -> updatePreview()); offsetField.addChangeListener(e -> updatePreview());
JLabel previewLabel = DockingUtils.createNonHtmlLabel("Preview: ");
preview = new JTextField(5); preview = new JTextField(5);
preview.setEditable(false); preview.setEditable(false);
preview.setEnabled(false); preview.setEnabled(false);
@ -402,7 +401,7 @@ public class StringTableProvider extends ComponentProviderAdapter implements Dom
panel.add(Box.createHorizontalStrut(60), gbc); panel.add(Box.createHorizontalStrut(60), gbc);
gbc.gridx = 2; gbc.gridx = 2;
panel.add(offsetLabel, gbc); panel.add(new GLabel("Offset: "), gbc);
gbc.gridx = 3; gbc.gridx = 3;
panel.add(offsetField.getComponent(), gbc); panel.add(offsetField.getComponent(), gbc);
@ -411,7 +410,7 @@ public class StringTableProvider extends ComponentProviderAdapter implements Dom
panel.add(Box.createHorizontalStrut(20), gbc); panel.add(Box.createHorizontalStrut(20), gbc);
gbc.gridx = 5; gbc.gridx = 5;
panel.add(previewLabel, gbc); panel.add(new GLabel("Preview: "), gbc);
gbc.weightx = 1; gbc.weightx = 1;
gbc.gridx = 6; gbc.gridx = 6;

View File

@ -25,11 +25,12 @@ import javax.swing.border.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import docking.DockingUtils;
import docking.DockingWindowManager; import docking.DockingWindowManager;
import docking.ToolTipManager; import docking.ToolTipManager;
import docking.widgets.OptionDialog; import docking.widgets.OptionDialog;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
import ghidra.app.util.NamespaceUtils; import ghidra.app.util.NamespaceUtils;
import ghidra.framework.main.AppInfo; import ghidra.framework.main.AppInfo;
@ -120,9 +121,7 @@ class EditExternalLocationPanel extends JPanel {
topPanel.setBorder( topPanel.setBorder(
new CompoundBorder(new TitledBorder("External Program"), new EmptyBorder(0, 5, 5, 5))); new CompoundBorder(new TitledBorder("External Program"), new EmptyBorder(0, 5, 5, 5)));
JLabel label = DockingUtils.createNonHtmlLabel("Name:"); topPanel.add(new GLabel("Name:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
topPanel.add(label);
extLibNameComboBox = new GhidraComboBox<>(); extLibNameComboBox = new GhidraComboBox<>();
extLibNameComboBox.setEditable(true); extLibNameComboBox.setEditable(true);
nameDocumentListener = new DocumentListener() { nameDocumentListener = new DocumentListener() {
@ -170,38 +169,28 @@ class EditExternalLocationPanel extends JPanel {
buttonPanel.add(editButton); buttonPanel.add(editButton);
pathPanel.add(buttonPanel, BorderLayout.EAST); pathPanel.add(buttonPanel, BorderLayout.EAST);
label = DockingUtils.createNonHtmlLabel("Path:"); topPanel.add(new GLabel("Path:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
topPanel.add(label);
topPanel.add(pathPanel); topPanel.add(pathPanel);
JPanel bottomPanel = new JPanel(new PairLayout(10, 10, 160)); JPanel bottomPanel = new JPanel(new PairLayout(10, 10, 160));
bottomPanel.setBorder( bottomPanel.setBorder(
new CompoundBorder(new TitledBorder("External Location"), new EmptyBorder(0, 5, 5, 5))); new CompoundBorder(new TitledBorder("External Location"), new EmptyBorder(0, 5, 5, 5)));
label = DockingUtils.createNonHtmlLabel("Type:"); bottomPanel.add(new GLabel("Type:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
bottomPanel.add(label);
extTypeLabel = DockingUtils.createNonHtmlLabel("Function"); extTypeLabel = new GDLabel("Function");
bottomPanel.add(extTypeLabel); bottomPanel.add(extTypeLabel);
label = DockingUtils.createNonHtmlLabel("Label:"); bottomPanel.add(new GDLabel("Label:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
bottomPanel.add(label);
extLabelTextField = new JTextField(); extLabelTextField = new JTextField();
bottomPanel.add(extLabelTextField); bottomPanel.add(extLabelTextField);
label = DockingUtils.createNonHtmlLabel("Address:"); bottomPanel.add(new GLabel("Address:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
bottomPanel.add(label);
extAddressInputWidget = new AddressInput(); extAddressInputWidget = new AddressInput();
bottomPanel.add(extAddressInputWidget); bottomPanel.add(extAddressInputWidget);
if (startingOriginalName != null) { if (startingOriginalName != null) {
label = DockingUtils.createNonHtmlLabel("Original Label:"); bottomPanel.add(new GLabel("Original Label:", SwingConstants.RIGHT));
label.setHorizontalAlignment(SwingConstants.RIGHT);
bottomPanel.add(label);
bottomPanel.add(buildOriginalLableFieldAndRestoreButton()); bottomPanel.add(buildOriginalLableFieldAndRestoreButton());
} }

View File

@ -24,7 +24,10 @@ import javax.swing.*;
import org.jdom.Element; import org.jdom.Element;
import docking.*; import docking.ComponentProvider;
import docking.DialogComponentProvider;
import docking.widgets.label.GHtmlLabel;
import docking.widgets.label.GIconLabel;
import ghidra.app.util.HelpTopics; import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
import ghidra.util.*; import ghidra.util.*;
@ -160,16 +163,15 @@ public class FilterDialog extends DialogComponentProvider {
JPanel infoPanel = new JPanel(new HorizontalLayout(20)); JPanel infoPanel = new JPanel(new HorizontalLayout(20));
Icon icon = ResourceManager.loadImage("images/information.png"); Icon icon = ResourceManager.loadImage("images/information.png");
JLabel infoLabel = DockingUtils.createHtmlLabel( infoPanel.add(new GIconLabel(icon));
infoPanel.add(new GHtmlLabel(
HTMLUtilities.toHTML("Advanced filters do not apply to all symbol types.\n" + HTMLUtilities.toHTML("Advanced filters do not apply to all symbol types.\n" +
"All symbols without applicable advanced filters will\n" + "All symbols without applicable advanced filters will\n" +
"be included. If more than one advanced filter is\n" + "be included. If more than one advanced filter is\n" +
"applicable to a symbol type, then those symbols will\n" + "applicable to a symbol type, then those symbols will\n" +
"be included if any of the applicable filters match. \n" + "be included if any of the applicable filters match. \n" +
"Filters that are not applicable to any of the selected\n" + "Filters that are not applicable to any of the selected\n" +
"symbol types are disabled.")); "symbol types are disabled.")));
infoPanel.add(DockingUtils.createNonHtmlLabel(icon));
infoPanel.add(infoLabel);
JPanel filtersPanel = new JPanel(new GridLayout(0, 2)); JPanel filtersPanel = new JPanel(new GridLayout(0, 2));
// Border outer = BorderFactory.createEmptyBorder(0,40,0,0); // Border outer = BorderFactory.createEmptyBorder(0,40,0,0);

View File

@ -22,7 +22,9 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import docking.*; import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.label.GLabel;
import resources.ResourceManager; import resources.ResourceManager;
class TipOfTheDayDialog extends DialogComponentProvider { class TipOfTheDayDialog extends DialogComponentProvider {
@ -47,10 +49,6 @@ class TipOfTheDayDialog extends DialogComponentProvider {
ImageIcon tipIcon = ResourceManager.loadImage("images/help-hint.png"); ImageIcon tipIcon = ResourceManager.loadImage("images/help-hint.png");
JLabel label =
DockingUtils.createNonHtmlLabel("Did you know...", tipIcon, SwingConstants.LEFT);
label.setFont(new Font("dialog", Font.BOLD, 12));
tipArea = new JTextArea(4, 30); tipArea = new JTextArea(4, 30);
tipArea.setEditable(false); tipArea.setEditable(false);
tipArea.setFont(new Font("dialog", Font.PLAIN, 12)); tipArea.setFont(new Font("dialog", Font.PLAIN, 12));
@ -98,7 +96,11 @@ class TipOfTheDayDialog extends DialogComponentProvider {
BorderFactory.createLineBorder(Color.BLACK)); BorderFactory.createLineBorder(Color.BLACK));
panel.setBorder(panelBorder); panel.setBorder(panelBorder);
panel.setBackground(Color.WHITE); panel.setBackground(Color.WHITE);
JLabel label = new GLabel("Did you know...", tipIcon, SwingConstants.LEFT);
label.setFont(new Font("dialog", Font.BOLD, 12));
panel.add(label, BorderLayout.NORTH); panel.add(label, BorderLayout.NORTH);
panel.add(tipScroll, BorderLayout.CENTER); panel.add(tipScroll, BorderLayout.CENTER);
JPanel panel2 = new JPanel(new BorderLayout(5, 5)); JPanel panel2 = new JPanel(new BorderLayout(5, 5));

View File

@ -26,7 +26,9 @@ import javax.swing.*;
import javax.swing.table.TableModel; import javax.swing.table.TableModel;
import db.*; import db.*;
import docking.DockingUtils; import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import docking.widgets.table.GTable; import docking.widgets.table.GTable;
import ghidra.app.plugin.debug.dbtable.*; import ghidra.app.plugin.debug.dbtable.*;
import ghidra.util.Msg; import ghidra.util.Msg;
@ -59,11 +61,11 @@ class DbViewerComponent extends JPanel {
JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
JPanel subNorthPanel = new JPanel(new PairLayout(4, 10)); JPanel subNorthPanel = new JPanel(new PairLayout(4, 10));
subNorthPanel.add(DockingUtils.createNonHtmlLabel("Database:")); subNorthPanel.add(new GLabel("Database:"));
dbLabel = DockingUtils.createNonHtmlLabel(); dbLabel = new GDLabel();
subNorthPanel.add(dbLabel); subNorthPanel.add(dbLabel);
subNorthPanel.add(DockingUtils.createNonHtmlLabel("Tables:")); subNorthPanel.add(new GLabel("Tables:"));
combo = new JComboBox<>(); combo = new GComboBox<>();
combo.addActionListener(new ActionListener() { combo.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -226,9 +228,9 @@ class DbViewerComponent extends JPanel {
size += " / " + Integer.toString(stats[1].size / 1024); size += " / " + Integer.toString(stats[1].size / 1024);
} }
} }
JLabel statsLabel = DockingUtils.createNonHtmlLabel( panel.add(new GLabel(
recCnt + " " + intNodeCnt + " " + recNodeCnt + " " + chainBufCnt + " " + size); recCnt + " " + intNodeCnt + " " + recNodeCnt + " " + chainBufCnt + " " + size),
panel.add(statsLabel, BorderLayout.SOUTH); BorderLayout.SOUTH);
return panel; return panel;
} }

View File

@ -22,7 +22,8 @@ import java.text.DecimalFormat;
import javax.swing.*; import javax.swing.*;
import docking.DialogComponentProvider; import docking.DialogComponentProvider;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.util.layout.PairLayout; import ghidra.util.layout.PairLayout;
class ShowMemoryDialog extends DialogComponentProvider { class ShowMemoryDialog extends DialogComponentProvider {
@ -81,18 +82,18 @@ class ShowMemoryDialog extends DialogComponentProvider {
private JComponent createWorkPanel() { private JComponent createWorkPanel() {
JPanel panel = new JPanel(new PairLayout()); JPanel panel = new JPanel(new PairLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
maxMem = DockingUtils.createNonHtmlLabel("00000000000", SwingConstants.RIGHT); maxMem = new GDLabel("00000000000", SwingConstants.RIGHT);
totalMem = DockingUtils.createNonHtmlLabel("00000000000", SwingConstants.RIGHT); totalMem = new GDLabel("00000000000", SwingConstants.RIGHT);
freeMem = DockingUtils.createNonHtmlLabel("00000000000", SwingConstants.RIGHT); freeMem = new GDLabel("00000000000", SwingConstants.RIGHT);
usedMem = DockingUtils.createNonHtmlLabel("00000000000", SwingConstants.RIGHT); usedMem = new GDLabel("00000000000", SwingConstants.RIGHT);
panel.add(DockingUtils.createNonHtmlLabel("Max Memory:")); panel.add(new GLabel("Max Memory:"));
panel.add(maxMem); panel.add(maxMem);
panel.add(DockingUtils.createNonHtmlLabel("Total Memory:")); panel.add(new GLabel("Total Memory:"));
panel.add(totalMem); panel.add(totalMem);
panel.add(DockingUtils.createNonHtmlLabel("Free Memory:")); panel.add(new GLabel("Free Memory:"));
panel.add(freeMem); panel.add(freeMem);
panel.add(DockingUtils.createNonHtmlLabel("Used Memory:")); panel.add(new GLabel("Used Memory:"));
panel.add(usedMem); panel.add(usedMem);
return panel; return panel;

View File

@ -21,7 +21,10 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel;
import generic.util.WindowUtilities; import generic.util.WindowUtilities;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import ghidra.util.NumericUtilities; import ghidra.util.NumericUtilities;
@ -73,7 +76,7 @@ public class AskDialog<T> extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout(10, 10)); JPanel panel = new JPanel(new BorderLayout(10, 10));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
label = DockingUtils.createNonHtmlLabel(message); label = new GDLabel(message);
panel.add(label, BorderLayout.WEST); panel.add(label, BorderLayout.WEST);
if (choices == null) { if (choices == null) {
@ -85,7 +88,7 @@ public class AskDialog<T> extends DialogComponentProvider {
panel.add(textField, BorderLayout.CENTER); panel.add(textField, BorderLayout.CENTER);
} }
else { else {
comboField = new JComboBox<>(choices.toArray(new Object[choices.size()])); comboField = new GComboBox<>(choices.toArray(new Object[choices.size()]));
comboField.setEditable(false); comboField.setEditable(false);
comboField.setName("JComboBox"); comboField.setName("JComboBox");
if (defaultValue != null) { if (defaultValue != null) {

View File

@ -23,9 +23,9 @@ import java.util.HashMap;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JTextField; import javax.swing.JTextField;
import docking.DockingUtils;
import docking.widgets.filechooser.GhidraFileChooserMode; import docking.widgets.filechooser.GhidraFileChooserMode;
import docking.widgets.filechooser.GhidraFileChooserPanel; import docking.widgets.filechooser.GhidraFileChooserPanel;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput; import ghidra.app.util.AddressInput;
public class GatherParamPanel extends JPanel { public class GatherParamPanel extends JPanel {
@ -98,7 +98,7 @@ public class GatherParamPanel extends JPanel {
displayComponent = textField; displayComponent = textField;
parameters.put(key, new ParamComponent(displayComponent, type)); parameters.put(key, new ParamComponent(displayComponent, type));
} }
add(DockingUtils.createNonHtmlLabel(label)); add(new GLabel(label));
add(displayComponent); add(displayComponent);
shown = false; shown = false;
} }

View File

@ -24,7 +24,9 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import docking.*; import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.label.GLabel;
import ghidra.util.Msg; import ghidra.util.Msg;
public class MultipleOptionsDialog<T> extends DialogComponentProvider { public class MultipleOptionsDialog<T> extends DialogComponentProvider {
@ -69,8 +71,7 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
JPanel panel = new JPanel(new GridLayout(0, 1)); JPanel panel = new JPanel(new GridLayout(0, 1));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JLabel label = DockingUtils.createNonHtmlLabel(message); panel.add(new GLabel(message), BorderLayout.WEST);
panel.add(label, BorderLayout.WEST);
if (includeSelectAll) { if (includeSelectAll) {
selectAllGroup = new SelectAllCheckBox(); selectAllGroup = new SelectAllCheckBox();

View File

@ -24,7 +24,8 @@ import javax.swing.border.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import docking.*; import docking.ComponentProvider;
import docking.DialogComponentProvider;
import docking.widgets.combobox.GhidraComboBox; import docking.widgets.combobox.GhidraComboBox;
import ghidra.app.cmd.label.*; import ghidra.app.cmd.label.*;
import ghidra.framework.cmd.CompoundCmd; import ghidra.framework.cmd.CompoundCmd;
@ -427,9 +428,7 @@ public class AddEditDialog extends DialogComponentProvider {
*/ */
private JPanel create() { private JPanel create() {
labelNameChoices = new GhidraComboBox<>(); labelNameChoices = new GhidraComboBox<>();
DockingUtils.turnOffHTMLRendering(labelNameChoices);
GhidraComboBox<NamespaceWrapper> comboBox = new GhidraComboBox<>(); GhidraComboBox<NamespaceWrapper> comboBox = new GhidraComboBox<>();
DockingUtils.turnOffHTMLRendering(comboBox);
comboBox.setEnterKeyForwarding(true); comboBox.setEnterKeyForwarding(true);
namespaceChoices = comboBox; namespaceChoices = comboBox;

View File

@ -25,7 +25,7 @@ import java.util.Comparator;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.*; import javax.swing.event.*;
import docking.DockingUtils; import docking.widgets.combobox.GComboBox;
import ghidra.program.model.address.*; import ghidra.program.model.address.*;
/** /**
@ -67,9 +67,8 @@ public class AddressInput extends JPanel {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
textField = new JTextField(10); textField = new JTextField(10);
textField.setName("JTextField");//for JUnits... textField.setName("JTextField");//for JUnits...
combo = new JComboBox<>(); combo = new GComboBox<>();
combo.setName("JComboBox");//for JUnits... combo.setName("JComboBox");//for JUnits...
DockingUtils.turnOffHTMLRendering(combo);
add(textField, BorderLayout.CENTER); add(textField, BorderLayout.CENTER);
//add(combo, BorderLayout.WEST); //add(combo, BorderLayout.WEST);
comboAdded = false; comboAdded = false;
@ -196,7 +195,7 @@ public class AddressInput extends JPanel {
// We don't want to let users create functions in certain memory spaces (eg: OTHER), // We don't want to let users create functions in certain memory spaces (eg: OTHER),
// so don't populate the model with them. // so don't populate the model with them.
if (!spaces[i].isLoadedMemorySpace()) { if (!spaces[i].isLoadedMemorySpace()) {
//continue; continue;
} }
String s = spaces[i].toString(); String s = spaces[i].toString();

View File

@ -24,7 +24,7 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.*; import javax.swing.event.*;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import ghidra.program.model.address.*; import ghidra.program.model.address.*;
import ghidra.util.layout.MiddleLayout; import ghidra.util.layout.MiddleLayout;
import resources.ResourceManager; import resources.ResourceManager;
@ -63,7 +63,7 @@ public class AddressSetEditorPanel extends JPanel {
private JPanel createAddRangePanel() { private JPanel createAddRangePanel() {
JPanel minAddressPanel = new JPanel(); JPanel minAddressPanel = new JPanel();
minAddressPanel.setLayout(new BorderLayout()); minAddressPanel.setLayout(new BorderLayout());
JLabel minLabel = DockingUtils.createNonHtmlLabel("Min:"); JLabel minLabel = new GDLabel("Min:");
minLabel.setToolTipText("Enter minimum address to add or remove"); minLabel.setToolTipText("Enter minimum address to add or remove");
minAddressPanel.add(minLabel, BorderLayout.WEST); minAddressPanel.add(minLabel, BorderLayout.WEST);
minAddressField = new AddressInput(); minAddressField = new AddressInput();
@ -79,7 +79,7 @@ public class AddressSetEditorPanel extends JPanel {
JPanel maxAddressPanel = new JPanel(); JPanel maxAddressPanel = new JPanel();
maxAddressPanel.setLayout(new BorderLayout()); maxAddressPanel.setLayout(new BorderLayout());
JLabel maxLabel = DockingUtils.createNonHtmlLabel("Max:"); JLabel maxLabel = new GDLabel("Max:");
maxLabel.setToolTipText("Enter maximum address to add or remove"); maxLabel.setToolTipText("Enter maximum address to add or remove");
maxAddressPanel.add(maxLabel, BorderLayout.WEST); maxAddressPanel.add(maxLabel, BorderLayout.WEST);
maxAddressField = new AddressInput(); maxAddressField = new AddressInput();

View File

@ -21,7 +21,7 @@ import java.awt.event.ComponentListener;
import javax.swing.*; import javax.swing.*;
import docking.DockingUtils; import docking.widgets.label.GDLabel;
import ghidra.app.util.viewer.util.AddressPixelMap; import ghidra.app.util.viewer.util.AddressPixelMap;
import ghidra.program.model.mem.MemoryBlock; import ghidra.program.model.mem.MemoryBlock;
@ -94,7 +94,7 @@ public class BlockPanel extends JPanel implements ComponentListener {
} }
for (MemoryBlock block : blocks) { for (MemoryBlock block : blocks) {
JLabel label = DockingUtils.createNonHtmlLabel(block.getName()); JLabel label = new GDLabel(block.getName());
label.setFont(FONT); label.setFont(FONT);
label.setHorizontalAlignment(SwingConstants.CENTER); label.setHorizontalAlignment(SwingConstants.CENTER);
label.setToolTipText(block.getName()); label.setToolTipText(block.getName());

Some files were not shown because too many files have changed in this diff Show More