mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 17:07:41 +08:00
GT-2698 refactor JLabel -> GLabel, JComboBox -> GComboBox, renderers.
This commit is contained in:
+6
-3
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
+4
-4
@@ -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);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -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 " +
|
||||||
|
|||||||
+2
-2
@@ -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 " +
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -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);
|
||||||
|
|||||||
+3
-3
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -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);
|
||||||
|
|||||||
+5
-6
@@ -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
|
||||||
|
|||||||
+5
-6
@@ -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
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
+2
-2
@@ -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();
|
||||||
|
|||||||
+2
-2
@@ -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));
|
||||||
|
|||||||
+2
-2
@@ -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);
|
||||||
|
|||||||
+4
-4
@@ -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);
|
||||||
|
|||||||
+2
-2
@@ -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();
|
||||||
|
|||||||
+6
-8
@@ -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));
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -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;
|
||||||
|
|||||||
+2
-2
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
+2
-3
@@ -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);
|
||||||
|
|||||||
+2
-2
@@ -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
|
||||||
|
|||||||
+6
-6
@@ -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;
|
||||||
|
|||||||
+4
-3
@@ -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));
|
||||||
|
|||||||
+2
-3
@@ -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);
|
||||||
|
|||||||
+2
-1
@@ -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() {
|
||||||
|
|||||||
+2
-2
@@ -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();
|
||||||
|
|||||||
+21
-21
@@ -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) {
|
||||||
|
|||||||
+5
-5
@@ -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));
|
||||||
|
|||||||
+3
-3
@@ -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);
|
||||||
|
|||||||
+6
-7
@@ -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));
|
||||||
|
|||||||
+2
-2
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -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);
|
||||||
|
|
||||||
|
|||||||
+4
-8
@@ -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);
|
||||||
|
|||||||
+2
-2
@@ -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);
|
||||||
|
|||||||
+2
-2
@@ -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 );
|
||||||
//
|
//
|
||||||
|
|||||||
+2
-1
@@ -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);
|
||||||
|
|||||||
+9
-6
@@ -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);
|
||||||
|
|||||||
+3
-3
@@ -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);
|
||||||
|
|||||||
+4
-4
@@ -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());
|
||||||
|
|||||||
+3
-5
@@ -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");
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
|
|||||||
+4
-4
@@ -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;
|
||||||
|
|||||||
+3
-3
@@ -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");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user