GT-2698 - convert JCheckBox to GCheckBox

This commit is contained in:
dev747368 2019-04-16 17:01:51 -04:00
parent 40daea1a56
commit 3c0484cae3
93 changed files with 487 additions and 460 deletions

View File

@ -24,6 +24,7 @@ import javax.swing.*;
import docking.ActionContext;
import docking.action.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.filechooser.GhidraFileChooserPanel;
import docking.widgets.table.GFilterTable;
import ghidra.framework.options.OptionsChangeListener;
@ -47,7 +48,7 @@ public class SampleTableProvider extends ComponentProviderAdapter implements Opt
private SampleTableModel model;
private List<FunctionAlgorithm> discoveredAlgorithms;
private JCheckBox[] checkBoxes;
private GCheckBox[] checkBoxes;
private GhidraFileChooserPanel fileChooserPanel;
@ -94,9 +95,9 @@ public class SampleTableProvider extends ComponentProviderAdapter implements Opt
JPanel checkBoxPanel = new JPanel(new GridLayout(0, 1));
checkBoxPanel.setBorder(BorderFactory.createTitledBorder("Discovered Algorithms"));
checkBoxes = new JCheckBox[discoveredAlgorithms.size()];
checkBoxes = new GCheckBox[discoveredAlgorithms.size()];
for (int i = 0; i < discoveredAlgorithms.size(); i++) {
checkBoxes[i] = new JCheckBox(discoveredAlgorithms.get(i).getName());
checkBoxes[i] = new GCheckBox(discoveredAlgorithms.get(i).getName());
checkBoxPanel.add(checkBoxes[i]);
}

View File

@ -23,6 +23,7 @@ import java.awt.event.ActionListener;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
public class SearchGuiSingle extends SearchBaseExtended {
@ -45,10 +46,10 @@ public class SearchGuiSingle extends SearchBaseExtended {
frame = new JFrame();
jPanel1 = new JPanel();
mnemonicCheckBox = new JCheckBox("Mnemonics", true);
opOneCheckBox = new JCheckBox("Operand 1", false);
opTwoCheckBox = new JCheckBox("Operand 2", false);
constCheckBox = new JCheckBox("Constants", false);
mnemonicCheckBox = new GCheckBox("Mnemonics", true);
opOneCheckBox = new GCheckBox("Operand 1", false);
opTwoCheckBox = new GCheckBox("Operand 2", false);
constCheckBox = new GCheckBox("Constants", false);
searchButton = new JButton();
jLabel1 = new GDLabel();

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,16 +15,17 @@
*/
package ghidra.app.merge.datatypes;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.framework.data.DomainObjectMergeManager;
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.framework.data.DomainObjectMergeManager;
/**
* Panel that shows a conflict for a category; gets user input to resolve
* the conflict.
@ -86,6 +86,7 @@ class CategoryMergePanel extends JPanel {
private void create() {
countPanel = new ConflictCountPanel();
resolvePanel = new CategoryConflictPanel("Resolve Conflict", new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
mergeManager.clearStatusText();
mergeManager.setApplyEnabled(true);
@ -112,7 +113,7 @@ class CategoryMergePanel extends JPanel {
}
private JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString("Category"));
useForAllCB = new GCheckBox(getUseAllString("Category"));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -23,6 +23,7 @@ import java.awt.event.ItemListener;
import javax.swing.*;
import docking.widgets.MultiLineLabel;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel;
@ -200,7 +201,7 @@ class DataTypeMergePanel extends JPanel {
}
private JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString("Data Type"));
useForAllCB = new GCheckBox(getUseAllString("Data Type"));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -23,6 +23,7 @@ import java.awt.event.ItemListener;
import javax.swing.*;
import docking.widgets.MultiLineLabel;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GIconLabel;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.util.ConflictCountPanel;
@ -195,7 +196,7 @@ class SourceArchiveMergePanel extends JPanel {
}
private JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString("Source Archive"));
useForAllCB = new GCheckBox(getUseAllString("Source Archive"));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,6 +19,8 @@ import java.awt.LayoutManager;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
/**
* Abstract class that should be implemented by the conflict panel that appears
* below the 4 listings in the merge window.
@ -76,7 +77,7 @@ public abstract class ConflictPanel extends ChoiceComponent {
public abstract void clear();
protected JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString("unknown"));
useForAllCB = new GCheckBox(getUseAllString("unknown"));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -24,6 +24,7 @@ import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.merge.util.ConflictUtility;
@ -105,7 +106,7 @@ public class VerticalChoicesPanel extends ConflictPanel {
rowPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
JRadioButton rb = new JRadioButton();
JCheckBox cb = new JCheckBox();
JCheckBox cb = new GCheckBox();
indent = Math.max(rb.getPreferredSize().width, cb.getPreferredSize().width);
defaultInsets = new Insets(DEFAULT_TOP, DEFAULT_LEFT, DEFAULT_BOTTOM, DEFAULT_RIGHT);

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,10 +15,6 @@
*/
package ghidra.app.merge.memory;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.ProgramMultiUserMergeManager;
import ghidra.app.merge.util.ConflictCountPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -27,6 +22,11 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.ProgramMultiUserMergeManager;
import ghidra.app.merge.util.ConflictCountPanel;
/**
*
* Panel to resolve conflicts on memory blocks.
@ -111,6 +111,7 @@ class MemoryMergePanel extends JPanel {
cardPanel = new JPanel(cardLayout);
cardPanel.setBorder(BorderFactory.createTitledBorder("Resolve Block Conflict"));
ChangeListener listener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
mergeManager.setApplyEnabled(true);
}
@ -133,7 +134,7 @@ class MemoryMergePanel extends JPanel {
}
private JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString("Memory Block"));
useForAllCB = new GCheckBox(getUseAllString("Memory Block"));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -22,6 +22,7 @@ import java.awt.event.ItemListener;
import javax.swing.*;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import ghidra.app.merge.MergeConstants;
@ -178,7 +179,7 @@ class ConflictPanel extends JPanel {
}
protected JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString("Property"));
useForAllCB = new GCheckBox(getUseAllString("Property"));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,11 +15,6 @@
*/
package ghidra.app.merge.tree;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.ProgramMultiUserMergeManager;
import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.program.model.listing.Program;
import java.awt.CardLayout;
import java.awt.Dimension;
@ -28,6 +22,12 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import ghidra.app.merge.MergeConstants;
import ghidra.app.merge.ProgramMultiUserMergeManager;
import ghidra.app.merge.util.ConflictCountPanel;
import ghidra.program.model.listing.Program;
/**
* Panel for getting user input to resolve tree conflicts.
*
@ -95,8 +95,8 @@ class ProgramTreeMergePanel extends JPanel {
}
else {
currentPanel = conflictsPanel;
conflictsPanel.setNames(resultProgram, name1, name2, origName, !structure1Changed &&
!structure2Changed);
conflictsPanel.setNames(resultProgram, name1, name2, origName,
!structure1Changed && !structure2Changed);
}
countPanel.updateCount(conflictIndex, totalConflicts);
@ -137,6 +137,7 @@ class ProgramTreeMergePanel extends JPanel {
private JPanel createConflictPanel() {
ChangeListener changeListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
mergeManager.clearStatusText();
mergeManager.setApplyEnabled(true);
@ -155,7 +156,7 @@ class ProgramTreeMergePanel extends JPanel {
}
private JCheckBox createUseForAllCheckBox() {
useForAllCB = new JCheckBox(getUseAllString(""));
useForAllCB = new GCheckBox(getUseAllString(""));
useForAllCB.setName(USE_FOR_ALL_CHECKBOX);
return useForAllCB;
}

View File

@ -29,6 +29,7 @@ import javax.swing.*;
import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
@ -143,7 +144,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
commentTextField = new JTextField(20);
commentTextField.addKeyListener(listener);
selectionCB = new JCheckBox("Bookmark Top of Each Selection", hasSelection);
selectionCB = new GCheckBox("Bookmark Top of Each Selection", hasSelection);
selectionCB.setEnabled(false);
if (hasSelection) {
selectionCB.setEnabled(ranges > 1);

View File

@ -22,6 +22,7 @@ import java.util.List;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.HelpTopics;
import ghidra.program.model.listing.*;
@ -31,7 +32,7 @@ import ghidra.util.layout.VerticalLayout;
class FilterDialog extends DialogComponentProvider {
private BookmarkProvider provider;
private JCheckBox[] buttons;
private GCheckBox[] buttons;
private BookmarkType[] types;
FilterDialog(BookmarkProvider provider, Program p) {
@ -52,11 +53,11 @@ class FilterDialog extends DialogComponentProvider {
private JPanel getTypesPanel(Program program) {
BookmarkManager bmMgr = program.getBookmarkManager();
types = bmMgr.getBookmarkTypes();
buttons = new JCheckBox[types.length];
buttons = new GCheckBox[types.length];
JPanel panel = new JPanel(new PairLayout(5, 20));
panel.setBorder(BorderFactory.createTitledBorder("Include Bookmark Types"));
for (int i = 0; i < types.length; i++) {
buttons[i] = new JCheckBox();
buttons[i] = new GCheckBox();
JPanel p = new JPanel(new BorderLayout());
p.add(buttons[i], BorderLayout.WEST);
buttons[i].setSelected(provider.isShowingType(types[i].getTypeString()));

View File

@ -24,6 +24,8 @@ import java.util.List;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.checkbox.GHtmlCheckBox;
import docking.widgets.label.GLabel;
import ghidra.app.context.ListingActionContext;
import ghidra.util.HelpLocation;
@ -120,20 +122,20 @@ public class ClearDialog extends DialogComponentProvider {
BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS);
cbPanel.setLayout(bl);
symbolsCb = new JCheckBox("Symbols");
commentsCb = new JCheckBox(
symbolsCb = new GCheckBox("Symbols");
commentsCb = new GHtmlCheckBox(
"<HTML>Comments <FONT SIZE=\"2\">(does not affect automatic comments)</FONT>");
commentsCb.setVerticalTextPosition(SwingConstants.TOP);
propertiesCb = new JCheckBox("Properties");
codeCb = new JCheckBox("Code");
functionsCb = new JCheckBox("Functions");
registersCb = new JCheckBox("Registers");
equatesCb = new JCheckBox("Equates");
userReferencesCb = new JCheckBox("User-defined References");
analysisReferencesCb = new JCheckBox("Analysis References");
importReferencesCb = new JCheckBox("Import References");
systemReferencesCb = new JCheckBox("Default References");
bookmarksCb = new JCheckBox("Bookmarks");
propertiesCb = new GCheckBox("Properties");
codeCb = new GCheckBox("Code");
functionsCb = new GCheckBox("Functions");
registersCb = new GCheckBox("Registers");
equatesCb = new GCheckBox("Equates");
userReferencesCb = new GCheckBox("User-defined References");
analysisReferencesCb = new GCheckBox("Analysis References");
importReferencesCb = new GCheckBox("Import References");
systemReferencesCb = new GCheckBox("Default References");
bookmarksCb = new GCheckBox("Bookmarks");
symbolsCb.setSelected(true);
symbolsCb.addKeyListener(listener);

View File

@ -22,6 +22,7 @@ import java.awt.event.*;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.app.context.ListingActionContext;
import ghidra.util.HelpLocation;
@ -97,9 +98,9 @@ public class ClearFlowDialog extends DialogComponentProvider {
BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS);
cbPanel.setLayout(bl);
symbolsCb = new JCheckBox("Clear Symbols");
dataCb = new JCheckBox("Clear Data");
repairCb = new JCheckBox("Repair Flow");
symbolsCb = new GCheckBox("Clear Symbols");
dataCb = new GCheckBox("Clear Data");
repairCb = new GCheckBox("Repair Flow");
symbolsCb.setSelected(false);
symbolsCb.addKeyListener(listener);

View File

@ -26,6 +26,7 @@ import javax.swing.text.JTextComponent;
import docking.*;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import ghidra.app.util.viewer.field.AnnotatedStringHandler;
import ghidra.app.util.viewer.field.Annotation;
@ -60,7 +61,7 @@ public class CommentsDialog extends DialogComponentProvider implements KeyListen
private boolean wasChanged;
private boolean enterMode = false;
private JCheckBox enterBox = new JCheckBox("Enter accepts comment", enterMode);
private JCheckBox enterBox = new GCheckBox("Enter accepts comment", enterMode);
{
enterBox.addChangeListener(new ChangeListener() {
@Override

View File

@ -27,6 +27,7 @@ import javax.swing.text.Document;
import docking.ToolTipManager;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import ghidra.program.model.data.Category;
import ghidra.program.model.data.Composite;
@ -275,7 +276,7 @@ public class CompEditorPanel extends CompositeEditorPanel {
private void setupInternallyAligned() {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
internalAlignmentCheckBox = new JCheckBox("Align");
internalAlignmentCheckBox = new GCheckBox("Align");
gridBagConstraints.anchor = GridBagConstraints.LINE_END;
gridBagConstraints.fill = GridBagConstraints.NONE;
gridBagConstraints.gridx = 4;

View File

@ -21,6 +21,7 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.program.model.data.DataOrganizationImpl;
import ghidra.util.layout.PairLayout;
@ -136,7 +137,7 @@ public class DataOrganizationPanel extends JPanel {
}
private void setUpSignedChar() {
charIsSignedCheckbox = new JCheckBox();
charIsSignedCheckbox = new GCheckBox();
charIsSignedCheckbox.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {

View File

@ -18,9 +18,11 @@ package ghidra.app.plugin.core.datamgr.editor;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import javax.swing.ComboBoxModel;
import javax.swing.JPanel;
import docking.ComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.compositeeditor.*;
@ -581,12 +583,12 @@ public class DataTypeEditorManager
@Override
protected void installInlineWidget(JPanel parentPanel) {
inlineCheckBox = new JCheckBox("Inline");
inlineCheckBox = new GCheckBox("Inline");
}
@Override
protected void installNoReturnWidget(JPanel parentPanel) {
noReturnCheckBox = new JCheckBox("No Return");
noReturnCheckBox = new GCheckBox("No Return");
}
@Override

View File

@ -26,6 +26,7 @@ import javax.swing.*;
import docking.*;
import docking.action.ToggleDockingAction;
import docking.action.ToolBarData;
import docking.widgets.checkbox.GHtmlCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.filter.FilterListener;
import docking.widgets.filter.FilterTextField;
@ -389,7 +390,7 @@ class FilterAction extends ToggleDockingAction {
}
private void createCheckBox(String curTypeHtml, String curType, Boolean lEnabled) {
JCheckBox newCheckbox = new JCheckBox(curTypeHtml, lEnabled.booleanValue());
JCheckBox newCheckbox = new GHtmlCheckBox(curTypeHtml, lEnabled.booleanValue());
newCheckbox.setName(curType);
newCheckbox.addKeyListener(listener);
newCheckbox.addItemListener(itemListener);

View File

@ -27,6 +27,7 @@ import docking.ActionContext;
import docking.DialogComponentProvider;
import docking.ToolTipManager;
import docking.action.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
import ghidra.app.events.ProgramSelectionPluginEvent;
@ -192,14 +193,14 @@ public class AddressTableDialog extends DialogComponentProvider {
optPanel.add(alignPanel);
optPanel.add(skipPanel);
selectionButton = new JCheckBox("Search Selection");
selectionButton = new GCheckBox("Search Selection");
selectionButton.setSelected(false);
ToolTipManager.setToolTipText(selectionButton,
"If checked, search only the current selection.");
JPanel searchOptionsWestPanel = new JPanel(new GridLayout(2, 1));
searchOptionsWestPanel.add(selectionButton);
shiftedAddressButton = new JCheckBox("Shifted Addresses");
shiftedAddressButton = new GCheckBox("Shifted Addresses");
boolean allowShiftedAddresses =
plugin.getProgram().getDataTypeManager().getDataOrganization().getPointerShift() != 0;
@ -226,7 +227,7 @@ public class AddressTableDialog extends DialogComponentProvider {
JPanel makeOptionsPanel = new JPanel(new BorderLayout());
makeOptionsPanel.setBorder(BorderFactory.createTitledBorder("Make Table Options"));
autoLabelCB = new JCheckBox("Auto Label");
autoLabelCB = new GCheckBox("Auto Label");
autoLabelCB.setSelected(true);
autoLabelCB.setEnabled(false);
ToolTipManager.setToolTipText(autoLabelCB,

View File

@ -29,6 +29,7 @@ import javax.swing.event.DocumentListener;
import docking.DialogComponentProvider;
import docking.options.editor.ButtonPanelFactory;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.filechooser.GhidraFileChooserMode;
@ -200,7 +201,7 @@ public class ExporterDialog extends DialogComponentProvider implements AddressFa
}
private Component buildSelectionCheckbox() {
selectionCheckBox = new JCheckBox("");
selectionCheckBox = new GCheckBox("");
updateSelectionCheckbox();
return selectionCheckBox;
}

View File

@ -22,6 +22,7 @@ import java.util.List;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -171,7 +172,7 @@ public class EditFunctionSignatureDialog extends DialogComponentProvider {
}
protected void installInlineWidget(JPanel parentPanel) {
inlineCheckBox = new JCheckBox("Inline");
inlineCheckBox = new GCheckBox("Inline");
inlineCheckBox.addChangeListener(e -> {
if (inlineCheckBox.isSelected() && callFixupComboBox != null) {
callFixupComboBox.setSelectedItem(NONE_CHOICE);
@ -181,7 +182,7 @@ public class EditFunctionSignatureDialog extends DialogComponentProvider {
}
protected void installNoReturnWidget(JPanel parentPanel) {
noReturnCheckBox = new JCheckBox("No Return");
noReturnCheckBox = new GCheckBox("No Return");
parentPanel.add(noReturnCheckBox);
}

View File

@ -30,6 +30,7 @@ import javax.swing.table.TableCellEditor;
import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import docking.widgets.table.*;
@ -305,18 +306,18 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
private Component buildTogglePanel() {
JPanel panel = new JPanel(new PairLayout());
varArgsCheckBox = new JCheckBox("Varargs");
varArgsCheckBox = new GCheckBox("Varargs");
varArgsCheckBox.addItemListener(e -> model.setHasVarArgs(varArgsCheckBox.isSelected()));
panel.add(varArgsCheckBox);
inLineCheckBox = new JCheckBox("In Line");
inLineCheckBox = new GCheckBox("In Line");
panel.add(inLineCheckBox);
inLineCheckBox.addItemListener(e -> model.setIsInLine(inLineCheckBox.isSelected()));
inLineCheckBox.setEnabled(model.isInlineAllowed());
noReturnCheckBox = new JCheckBox("No Return");
noReturnCheckBox = new GCheckBox("No Return");
noReturnCheckBox.addItemListener(e -> model.setNoReturn(noReturnCheckBox.isSelected()));
storageCheckBox = new JCheckBox("Use Custom Storage");
storageCheckBox = new GCheckBox("Use Custom Storage");
storageCheckBox.addItemListener(
e -> model.setUseCustomizeStorage(storageCheckBox.isSelected()));
panel.add(noReturnCheckBox);

View File

@ -24,6 +24,7 @@ import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.event.ListDataListener;
import docking.widgets.list.GListCellRenderer;
import generic.util.WindowUtilities;
import ghidra.app.plugin.core.console.CodeCompletion;
@ -407,7 +408,12 @@ class CodeCompletionListSelectionModel extends DefaultListSelectionModel {
*
*
*/
class CodeCompletionListCellRenderer extends DefaultListCellRenderer {
class CodeCompletionListCellRenderer extends GListCellRenderer<CodeCompletion> {
@Override
protected String getItemText(CodeCompletion value) {
return value.getDescription();
}
/**
* Render either a default list cell, or use the one provided.
@ -416,12 +422,11 @@ class CodeCompletionListCellRenderer extends DefaultListCellRenderer {
* Otherwise, we use the DefaultListCellRenderer routine.
*/
@Override
public Component getListCellRendererComponent(JList list, Object completion, int index,
boolean isSelected, boolean cellHasFocus) {
CodeCompletion codeCompletion = (CodeCompletion) completion;
public Component getListCellRendererComponent(JList<? extends CodeCompletion> list,
CodeCompletion codeCompletion, int index, boolean isSelected, boolean cellHasFocus) {
if (null == codeCompletion.getComponent()) {
return super.getListCellRendererComponent(list, codeCompletion.getDescription(), index,
isSelected, cellHasFocus);
return super.getListCellRendererComponent(list, codeCompletion, index, isSelected,
cellHasFocus);
}
/* ooh, we have a fancy component! */

View File

@ -22,6 +22,7 @@ import javax.swing.*;
import javax.swing.event.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -146,16 +147,16 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
lengthField.setChangeListener(e -> lengthChanged());
addrField.addChangeListener(ev -> addrChanged());
readCB = new JCheckBox();
readCB = new GCheckBox();
readCB.setName("Read");
writeCB = new JCheckBox();
writeCB = new GCheckBox();
writeCB.setName("Write");
executeCB = new JCheckBox();
executeCB = new GCheckBox();
executeCB.setName("Execute");
volatileCB = new JCheckBox();
volatileCB = new GCheckBox();
volatileCB.setName("Volatile");
JPanel topPanel = new JPanel(new PairLayout(4, 10, 150));

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,15 +15,14 @@
*/
package ghidra.app.plugin.core.printing;
import ghidra.util.HelpLocation;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import ghidra.util.HelpLocation;
public class PrintOptionsDialog extends DialogComponentProvider {
@ -79,7 +77,7 @@ public class PrintOptionsDialog extends DialogComponentProvider {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
((AbstractButton)e.getSource()).setSelected(true);
((AbstractButton) e.getSource()).setSelected(true);
okCallback();
}
}
@ -105,29 +103,27 @@ public class PrintOptionsDialog extends DialogComponentProvider {
headerPanel.setLayout(new BoxLayout(headerPanel, BoxLayout.X_AXIS));
headerPanel.setBorder(BorderFactory.createTitledBorder("Header and Footer"));
title = new JCheckBox("Title");
title = new GCheckBox("Title");
title.setSelected(true);
title.addKeyListener(key);
headerPanel.add(title);
date = new JCheckBox("Date/Time");
date = new GCheckBox("Date/Time");
date.setSelected(true);
date.addKeyListener(key);
headerPanel.add(date);
pageNum = new JCheckBox("Page Numbers");
pageNum = new GCheckBox("Page Numbers");
pageNum.setSelected(true);
pageNum.addKeyListener(key);
headerPanel.add(pageNum);
JPanel optionsPanel = new JPanel();
optionsPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
optionsPanel.setBorder(BorderFactory.createTitledBorder("Other Print Options"));
monochrome = new JCheckBox("Use Monochrome", true);
monochrome = new GCheckBox("Use Monochrome", true);
monochrome.addKeyListener(key);
optionsPanel.add(monochrome);
outerPanel.add(rangePanel, BorderLayout.NORTH);
outerPanel.add(headerPanel, BorderLayout.CENTER);
outerPanel.add(optionsPanel, BorderLayout.SOUTH);
@ -161,7 +157,6 @@ public class PrintOptionsDialog extends DialogComponentProvider {
return pageNum.isSelected();
}
public boolean isCancelled() {
return cancelled;
}
@ -194,8 +189,9 @@ public class PrintOptionsDialog extends DialogComponentProvider {
this.selectionEnabled = selectionEnabled;
selection.setEnabled(selectionEnabled);
selection.setSelected(selectionEnabled);
if (!selectionEnabled)
if (!selectionEnabled) {
view.setSelected(true);
}
setFocusComponent();
}
@ -203,7 +199,8 @@ public class PrintOptionsDialog extends DialogComponentProvider {
if (selectionEnabled) {
group.setSelected(selection.getModel(), true);
setFocusComponent(selection);
} else {
}
else {
group.setSelected(view.getModel(), true);
setFocusComponent(view);
}

View File

@ -20,6 +20,7 @@ import java.awt.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import docking.widgets.checkbox.GCheckBox;
import ghidra.app.plugin.processors.sleigh.SleighDebugLogger;
import ghidra.app.plugin.processors.sleigh.SleighDebugLogger.SleighDebugMode;
import ghidra.framework.model.DomainObjectChangedEvent;
@ -115,7 +116,7 @@ class InstructionInfoProvider extends ComponentProviderAdapter implements Domain
pane.setResizeWeight(.25);
mainPanel.add(pane, BorderLayout.CENTER);
dynamicUpdateCB = new JCheckBox("Dynamic Update", isDynamic);
dynamicUpdateCB = new GCheckBox("Dynamic Update", isDynamic);
dynamicUpdateCB.setAlignmentX(Component.CENTER_ALIGNMENT);
dynamicUpdateCB.addItemListener(e -> dynamicStateChanged());

View File

@ -30,6 +30,7 @@ import javax.swing.table.AbstractTableModel;
import org.jdom.Element;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -94,7 +95,7 @@ class EditMemoryReferencePanel extends EditReferencePanel {
private void buildPanel() {
setLayout(new PairLayout(10, 10, 160));
offsetCheckbox = new JCheckBox("Offset:");
offsetCheckbox = new GCheckBox("Offset:");
offsetCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
offsetCheckbox.addChangeListener(new ChangeListener() {
@Override

View File

@ -33,6 +33,7 @@ import docking.ActionContext;
import docking.action.*;
import docking.dnd.DropTgtAdapter;
import docking.dnd.Droppable;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.table.*;
import ghidra.app.events.ProgramSelectionPluginEvent;
import ghidra.app.util.SelectionTransferData;
@ -976,7 +977,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter
private JCheckBox checkbox;
RefCellBooleanEditor() {
super(new JCheckBox());
super(new GCheckBox());
setClickCountToStart(1);
checkbox = (JCheckBox) editorComponent;
checkbox.setOpaque(false);

View File

@ -23,6 +23,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.AddressInput;
@ -156,7 +157,7 @@ public class OffsetTableDialog extends DialogComponentProvider {
panel.add(new GLabel("Select Data Size (Bytes):", SwingConstants.RIGHT));
panel.add(comboBox);
signedCheckBox = new JCheckBox("Signed Data Value(s)", true);
signedCheckBox = new GCheckBox("Signed Data Value(s)", true);
panel.add(signedCheckBox);
return panel;
}

View File

@ -27,6 +27,7 @@ import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel;
import ghidra.util.StringUtilities;
@ -63,11 +64,11 @@ public class AsciiSearchFormat extends SearchFormat {
encodingCB.setSelectedIndex(0);
encodingCB.addActionListener(al);
caseSensitiveCkB = new JCheckBox("Case Sensitive");
caseSensitiveCkB = new GCheckBox("Case Sensitive");
caseSensitiveCkB.setToolTipText("Allows for case sensitive searching.");
caseSensitiveCkB.addActionListener(al);
escapeSequencesCkB = new JCheckBox("Escape Sequences");
escapeSequencesCkB = new GCheckBox("Escape Sequences");
escapeSequencesCkB.setToolTipText(
"Allows specifying control characters using escape sequences " +
"(i.e., allows \\n to be searched for as a single line feed character).");

View File

@ -27,6 +27,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.text.*;
import docking.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -419,9 +420,9 @@ class MemSearchDialog extends DialogComponentProvider {
}
private Container buildCodeUnitTypesPanel() {
final JCheckBox instructionsCheckBox = new JCheckBox("Instructions", true);
final JCheckBox definedCheckBox = new JCheckBox("Defined Data", true);
final JCheckBox undefinedCheckBox = new JCheckBox("Undefined Data", true);
final JCheckBox instructionsCheckBox = new GCheckBox("Instructions", true);
final JCheckBox definedCheckBox = new GCheckBox("Defined Data", true);
final JCheckBox undefinedCheckBox = new GCheckBox("Undefined Data", true);
ItemListener stateListener = e -> validate();

View File

@ -26,6 +26,7 @@ import javax.swing.border.Border;
import javax.swing.text.*;
import docking.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GLabel;
import ghidra.app.util.HelpTopics;
@ -282,12 +283,12 @@ class SearchTextDialog extends DialogComponentProvider {
private JPanel createOptionsPanel() {
JPanel panel = new JPanel(new VerticalLayout(3));
caseSensitiveCB = new JCheckBox("Case Sensitive");
caseSensitiveCB = new GCheckBox("Case Sensitive");
caseSensitiveCB.setToolTipText(
HTMLUtilities.toHTML("Select this if the search\n should be case sensitive."));
panel.add(caseSensitiveCB);
searchSelectionCB = new JCheckBox("Search Selection");
searchSelectionCB = new GCheckBox("Search Selection");
panel.add(searchSelectionCB);
panel.setBorder(BorderFactory.createTitledBorder("Options"));
@ -304,27 +305,27 @@ class SearchTextDialog extends DialogComponentProvider {
BoxLayout bl = new BoxLayout(optionsPanel, BoxLayout.Y_AXIS);
optionsPanel.setLayout(bl);
functionsCB = new JCheckBox("Functions");
functionsCB = new GCheckBox("Functions");
functionsCB.setToolTipText(HTMLUtilities.toHTML("Search in the Function Header fields"));
commentsCB = new JCheckBox("Comments", true);
commentsCB = new GCheckBox("Comments", true);
commentsCB.setToolTipText(HTMLUtilities.toHTML("Search in any of the comment fields"));
labelsCB = new JCheckBox("Labels");
labelsCB = new GCheckBox("Labels");
labelsCB.setToolTipText(HTMLUtilities.toHTML("Search in the Lable field"));
mnemonicsCB = new JCheckBox("Instruction Mnemonics");
mnemonicsCB = new GCheckBox("Instruction Mnemonics");
mnemonicsCB.setToolTipText(
HTMLUtilities.toHTML("Search in the Instruction Mnemonic field"));
operandsCB = new JCheckBox("Instruction Operands");
operandsCB = new GCheckBox("Instruction Operands");
operandsCB.setToolTipText(HTMLUtilities.toHTML("Search in the Instruction Operand fields"));
dataMnemonicsCB = new JCheckBox("Defined Data Mnemonics");
dataMnemonicsCB = new GCheckBox("Defined Data Mnemonics");
dataMnemonicsCB.setToolTipText(
HTMLUtilities.toHTML("Search in the Data Mnemonic and Value fields"));
dataOperandsCB = new JCheckBox("Defined Data Values");
dataOperandsCB = new GCheckBox("Defined Data Values");
dataOperandsCB.setToolTipText(
HTMLUtilities.toHTML("Search in the Data Mnemonic and Value fields"));

View File

@ -26,6 +26,7 @@ import javax.swing.border.TitledBorder;
import docking.DialogComponentProvider;
import docking.options.editor.ButtonPanelFactory;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.label.GLabel;
import docking.widgets.textfield.IntegerTextField;
@ -158,8 +159,8 @@ public class SearchStringDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new GridLayout(3, 1, 10, 14));
nullTerminateCheckbox = new JCheckBox("Require Null Termination");
pascalStringsCheckbox = new JCheckBox("Pascal Strings");
nullTerminateCheckbox = new GCheckBox("Require Null Termination");
pascalStringsCheckbox = new GCheckBox("Pascal Strings");
nullTerminateCheckbox.setSelected(true);
panel.add(nullTerminateCheckbox);

View File

@ -25,6 +25,7 @@ import javax.swing.*;
import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import docking.widgets.table.*;
import docking.widgets.table.threaded.ThreadedTableModel;
@ -385,9 +386,9 @@ public class StringTableProvider extends ComponentProviderAdapter implements Dom
preview = new JTextField(5);
preview.setEditable(false);
preview.setEnabled(false);
autoLabelCheckbox = new JCheckBox("Auto Label");
addAlignmentBytesCheckbox = new JCheckBox("Include Alignment Nulls");
allowTruncationCheckbox = new JCheckBox("Truncate If Needed");
autoLabelCheckbox = new GCheckBox("Auto Label");
addAlignmentBytesCheckbox = new GCheckBox("Include Alignment Nulls");
allowTruncationCheckbox = new GCheckBox("Truncate If Needed");
autoLabelCheckbox.setSelected(false); // discourage labeling since dynamic labels are preferred
JPanel panel = new JPanel(new GridBagLayout());

View File

@ -28,6 +28,7 @@ import javax.swing.event.DocumentListener;
import docking.DockingWindowManager;
import docking.ToolTipManager;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -199,7 +200,7 @@ class EditExternalLocationPanel extends JPanel {
add(bottomPanel);
if (externalLocation == null) {
functionCheckBox = new JCheckBox("Make External Function");
functionCheckBox = new GCheckBox("Make External Function");
add(functionCheckBox);
}
}

View File

@ -26,6 +26,7 @@ import org.jdom.Element;
import docking.ComponentProvider;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GHtmlLabel;
import docking.widgets.label.GIconLabel;
import ghidra.app.util.HelpTopics;
@ -97,7 +98,7 @@ public class FilterDialog extends DialogComponentProvider {
}
private JComponent buildWorkPanel() {
advancedFilterCheckbox = new JCheckBox("Use Advanced Filters");
advancedFilterCheckbox = new GCheckBox("Use Advanced Filters");
advancedFilterCheckbox.setToolTipText(HTMLUtilities.toHTML(
"Show advance filters. Advanced filters eliminate all appropriate\n" +
"symbols that don't match the filter. Selecting mutually exclusive filters\n" +
@ -147,7 +148,7 @@ public class FilterDialog extends DialogComponentProvider {
String[] sourceNames = filter.getSourceFilterNames();
JPanel panel = new JPanel(new GridLayout(0, 2));
for (String sourceName : sourceNames) {
JCheckBox cb = new JCheckBox(sourceName);
JCheckBox cb = new GCheckBox(sourceName);
checkBoxMap.put(sourceName, cb);
cb.addItemListener(sourceItemListener);
cb.setToolTipText(HTMLUtilities.toHTML(filter.getFilterDescription(sourceName)));
@ -179,7 +180,7 @@ public class FilterDialog extends DialogComponentProvider {
filtersPanel.setBorder(BorderFactory.createEmptyBorder(0, 40, 0, 0));
String[] filterNames = filter.getAdvancedFilterNames();
for (String filterName : filterNames) {
JCheckBox cb = new JCheckBox(filterName);
JCheckBox cb = new GCheckBox(filterName);
checkBoxMap.put(filterName, cb);
cb.addItemListener(checkboxListener);
cb.setToolTipText(HTMLUtilities.toHTML(filter.getFilterDescription(filterName)));
@ -207,7 +208,7 @@ public class FilterDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new VerticalLayout(0));
panel.setBorder(BorderFactory.createTitledBorder(title));
for (String filterName : filterNames) {
JCheckBox cb = new JCheckBox(filterName);
JCheckBox cb = new GCheckBox(filterName);
cb.setName(filterName);
checkBoxMap.put(filterName, cb);
cb.addItemListener(checkboxListener);

View File

@ -25,6 +25,7 @@ import javax.swing.table.TableColumn;
import org.jdom.Element;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.table.DefaultRowFilterTransformer;
import docking.widgets.table.RowFilterTransformer;
import ghidra.app.services.GoToService;
@ -98,7 +99,7 @@ class SymbolPanel extends JPanel {
tableFilterPanel.add(Box.createHorizontalStrut(5));
final JCheckBox nameColumnOnlyCheckbox = new JCheckBox("Name Only");
final JCheckBox nameColumnOnlyCheckbox = new GCheckBox("Name Only");
nameColumnOnlyCheckbox.setName("NameOnly"); // used by JUnit
nameColumnOnlyCheckbox.setToolTipText(
"<html><b>Selected</b> causes filter to only consider the symbol's name.");

View File

@ -24,6 +24,7 @@ import javax.swing.border.Border;
import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import resources.ResourceManager;
@ -62,7 +63,7 @@ class TipOfTheDayDialog extends DialogComponentProvider {
tipScroll.setBorder(null);
tipScroll.setPreferredSize(tipArea.getPreferredSize());
showTipsCheckbox = new JCheckBox("Show Tips on Startup?");
showTipsCheckbox = new GCheckBox("Show Tips on Startup?");
showTipsCheckbox.setSelected(true); // TODO (FixMe) Moved this before its listener to prevent project save for now.
showTipsCheckbox.addItemListener(new ItemListener() {
@Override

View File

@ -26,6 +26,7 @@ import javax.swing.*;
import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.util.Msg;
@ -33,7 +34,7 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
private boolean isCanceled;
private JCheckBox[] selectOptions;
private GCheckBox[] selectOptions;
private List<T> actualChoices;
private List<String> stringChoices;
private List<T> chosenByUser;
@ -76,7 +77,7 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
if (includeSelectAll) {
selectAllGroup = new SelectAllCheckBox();
JCheckBox selectAllCheckBox = new JCheckBox("[ Select All ]", false);
GCheckBox selectAllCheckBox = new GCheckBox("[ Select All ]", false);
selectAllCheckBox.setName("select.all.check.box");
panel.add(selectAllCheckBox);
panel.add(new JSeparator());
@ -84,10 +85,10 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
selectAllGroup.setSelectAllCheckBox(selectAllCheckBox);
}
selectOptions = new JCheckBox[stringChoices.size()];
selectOptions = new GCheckBox[stringChoices.size()];
for (int i = 0; i < selectOptions.length; i++) {
JCheckBox newCheckBox = new JCheckBox(stringChoices.get(i));
GCheckBox newCheckBox = new GCheckBox(stringChoices.get(i));
newCheckBox.setActionCommand(Integer.toString(i));
newCheckBox.setName("choice.check.box." + (i + 1));
newCheckBox.setSelected(false);

View File

@ -26,6 +26,7 @@ import org.apache.commons.lang3.StringUtils;
import docking.ComponentProvider;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import ghidra.app.cmd.label.*;
import ghidra.framework.cmd.CompoundCmd;
@ -432,14 +433,14 @@ public class AddEditDialog extends DialogComponentProvider {
comboBox.setEnterKeyForwarding(true);
namespaceChoices = comboBox;
primaryCheckBox = new JCheckBox("Primary");
primaryCheckBox = new GCheckBox("Primary");
primaryCheckBox.setMnemonic('P');
primaryCheckBox.setToolTipText(
"Make this label be the one that shows up in references to this location.");
entryPointCheckBox = new JCheckBox("Entry Point ");
entryPointCheckBox = new GCheckBox("Entry Point ");
entryPointCheckBox.setMnemonic('E');
entryPointCheckBox.setToolTipText("Mark this location as an external entry point.");
pinnedCheckBox = new JCheckBox("Pinned");
pinnedCheckBox = new GCheckBox("Pinned");
pinnedCheckBox.setMnemonic('A');
pinnedCheckBox.setToolTipText(
"Do not allow this label to move when the image base changes or a memory block is moved.");

View File

@ -28,6 +28,7 @@ import javax.swing.event.DocumentListener;
import org.apache.commons.collections4.map.LazyMap;
import docking.DockingWindowManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import docking.widgets.textfield.IntegerTextField;
@ -222,7 +223,7 @@ public class OptionsEditorPanel extends JPanel {
e -> DockingWindowManager.showDialog(panel, new LibraryPathsDialog()));
Boolean value = (Boolean) option.getValue();
boolean initialState = value != null ? value : false;
JCheckBox jCheckBox = new JCheckBox("", initialState);
GCheckBox jCheckBox = new GCheckBox("", initialState);
button.setEnabled(initialState);
jCheckBox.addActionListener(e -> {
boolean b = jCheckBox.isSelected();
@ -292,7 +293,7 @@ public class OptionsEditorPanel extends JPanel {
}
private Component getBooleanEditorComponent(Option option) {
JCheckBox cb = new JCheckBox();
GCheckBox cb = new GCheckBox();
cb.setName(option.getName());
Boolean b = (Boolean) option.getValue();
boolean initialState = b != null ? b : false;

View File

@ -28,6 +28,7 @@ import javax.swing.table.TableColumnModel;
import org.apache.commons.lang3.StringUtils;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.filter.FilterListener;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -247,7 +248,7 @@ public class SetEquateDialog extends DialogComponentProvider {
group.add(applyToSelection);
group.add(applyToAll);
overwriteExistingEquates = new JCheckBox("Overwrite existing equates", false);
overwriteExistingEquates = new GCheckBox("Overwrite existing equates", false);
overwriteExistingEquates.setName("Overwrite");
overwriteExistingEquates.setEnabled(false);
overwriteExistingEquates.setToolTipText("If checked, apply equates to all unmarked " +

View File

@ -17,6 +17,7 @@ package ghidra.app.util.datatype;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.data.DataTypeManager;
@ -38,7 +39,7 @@ public class ApplyEnumDialog extends DataTypeSelectionDialog {
updatedPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 0));
updatedPanel.setLayout(new VerticalLayout(5));
JCheckBox subOpCB = new JCheckBox("Apply to sub-operands", shouldApplyOnSubOps);
JCheckBox subOpCB = new GCheckBox("Apply to sub-operands", shouldApplyOnSubOps);
subOpCB.setName("subOpCB");
subOpCB.setToolTipText("Applies this enum to the 'nested scalars'.");
subOpCB.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));

View File

@ -25,6 +25,7 @@ import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.MultiLineLabel;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GIconLabel;
import ghidra.app.util.HelpTopics;
import ghidra.framework.model.DomainFile;
@ -124,7 +125,7 @@ public class CheckoutDialog extends DialogComponentProvider {
if (user != null) {
exclusiveCheckout = false;
if (user.hasWritePermission()) {
final JCheckBox exclusiveCB = new JCheckBox("Request exclusive check out");
final JCheckBox exclusiveCB = new GCheckBox("Request exclusive check out");
exclusiveCB.setSelected(false);
exclusiveCB.addActionListener(new ActionListener() {
@Override

View File

@ -23,6 +23,7 @@ import java.util.List;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.textfield.HintTextField;
import ghidra.app.util.*;
import ghidra.app.util.opinion.IntelHexRecord;
@ -296,14 +297,14 @@ public class IntelHexExporter extends Exporter {
private class RecordSizeComponent extends JPanel {
private HintTextField input;
private JCheckBox dropCb;
private GCheckBox dropCb;
public RecordSizeComponent(int recordSize) {
setLayout(new BorderLayout());
input = new HintTextField(Integer.toString(recordSize), false,
new BoundedIntegerVerifier());
dropCb = new JCheckBox("Align To Record Size");
dropCb = new GCheckBox("Align To Record Size");
input.setText(Integer.toString(recordSize));

View File

@ -29,6 +29,7 @@ import javax.swing.event.HyperlinkListener;
import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.HyperlinkComponent;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import ghidra.GhidraOptions;
import ghidra.app.nav.Navigatable;
@ -211,12 +212,12 @@ public class GoToAddressLabelDialog extends DialogComponentProvider implements G
gbc.gridwidth = 2;
inner.add(comboBox, gbc);
caseSensitiveBox = new JCheckBox("Case sensitive", false);
caseSensitiveBox = new GCheckBox("Case sensitive", false);
gbc.gridy = 2;
gbc.gridwidth = 1;
inner.add(caseSensitiveBox, gbc);
includeDynamicBox = new JCheckBox("Dynamic labels", true);
includeDynamicBox = new GCheckBox("Dynamic labels", true);
includeDynamicBox.setToolTipText("Include dynamic lables in the search (slower)");
gbc.gridx = 1;
inner.add(includeDynamicBox, gbc);

View File

@ -22,6 +22,7 @@ import java.math.BigInteger;
import javax.swing.*;
import docking.ToolTipManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.textfield.IntegerTextField;
@ -78,7 +79,7 @@ public class AddressFieldOptionsPropertyEditor extends PropertyEditorSupport
JLabel label = new GDLabel(SHOW_BLOCK_NAME_LABEL, SwingConstants.RIGHT);
ToolTipManager.setToolTipText(label, SHOW_BLOCKNAME_TOOLTIP);
panel.add(label);
showBlocknameCheckbox = new JCheckBox();
showBlocknameCheckbox = new GCheckBox();
ToolTipManager.setToolTipText(showBlocknameCheckbox, SHOW_BLOCKNAME_TOOLTIP);
panel.add(showBlocknameCheckbox);
@ -86,7 +87,7 @@ public class AddressFieldOptionsPropertyEditor extends PropertyEditorSupport
label = new GDLabel(PADDING_LABEL, SwingConstants.RIGHT);
ToolTipManager.setToolTipText(label, ADDRESS_PADDING_TOOLTIP);
panel.add(label);
padCheckBox = new JCheckBox();
padCheckBox = new GCheckBox();
panel.add(padCheckBox);
padCheckBox.setSelected(false);
ToolTipManager.setToolTipText(padCheckBox, ADDRESS_PADDING_TOOLTIP);

View File

@ -27,6 +27,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.ToolTipManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import docking.widgets.textfield.IntegerTextField;
import ghidra.framework.options.CustomOptionsEditor;
@ -66,7 +67,7 @@ public class ArrayElementPropertyEditor extends PropertyEditorSupport
JPanel panel = new JPanel(new VerticalLayout(3));
// the namespace checkbox will disable the text field options when it is not used
groupElementsCheckBox = new JCheckBox(SHOW_MULTI_ELEMENTS_LABEL);
groupElementsCheckBox = new GCheckBox(SHOW_MULTI_ELEMENTS_LABEL);
groupElementsCheckBox.setSelected(true);
ToolTipManager.setToolTipText(groupElementsCheckBox, SHOW_MULTI_ELEMENTS_TOOLTIP);

View File

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

View File

@ -26,6 +26,7 @@ import java.util.List;
import javax.swing.*;
import javax.swing.border.Border;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.fieldpanel.*;
import docking.widgets.fieldpanel.field.*;
@ -352,8 +353,8 @@ public class OptionsGui extends JPanel {
JPanel panel2 = new JPanel(new FlowLayout());
JPanel subPanel = new JPanel(new GridLayout(1, 2, 2, 4));
globalBoldCheckbox = new JCheckBox("Bold");
globalItalicsCheckbox = new JCheckBox("Italics");
globalBoldCheckbox = new GCheckBox("Bold");
globalItalicsCheckbox = new GCheckBox("Italics");
subPanel.add(globalBoldCheckbox);
subPanel.add(globalItalicsCheckbox);
panel2.add(subPanel);
@ -396,9 +397,9 @@ public class OptionsGui extends JPanel {
JPanel subPanel = new JPanel(new GridLayout(1, 3, 2, 4));
subPanel.setBorder(BorderFactory.createTitledBorder(border, "Style Settings"));
boldCheckbox = new JCheckBox("Bold");
italicsCheckbox = new JCheckBox("Italics");
customCheckbox = new JCheckBox("Custom");
boldCheckbox = new GCheckBox("Bold");
italicsCheckbox = new GCheckBox("Italics");
customCheckbox = new GCheckBox("Custom");
subPanel.add(customCheckbox);
subPanel.add(boldCheckbox);
subPanel.add(italicsCheckbox);

View File

@ -24,6 +24,7 @@ import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.app.services.Analyzer;
import ghidra.framework.analysis.*;
@ -51,15 +52,9 @@ public class AnalyzerListPanel extends JPanel {
// jScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
add(jScrollPane, BorderLayout.CENTER);
if (phase != null) {
final JCheckBox checkbox = new JCheckBox("Create Checkpoint When Phase Completed");
checkbox.setSelected(phase.isCheckPoint());
checkbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
relevantPhase.setIsCheckPoint(checkbox.isSelected());
}
});
GCheckBox checkbox =
new GCheckBox("Create Checkpoint When Phase Completed", phase.isCheckPoint());
checkbox.addActionListener(e -> relevantPhase.setIsCheckPoint(checkbox.isSelected()));
add(checkbox, BorderLayout.SOUTH);
if (phase == recipe.getLastPhase()) {
checkbox.setEnabled(false);

View File

@ -16,14 +16,13 @@
package ghidra.framework.analysis.gui;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import ghidra.app.services.Analyzer;
import ghidra.app.services.AnalyzerType;
@ -91,13 +90,9 @@ public class AnalyzerPanel extends JPanel {
JPanel panel = new JPanel(new BorderLayout());
panel.setOpaque(false);
panel.setBorder(BorderFactory.createEmptyBorder(2, 10, 2, 10));
enabledCheckbox = new JCheckBox();
enabledCheckbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
recipe.setAnalyzerEnablement(analyzer, enabledCheckbox.isSelected());
}
});
enabledCheckbox = new GCheckBox();
enabledCheckbox.addActionListener(
e -> recipe.setAnalyzerEnablement(analyzer, enabledCheckbox.isSelected()));
enabledCheckbox.setSelected(recipe.isAnalyzerEnabled(analyzer));
panel.add(enabledCheckbox, BorderLayout.WEST);

View File

@ -23,6 +23,7 @@ import java.util.List;
import javax.swing.*;
import javax.swing.border.Border;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import ghidra.program.model.lang.*;
import ghidra.program.util.DefaultLanguageService;
@ -67,7 +68,7 @@ public class NewLanguagePanel extends JPanel {
descriptionLabel = new GDLabel(DEFAULT_DESCRIPTION_TEXT);
descriptionLabel.setFont(descriptionLabel.getFont().deriveFont(Font.ITALIC));
recommendedCheckbox = new JCheckBox("Show Only Recommended Language/Compiler Specs");
recommendedCheckbox = new GCheckBox("Show Only Recommended Language/Compiler Specs");
recommendedCheckbox.addItemListener(e -> {
switch (e.getStateChange()) {
case ItemEvent.SELECTED:

View File

@ -32,6 +32,7 @@ import javax.swing.table.*;
import docking.DialogComponentProvider;
import docking.widgets.ListSelectionTableDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.filechooser.GhidraFileChooserMode;
@ -288,27 +289,19 @@ public class BatchImportDialog extends DialogComponentProvider {
JPanel outputChoicesPanel = new JPanel();
outputChoicesPanel.setLayout(new BoxLayout(outputChoicesPanel, BoxLayout.LINE_AXIS));
JCheckBox stripLeadingCb = new JCheckBox("Strip leading path");
stripLeadingCb.setSelected(stripLeading);
stripLeadingCb.addChangeListener(e -> {
setStripLeading(stripLeadingCb.isSelected());
});
GCheckBox stripLeadingCb = new GCheckBox("Strip leading path", stripLeading);
stripLeadingCb.addChangeListener(e -> setStripLeading(stripLeadingCb.isSelected()));
stripLeadingCb.setToolTipText("The destination folder for imported files will not " +
"include the source file's leading path");
JCheckBox stripContainerCb = new JCheckBox("Strip container paths");
stripContainerCb.setSelected(stripContainer);
stripContainerCb.addChangeListener(e -> {
setStripContainer(stripContainerCb.isSelected());
});
GCheckBox stripContainerCb = new GCheckBox("Strip container paths", stripContainer);
stripContainerCb.addChangeListener(e -> setStripContainer(stripContainerCb.isSelected()));
stripContainerCb.setToolTipText(
"The destination folder for imported files will not include any source path names");
JCheckBox openAfterImportCb = new JCheckBox("Open after import");
openAfterImportCb.setSelected(openAfterImporting);
openAfterImportCb.addChangeListener(e -> {
setOpenAfterImporting(openAfterImportCb.isSelected());
});
GCheckBox openAfterImportCb = new GCheckBox("Open after import", openAfterImporting);
openAfterImportCb.addChangeListener(
e -> setOpenAfterImporting(openAfterImportCb.isSelected()));
openAfterImportCb.setToolTipText("Open imported binaries in Code Browser");
outputChoicesPanel.add(stripLeadingCb);

View File

@ -29,6 +29,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.app.plugin.core.format.ByteBlockSelection;
import ghidra.app.plugin.core.format.DataFormatModel;
@ -115,7 +116,7 @@ public class ByteViewerOptionsDialog extends DialogComponentProvider
Set<String> currentViews = provider.getCurrentViews();
List<String> dataModelNames = provider.getDataFormatNames();
for (String formatName : dataModelNames) {
JCheckBox checkBox = new JCheckBox(formatName);
GCheckBox checkBox = new GCheckBox(formatName);
checkBox.addActionListener(this);
checkboxMap.put(formatName, checkBox);
if (currentViews.contains(formatName)) {

View File

@ -23,6 +23,7 @@ import java.util.List;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.fid.db.FidFile;
import ghidra.util.HelpLocation;
import ghidra.util.layout.VerticalLayout;
@ -39,7 +40,7 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
public ActiveFidConfigureDialog(List<FidFile> fidFiles) {
super("Select Active Fid Databases", true, false, true, false);
this.fidFiles = new ArrayList<FidFile>(fidFiles);
this.fidFiles = new ArrayList<>(fidFiles);
Collections.sort(fidFiles);
addWorkPanel(buildMainPanel());
@ -91,10 +92,9 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
panel.setBackground(Color.WHITE);
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
for (FidFile fidFile : fidFiles) {
JCheckBox checkbox = new JCheckBox(fidFile.getName());
GCheckBox checkbox = new GCheckBox(fidFile.getName(), fidFile.isActive());
checkbox.setToolTipText(fidFile.getPath());
checkboxes.add(checkbox);
checkbox.setSelected(fidFile.isActive());
checkbox.addItemListener(e -> fidFile.setActive(checkbox.isSelected()));
panel.add(checkbox);
}

View File

@ -28,6 +28,7 @@ import docking.ActionContext;
import docking.WindowPosition;
import docking.action.DockingAction;
import docking.action.ToolBarData;
import docking.widgets.checkbox.GCheckBox;
import ghidra.app.util.HelpTopics;
import ghidra.framework.plugintool.ComponentProviderAdapter;
import ghidra.framework.plugintool.Plugin;
@ -131,7 +132,7 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
*/
private void createAutoUpdateCheckBox() {
autoUpdateCB = new JCheckBox("Automatically Update Details", false);
autoUpdateCB = new GCheckBox("Automatically Update Details", false);
autoUpdateCB.setName(AUTO_UPDATE_CHECK_BOX);
autoUpdateCB.addActionListener(e -> {
autoUpdate = autoUpdateCB.isSelected();
@ -147,7 +148,7 @@ public class DiffDetailsProvider extends ComponentProviderAdapter {
*/
private void createFilterDiffsCheckBox() {
filterDiffsCB = new JCheckBox("Only Show Expected Difference Types", false);
filterDiffsCB = new GCheckBox("Only Show Expected Difference Types", false);
filterDiffsCB.setName(FILTER_DIFFS_CHECK_BOX);
filterDiffsCB.addActionListener(e -> {
filterDiffs = filterDiffsCB.isSelected();

View File

@ -15,12 +15,6 @@
*/
package ghidra.app.plugin.core.diff;
import ghidra.program.model.address.*;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramDiffFilter;
import ghidra.program.util.ProgramMemoryComparator;
import ghidra.util.HelpLocation;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
@ -32,6 +26,12 @@ import javax.swing.border.TitledBorder;
import docking.DialogComponentProvider;
import docking.DockingUtils;
import docking.ToolTipManager;
import docking.widgets.checkbox.GCheckBox;
import ghidra.program.model.address.*;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramDiffFilter;
import ghidra.program.util.ProgramMemoryComparator;
import ghidra.util.HelpLocation;
/**
* The ExecuteDiffDialog is used whenever initiating a Program Diff.
@ -70,7 +70,7 @@ public class ExecuteDiffDialog extends DialogComponentProvider {
private ProgramDiffFilter diffFilter;
private JPanel diffPanel;
private ArrayList<ActionListener> listenerList = new ArrayList<ActionListener>();
private ArrayList<ActionListener> listenerList = new ArrayList<>();
private boolean limitToSelection;
private AddressSetView pgm1MemorySet;
private AddressSetView pgm1SelectionSet;
@ -178,16 +178,13 @@ public class ExecuteDiffDialog extends DialogComponentProvider {
private JPanel createLimitPanel() {
JPanel panel = new JPanel();
limitToSelectionCB = new JCheckBox("Limit To Selection");
limitToSelectionCB = new GCheckBox("Limit To Selection");
limitToSelectionCB.setName("LimitToSelectionDiffCB");
ToolTipManager.setToolTipText(limitToSelectionCB, "Limits the Diff to the selection.");
limitToSelectionCB.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ev) {
limitToSelectionCB.addActionListener(ev -> {
limitToSelection = limitToSelectionCB.isSelected();
updateDiffSetText();
clearStatusText();
}
});
panel.add(limitToSelectionCB);
@ -201,8 +198,8 @@ public class ExecuteDiffDialog extends DialogComponentProvider {
private JPanel createDiffFilterPanel() {
JPanel checkBoxPanel = new JPanel();
ToolTipManager.setToolTipText(checkBoxPanel,
"Check the types of differences between the two "
+ "programs that you want detected and highlighted.");
"Check the types of differences between the two " +
"programs that you want detected and highlighted.");
createBytesCheckBox();
createLabelsCheckBox();
@ -239,136 +236,109 @@ public class ExecuteDiffDialog extends DialogComponentProvider {
}
private void createBytesCheckBox() {
diffBytesCB = new JCheckBox("Bytes", diffBytes);
diffBytesCB = new GCheckBox("Bytes", diffBytes);
diffBytesCB.setName("BytesDiffCB");
ToolTipManager.setToolTipText(diffBytesCB, "Highlight byte differences.");
diffBytesCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
diffBytesCB.addItemListener(event -> {
diffBytes = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.BYTE_DIFFS, diffBytes);
clearStatusText();
}
});
}
private void createLabelsCheckBox() {
diffLabelsCB = new JCheckBox("Labels", diffLabels);
diffLabelsCB = new GCheckBox("Labels", diffLabels);
diffLabelsCB.setName("LabelsDiffCB");
ToolTipManager.setToolTipText(diffLabelsCB, "Highlight label differences.");
diffLabelsCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
diffLabelsCB.addItemListener(event -> {
diffLabels = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.SYMBOL_DIFFS, diffLabels);
clearStatusText();
}
});
}
private void createCodeUnitsCheckBox() {
diffCodeUnitsCB = new JCheckBox("Code Units", diffCodeUnits);
diffCodeUnitsCB = new GCheckBox("Code Units", diffCodeUnits);
diffCodeUnitsCB.setName("CodeUnitsDiffCB");
ToolTipManager.setToolTipText(diffCodeUnitsCB, "Highlight the instruction, data, "
+ "and equate differences.");
diffCodeUnitsCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
ToolTipManager.setToolTipText(diffCodeUnitsCB,
"Highlight the instruction, data, " + "and equate differences.");
diffCodeUnitsCB.addItemListener(event -> {
diffCodeUnits = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.CODE_UNIT_DIFFS, diffCodeUnits);
diffFilter.setFilter(ProgramDiffFilter.EQUATE_DIFFS, diffCodeUnits);
clearStatusText();
}
});
}
private void createReferencesCheckBox() {
diffReferencesCB = new JCheckBox("References", diffReferences);
diffReferencesCB = new GCheckBox("References", diffReferences);
diffReferencesCB.setName("ReferencesDiffCB");
ToolTipManager.setToolTipText(diffReferencesCB, "Highlight the reference differences.");
diffReferencesCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
diffReferencesCB.addItemListener(event -> {
diffReferences = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.REFERENCE_DIFFS, diffReferences);
clearStatusText();
}
});
}
private void createProgramContextCheckBox() {
diffProgramContextCB = new JCheckBox("Program Context", diffProgramContext);
diffProgramContextCB = new GCheckBox("Program Context", diffProgramContext);
diffProgramContextCB.setName("ProgramContextDiffCB");
ToolTipManager.setToolTipText(diffProgramContextCB,
"Highlight the program context register differences.");
diffProgramContextCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
diffProgramContextCB.addItemListener(event -> {
diffProgramContext = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.PROGRAM_CONTEXT_DIFFS, diffProgramContext);
clearStatusText();
}
});
}
private void createCommentsCheckBox() {
diffCommentsCB = new JCheckBox("Comments", diffComments);
diffCommentsCB = new GCheckBox("Comments", diffComments);
diffCommentsCB.setName("CommentsDiffCB");
ToolTipManager.setToolTipText(diffCommentsCB, "Highlight comment differences.");
diffCommentsCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
diffCommentsCB.addItemListener(event -> {
diffComments = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.COMMENT_DIFFS, diffComments);
clearStatusText();
}
});
}
private void createBookmarksCheckBox() {
diffBookmarksCB = new JCheckBox("Bookmarks", diffBookmarks);
diffBookmarksCB = new GCheckBox("Bookmarks", diffBookmarks);
diffBookmarksCB.setName("BookmarksDiffCB");
ToolTipManager.setToolTipText(diffBookmarksCB, "Highlight bookmark differences. "
+ "(for example, bookmark differences)");
diffBookmarksCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
ToolTipManager.setToolTipText(diffBookmarksCB,
"Highlight bookmark differences. " + "(for example, bookmark differences)");
diffBookmarksCB.addItemListener(event -> {
diffBookmarks = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.BOOKMARK_DIFFS, diffBookmarks);
clearStatusText();
}
});
}
private void createPropertiesCheckBox() {
diffPropertiesCB = new JCheckBox("Properties", diffProperties);
diffPropertiesCB = new GCheckBox("Properties", diffProperties);
diffPropertiesCB.setName("PropertiesDiffCB");
ToolTipManager.setToolTipText(diffPropertiesCB,
"Highlight user defined property differences. "
+ "(for example, Format (space) differences)");
diffPropertiesCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
"Highlight user defined property differences. " +
"(for example, Format (space) differences)");
diffPropertiesCB.addItemListener(event -> {
diffProperties = (event.getStateChange() == ItemEvent.SELECTED);
diffFilter.setFilter(ProgramDiffFilter.USER_DEFINED_DIFFS, diffProperties);
clearStatusText();
}
});
}
private void createFunctionsCheckBox() {
diffFunctionsCB = new JCheckBox("Functions", diffFunctions);
diffFunctionsCB = new GCheckBox("Functions", diffFunctions);
diffFunctionsCB.setName("FunctionsDiffCB");
ToolTipManager.setToolTipText(diffFunctionsCB, "Highlight function differences.");
diffFunctionsCB.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent event) {
diffFunctionsCB.addItemListener(event -> {
diffFunctions = (event.getStateChange() == ItemEvent.SELECTED);
// Functions check box controls both functions and function tags.
diffFilter.setFilter(ProgramDiffFilter.FUNCTION_DIFFS, diffFunctions);
diffFilter.setFilter(ProgramDiffFilter.FUNCTION_TAG_DIFFS, diffFunctions);
clearStatusText();
}
});
}

View File

@ -24,12 +24,13 @@ import java.awt.event.MouseEvent;
import javax.swing.*;
import docking.widgets.label.GDLabel;
import docking.widgets.list.GListCellRenderer;
import ghidra.feature.vt.gui.editors.TagEditorDialog.TagState;
import ghidra.feature.vt.gui.editors.TagEditorDialog.TagStateListModel;
import ghidra.util.exception.AssertException;
import resources.ResourceManager;
public class TagEditorRenderer extends DefaultListCellRenderer {
public class TagEditorRenderer extends GListCellRenderer<TagState> {
private static final Icon NEW_TAG_ICON = ResourceManager.loadImage("images/tag_blue_add.png");
private static final Icon DELETED_TAG_ICON =
@ -156,19 +157,20 @@ public class TagEditorRenderer extends DefaultListCellRenderer {
}
@Override
public Component getListCellRendererComponent(JList<?> jList, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel renderer = (JLabel) super.getListCellRendererComponent(jList, value, index,
protected String getItemText(TagState value) {
return value.getTagName();
}
@Override
public Component getListCellRendererComponent(JList<? extends TagState> jList, TagState state,
int index, boolean isSelected, boolean cellHasFocus) {
JLabel renderer = (JLabel) super.getListCellRendererComponent(jList, state, index,
isSelected, cellHasFocus);
initializePanel(renderer);
TagState state = (TagState) value;
tagIconLabel.setIcon(getIcon(state));
renderer.setText(state.getTagName());
if (!isSelected) {
state.setMousePressed(false);
}

View File

@ -25,6 +25,7 @@ import javax.swing.event.EventListenerList;
import org.apache.commons.lang3.StringUtils;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GhidraComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GHtmlLabel;
@ -77,8 +78,7 @@ public abstract class AbstractAddressRangeFilter<T> extends AncillaryFilter<T>
// Enable panel
// check box for enabled/disabled, so the user can keep previous values
//
enableCheckBox = new JCheckBox("enable");
enableCheckBox.setSelected(true);
enableCheckBox = new GCheckBox("enable", true);
enableCheckBox.addItemListener(e -> enableFilter(enableCheckBox.isSelected()));
enableCheckBox.setSelected(true);
JPanel enablePanel = new JPanel(new BorderLayout());

View File

@ -22,6 +22,8 @@ import java.util.*;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.list.GListCellRenderer;
import ghidra.feature.vt.api.main.VTMatchTag;
import ghidra.feature.vt.api.main.VTSession;
import ghidra.feature.vt.gui.editors.TagEditorDialog;
@ -191,21 +193,20 @@ public class TagFilterEditorDialog extends DialogComponentProvider implements Ta
}
}
private class TagRenderer extends DefaultListCellRenderer {
private class TagRenderer extends GListCellRenderer<TagInfo> {
private JPanel panel;
private JCheckBox checkBox = new JCheckBox();
private GCheckBox checkBox = new GCheckBox();
@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
public Component getListCellRendererComponent(JList<? extends TagInfo> list, TagInfo value,
int index, boolean isSelected, boolean cellHasFocus) {
JLabel renderer = (JLabel) super.getListCellRendererComponent(list, value, index,
isSelected, cellHasFocus);
TagInfo info = (TagInfo) value;
checkBox.setSelected(info.isIncluded);
checkBox.setSelected(value.isIncluded);
renderer.setText(info.getDisplayText());
renderer.setText(value.getDisplayText());
return getPanel(renderer);
}

View File

@ -19,6 +19,7 @@ import java.awt.event.ItemListener;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.vt.api.main.VTMarkupItem;
import ghidra.feature.vt.api.main.VTMarkupItemStatus;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
@ -36,7 +37,7 @@ public class MarkupStatusFilter extends CheckBoxBasedAncillaryFilter<VTMarkupIte
VTMarkupItemStatus[] values = VTMarkupItemStatus.values();
for (VTMarkupItemStatus status : values) {
JCheckBox checkBox = new JCheckBox(status.getDescription());
GCheckBox checkBox = new GCheckBox(status.getDescription());
checkBox.setSelected(true);
checkBox.addItemListener(listener);
CheckBoxInfo<VTMarkupItem> info = new MatchStatusCheckBoxInfo(checkBox, status);

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,18 +15,19 @@
*/
package ghidra.feature.vt.gui.provider.markuptable;
import ghidra.feature.vt.api.main.VTMarkupItem;
import ghidra.feature.vt.api.markuptype.VTMarkupType;
import ghidra.feature.vt.api.markuptype.VTMarkupTypeFactory;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.vt.api.main.VTMarkupItem;
import ghidra.feature.vt.api.markuptype.VTMarkupType;
import ghidra.feature.vt.api.markuptype.VTMarkupTypeFactory;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
public class MarkupTypeFilter extends CheckBoxBasedAncillaryFilter<VTMarkupItem> {
public MarkupTypeFilter() {
@ -37,6 +37,7 @@ public class MarkupTypeFilter extends CheckBoxBasedAncillaryFilter<VTMarkupItem>
@Override
protected void createCheckBoxInfos() {
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
fireStatusChanged(getFilterStatus());
}
@ -44,7 +45,7 @@ public class MarkupTypeFilter extends CheckBoxBasedAncillaryFilter<VTMarkupItem>
List<VTMarkupType> markupTypes = VTMarkupTypeFactory.getMarkupTypes();
for (VTMarkupType markupType : markupTypes) {
JCheckBox checkBox = new JCheckBox(markupType.getDisplayName());
GCheckBox checkBox = new GCheckBox(markupType.getDisplayName());
checkBox.setSelected(true);
checkBox.addItemListener(listener);
CheckBoxInfo<VTMarkupItem> info = new MarkupTypeCheckBoxInfo(checkBox, markupType);

View File

@ -15,6 +15,13 @@
*/
package ghidra.feature.vt.gui.provider.matchtable;
import java.awt.BorderLayout;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.vt.api.correlator.program.ImpliedMatchProgramCorrelator;
import ghidra.feature.vt.api.correlator.program.ManualMatchProgramCorrelator;
import ghidra.feature.vt.api.impl.VTProgramCorrelatorInfo;
@ -25,12 +32,6 @@ import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
import ghidra.util.classfinder.ClassSearcher;
import java.awt.BorderLayout;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
public class AlgorithmFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
public AlgorithmFilter() {
@ -83,8 +84,7 @@ public class AlgorithmFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
};
for (String name : algorithmNames) {
JCheckBox checkBox = new JCheckBox(name);
checkBox.setSelected(true);
GCheckBox checkBox = new GCheckBox(name, true);
checkBox.addItemListener(listener);
CheckBoxInfo<VTMatch> info = new AlgorithmNameCheckBoxInfo(checkBox, name);
checkBoxInfos.add(info);
@ -92,7 +92,7 @@ public class AlgorithmFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
}
private List<String> getKnowAlgorithms() {
List<String> list = new ArrayList<String>();
List<String> list = new ArrayList<>();
// add the manual match correlator, which doesn't have a factory, since it is only through an action.
list.add(ManualMatchProgramCorrelator.NAME);

View File

@ -28,6 +28,7 @@ import javax.swing.border.TitledBorder;
import docking.DockingWindowManager;
import docking.help.HelpService;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GDLabel;
import docking.widgets.label.GLabel;
@ -230,10 +231,10 @@ public class ApplyMarkupPropertyEditor implements OptionsEditor {
}
private void createIgnoreCheckBoxes() {
ignoreIncompleteCheckBox = new JCheckBox("Set Incomplete Markup Items To Ignored");
ignoreIncompleteCheckBox = new GCheckBox("Set Incomplete Markup Items To Ignored");
ignoreIncompleteCheckBox.setToolTipText(IGNORE_INCOMPLETE_TOOLTIP);
ignoreExcludedCheckBox = new JCheckBox("Set Excluded Markup Items To Ignored");
ignoreExcludedCheckBox = new GCheckBox("Set Excluded Markup Items To Ignored");
ignoreExcludedCheckBox.setToolTipText(IGNORE_EXCLUDED_TOOLTIP);
}
@ -834,8 +835,8 @@ public class ApplyMarkupPropertyEditor implements OptionsEditor {
return applyComboBox;
}
private JCheckBox createCheckBox(final String optionName) {
final JCheckBox applyCheckBox = new JCheckBox(optionName);
private JCheckBox createCheckBox(String optionName) {
JCheckBox applyCheckBox = new GCheckBox(optionName);
applyCheckBox.addChangeListener(e -> changesMade(true));
return applyCheckBox;

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,13 +15,16 @@
*/
package ghidra.feature.vt.gui.provider.matchtable;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.vt.api.main.VTAssociationStatus;
import ghidra.feature.vt.api.main.VTMatch;
import ghidra.feature.vt.gui.filters.*;
import java.awt.event.*;
import javax.swing.*;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
public class AssociationStatusFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
@ -33,6 +35,7 @@ public class AssociationStatusFilter extends CheckBoxBasedAncillaryFilter<VTMatc
@Override
protected void createCheckBoxInfos() {
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
fireStatusChanged(getFilterStatus());
}
@ -40,8 +43,7 @@ public class AssociationStatusFilter extends CheckBoxBasedAncillaryFilter<VTMatc
VTAssociationStatus[] values = VTAssociationStatus.values();
for (VTAssociationStatus status : values) {
JCheckBox checkBox = new JCheckBox(status.getDisplayName());
checkBox.setSelected(true);
GCheckBox checkBox = new GCheckBox(status.getDisplayName(), true);
checkBox.addItemListener(listener);
CheckBoxInfo<VTMatch> info = new AssociationStatusCheckBoxInfo(checkBox, status);
checkBoxInfos.add(info);

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,16 +15,17 @@
*/
package ghidra.feature.vt.gui.provider.matchtable;
import ghidra.feature.vt.api.main.VTAssociationType;
import ghidra.feature.vt.api.main.VTMatch;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.vt.api.main.VTAssociationType;
import ghidra.feature.vt.api.main.VTMatch;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
public class MatchTypeFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
public MatchTypeFilter() {
@ -35,6 +35,7 @@ public class MatchTypeFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
@Override
protected void createCheckBoxInfos() {
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
fireStatusChanged(getFilterStatus());
}
@ -42,8 +43,7 @@ public class MatchTypeFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
VTAssociationType[] values = VTAssociationType.values();
for (VTAssociationType status : values) {
JCheckBox checkBox = new JCheckBox(status.toString());
checkBox.setSelected(true);
GCheckBox checkBox = new GCheckBox(status.toString(), true);
checkBox.addItemListener(listener);
CheckBoxInfo<VTMatch> info = new AssociationTypeCheckBoxInfo(checkBox, status);
checkBoxInfos.add(info);

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,6 +15,12 @@
*/
package ghidra.feature.vt.gui.provider.matchtable;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
import ghidra.feature.vt.api.main.*;
import ghidra.feature.vt.gui.filters.CheckBoxBasedAncillaryFilter;
import ghidra.feature.vt.gui.filters.CheckBoxInfo;
@ -23,11 +28,6 @@ import ghidra.program.model.address.Address;
import ghidra.program.model.listing.Program;
import ghidra.program.model.symbol.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JCheckBox;
/**
* This filter allows through any match that has a source *or* destination symbol type matches
* the selected source types.
@ -41,6 +41,7 @@ public class SymbolTypeFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
@Override
protected void createCheckBoxInfos() {
ItemListener listener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
fireStatusChanged(getFilterStatus());
}
@ -48,15 +49,13 @@ public class SymbolTypeFilter extends CheckBoxBasedAncillaryFilter<VTMatch> {
SourceType[] values = SourceType.values();
for (SourceType type : values) {
JCheckBox checkBox = new JCheckBox(type.getDisplayString());
checkBox.setSelected(true);
GCheckBox checkBox = new GCheckBox(type.getDisplayString(), true);
checkBox.addItemListener(listener);
CheckBoxInfo<VTMatch> info = new SymbolTypeCheckBoxInfo(checkBox, type);
checkBoxInfos.add(info);
}
JCheckBox nullSymbolCheckbox = new JCheckBox("<No Symbol>");
nullSymbolCheckbox.setSelected(true);
GCheckBox nullSymbolCheckbox = new GCheckBox("<No Symbol>", true);
nullSymbolCheckbox.addItemListener(listener);
checkBoxInfos.add(new NullSymbolCheckBoxInfo(nullSymbolCheckbox));
}

View File

@ -1,6 +1,5 @@
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,6 +15,13 @@
*/
package ghidra.feature.vt.gui.wizard;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
import docking.wizard.*;
import ghidra.feature.vt.api.main.VTProgramCorrelatorAddressRestrictionPreference;
import ghidra.feature.vt.api.main.VTProgramCorrelatorFactory;
import ghidra.program.model.address.AddressSetView;
@ -23,13 +29,6 @@ import ghidra.util.HTMLUtilities;
import ghidra.util.HelpLocation;
import ghidra.util.layout.VerticalLayout;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import docking.wizard.*;
public class AddressSetOptionsPanel extends AbstractMageJPanel<VTWizardStateKey> {
private JCheckBox excludeCheckbox;
@ -38,23 +37,21 @@ public class AddressSetOptionsPanel extends AbstractMageJPanel<VTWizardStateKey>
public AddressSetOptionsPanel() { //
setBorder(BorderFactory.createEmptyBorder(40, 40, 0, 0));
excludeCheckbox = new JCheckBox("Exclude accepted matches");
String excludeAcceptedTooltip =
"This option will cause the correlator algorithm "
+ "to <b>not</b> consider any functions or data that have already been "
+ "accepted. Using this option can greatly speed up the processing time "
+ "of the correlator algorithm; however, this options should only be "
+ "used when you trust that your accepted matches are correct.";
excludeCheckbox = new GCheckBox("Exclude accepted matches", false);
String excludeAcceptedTooltip = "This option will cause the correlator algorithm " +
"to <b>not</b> consider any functions or data that have already been " +
"accepted. Using this option can greatly speed up the processing time " +
"of the correlator algorithm; however, this options should only be " +
"used when you trust that your accepted matches are correct.";
excludeCheckbox.setToolTipText(HTMLUtilities.toWrappedHTML(excludeAcceptedTooltip));
excludeCheckbox.setEnabled(false);
showAddressSetPanelsCheckbox = new JCheckBox("Limit source and destination address sets");
String manuallyLimitTooltip =
"Selecting this checkbox will trigger additional wizard "
+ " panels allowing you to customize the address sets used "
+ " by the selected algorithm. When not selected, the entire address space is used.";
showAddressSetPanelsCheckbox = new GCheckBox("Limit source and destination address sets");
String manuallyLimitTooltip = "Selecting this checkbox will trigger additional wizard " +
" panels allowing you to customize the address sets used " +
" by the selected algorithm. When not selected, the entire address space is used.";
showAddressSetPanelsCheckbox.setToolTipText(HTMLUtilities.toWrappedHTML(manuallyLimitTooltip));
showAddressSetPanelsCheckbox.setToolTipText(
HTMLUtilities.toWrappedHTML(manuallyLimitTooltip));
add(excludeCheckbox);
add(showAddressSetPanelsCheckbox);
@ -74,8 +71,8 @@ public class AddressSetOptionsPanel extends AbstractMageJPanel<VTWizardStateKey>
@Override
public void enterPanel(WizardState<VTWizardStateKey> state) {
@SuppressWarnings("unchecked")
List<VTProgramCorrelatorFactory> list =
(List<VTProgramCorrelatorFactory>) state.get(VTWizardStateKey.PROGRAM_CORRELATOR_FACTORY_LIST);
List<VTProgramCorrelatorFactory> list = (List<VTProgramCorrelatorFactory>) state.get(
VTWizardStateKey.PROGRAM_CORRELATOR_FACTORY_LIST);
Boolean value = (Boolean) state.get(VTWizardStateKey.EXCLUDE_ACCEPTED_MATCHES);
if (value != null) {
@ -90,8 +87,7 @@ public class AddressSetOptionsPanel extends AbstractMageJPanel<VTWizardStateKey>
(AddressSetView) state.get(VTWizardStateKey.SOURCE_SELECTION);
AddressSetView destinationSelection =
(AddressSetView) state.get(VTWizardStateKey.DESTINATION_SELECTION);
boolean somethingSelected =
(sourceSelection != null && !sourceSelection.isEmpty()) ||
boolean somethingSelected = (sourceSelection != null && !sourceSelection.isEmpty()) ||
(destinationSelection != null && !destinationSelection.isEmpty());
showAddressSetPanelsCheckbox.setSelected(somethingSelected);
}

View File

@ -24,6 +24,7 @@ import javax.swing.*;
import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.dialogs.*;
import docking.widgets.label.GHtmlLabel;
import docking.widgets.label.GIconLabel;
@ -264,11 +265,11 @@ public class OptionDialog extends DialogComponentProvider {
private JPanel buildRememberOptionChoicePanel(DialogRememberOption rememberOptionChoice) {
if (rememberOptionChoice == null) {
this.rememberOption = new DoNothingDialogRememberOption();
rememberOptionCheckBox = new JCheckBox(); // to prevent null checks, create dummy checkbox
rememberOptionCheckBox = new GCheckBox(); // to prevent null checks, create dummy checkbox
return null;
}
this.rememberOption = rememberOptionChoice;
rememberOptionCheckBox = new JCheckBox(rememberOptionChoice.getDescription());
rememberOptionCheckBox = new GCheckBox(rememberOptionChoice.getDescription());
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));

View File

@ -21,6 +21,7 @@ import java.awt.event.*;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GLabel;
import ghidra.util.MessageType;
@ -65,7 +66,7 @@ public class PasswordDialog extends DialogComponentProvider {
workPanel.add(choiceCB);
}
if (includeAnonymousOption) {
anonymousAccess = new JCheckBox("Request Anonymous Access");
anonymousAccess = new GCheckBox("Request Anonymous Access");
anonymousAccess.setName("ANONYMOUS-COMPONENT");
anonymousAccess.addChangeListener(e -> {
boolean anonymousAccessRequested = anonymousAccess.isSelected();

View File

@ -27,6 +27,7 @@ import javax.swing.border.BevelBorder;
import javax.swing.border.Border;
import docking.widgets.EmptyBorderButton;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDHtmlLabel;
import docking.widgets.label.GDLabel;
import ghidra.util.HTMLUtilities;
@ -365,7 +366,7 @@ public class ConditionTestPanel extends JPanel {
backgroundColor = getBackground();
selectedColor = Color.LIGHT_GRAY;
this.test = conditionTest;
checkbox = new JCheckBox();
checkbox = new GCheckBox();
checkbox.setSelected(true);
add(checkbox);
label = new GDLabel(test.getName());

View File

@ -25,6 +25,7 @@ import javax.swing.table.*;
import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.table.DefaultSortedTableModel;
import docking.widgets.table.GTable;
@ -231,8 +232,8 @@ public class SettingsDialog extends DialogComponentProvider {
final static int BOOLEAN = 1;
private int mode;
private JComboBox<String> comboBox = new GComboBox<>();
private JCheckBox checkBox = new JCheckBox();
private GComboBox<String> comboBox = new GComboBox<>();
private GCheckBox checkBox = new GCheckBox();
private final Runnable editStopped = new Runnable() {
@Override

View File

@ -18,6 +18,7 @@ package docking.widgets.filechooser;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GLabel;
import ghidra.framework.preferences.Preferences;
import ghidra.util.layout.PairLayout;
@ -48,7 +49,7 @@ class GFileChooserOptionsDialog extends DialogComponentProvider {
private JComponent buildComponent() {
JPanel panel = new JPanel(new PairLayout());
showDotFilesCheckBox = new JCheckBox();
showDotFilesCheckBox = new GCheckBox();
showDotFilesCheckBox.setSelected(true);
JLabel label = new GLabel("Show '.' files");

View File

@ -27,6 +27,7 @@ import javax.swing.border.EmptyBorder;
import docking.DialogComponentProvider;
import docking.DisabledComponentLayerFactory;
import docking.widgets.InlineComponentTitledPanel;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.combobox.GComboBox;
import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
@ -266,14 +267,14 @@ public class FilterOptionsEditorDialog extends DialogComponentProvider {
this.setLayout(new HorizontalLayout(6));
setBorder(BorderFactory.createEmptyBorder(10, 4, 0, 4));
caseSensitiveCheckbox = new JCheckBox("Case Sensitive");
caseSensitiveCheckbox = new GCheckBox("Case Sensitive");
caseSensitiveCheckbox.setToolTipText(
"Toggles whether the case of the filter text matters in the match. NOTE: does not apply to regular expressons.");
if (initialFilterOptions.isCaseSensitive()) {
caseSensitiveCheckbox.setSelected(true);
}
globbingCheckbox = new JCheckBox("Allow Globbing");
globbingCheckbox = new GCheckBox("Allow Globbing");
globbingCheckbox.setToolTipText(
"Toggles whether globbing chars (?*) are literal or wildcards");
if (initialFilterOptions.isGlobbingAllowed()) {
@ -308,7 +309,7 @@ public class FilterOptionsEditorDialog extends DialogComponentProvider {
this.setLayout(new HorizontalLayout(6));
setBorder(BorderFactory.createEmptyBorder(10, 4, 10, 4));
invertCheckbox = new JCheckBox("Invert Filter");
invertCheckbox = new GCheckBox("Invert Filter");
invertCheckbox.setToolTipText("<html>" +
"Inverts the match. For example, <i>contains</i> becomes <i>does not contain</i>.");
if (initialFilterOptions.isInverted()) {
@ -337,13 +338,11 @@ public class FilterOptionsEditorDialog extends DialogComponentProvider {
public MultiTermPanel() {
super(new JCheckBox("Enable Multi-Term Filtering"), BorderFactory.createEtchedBorder());
super(new GCheckBox("Enable Multi-Term Filtering", true),
BorderFactory.createEtchedBorder());
enableCheckbox = (JCheckBox) getTitleComponent();
enableCheckbox.setSelected(true);
enableCheckbox.addActionListener(e -> {
setOptionsEnabled(enableCheckbox.isSelected());
});
enableCheckbox.addActionListener(e -> setOptionsEnabled(enableCheckbox.isSelected()));
createPanel();
}

View File

@ -116,7 +116,7 @@ public class GHtmlLabel extends JLabel {
@Deprecated
@Override
public void setText(String text) {
if (StringUtils.isEmpty(getText())) {
if (!StringUtils.isEmpty(getText())) {
Msg.warn(this,
"Trying to set text on an immutable label! Current text: [" + getText() +
"], new text: [" + text + "]",

View File

@ -17,11 +17,11 @@ package docking.widgets.table;
import java.awt.*;
import javax.swing.JCheckBox;
import docking.widgets.checkbox.GCheckBox;
public class GBooleanCellRenderer extends GTableCellRenderer {
protected JCheckBox cb = new JCheckBox();
protected GCheckBox cb = new GCheckBox();
public GBooleanCellRenderer() {
super();

View File

@ -21,6 +21,7 @@ import java.util.*;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDHtmlLabel;
import docking.widgets.table.constraint.ColumnConstraint;
import docking.widgets.table.constraint.EnumColumnConstraint;
@ -57,7 +58,7 @@ public class EnumConstraintEditor<T extends Enum<T>> extends AbstractColumnConst
panel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 10));
for (T t : allValues) {
JCheckBox jCheckBox = new JCheckBox(getElementDisplayName(t));
GCheckBox jCheckBox = new GCheckBox(getElementDisplayName(t));
enumCheckboxMap.put(t, jCheckBox);

View File

@ -28,6 +28,7 @@ import com.google.common.collect.Iterables;
import docking.DialogComponentProvider;
import docking.options.editor.ButtonPanelFactory;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.list.ListPanel;
import ghidra.framework.ToolUtils;
import ghidra.framework.model.ToolTemplate;
@ -40,7 +41,7 @@ class ImportGhidraToolsDialog extends DialogComponentProvider {
private ListPanel listPanel;
private JPanel mainPanel;
private JCheckBox[] checkboxes;
private GCheckBox[] checkboxes;
private String[] tools;
private JButton selectAllButton;
private JButton deselectAllButton;
@ -167,13 +168,13 @@ class ImportGhidraToolsDialog extends DialogComponentProvider {
int elementCount = defaultTools.size() + extraTools.size();
tools = new String[elementCount];
checkboxes = new JCheckBox[elementCount];
checkboxes = new GCheckBox[elementCount];
Iterator<String> itr = defaultToolNames.iterator();
int count = 0;
while (itr.hasNext()) {
tools[count] = itr.next();
checkboxes[count] = new JCheckBox(tools[count], false);
checkboxes[count] = new GCheckBox(tools[count], false);
checkboxes[count].setBackground(Color.WHITE);
count++;
}
@ -181,7 +182,7 @@ class ImportGhidraToolsDialog extends DialogComponentProvider {
itr = extraToolNames.iterator();
while (itr.hasNext()) {
tools[count] = itr.next();
checkboxes[count] = new JCheckBox(tools[count], false);
checkboxes[count] = new GCheckBox(tools[count], false);
checkboxes[count].setBackground(Color.LIGHT_GRAY);
count++;
}

View File

@ -24,6 +24,7 @@ import java.util.List;
import javax.swing.*;
import docking.options.editor.ButtonPanelFactory;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.list.GListCellRenderer;
import docking.widgets.table.GTable;
import docking.wizard.AbstractWizardJPanel;
@ -192,8 +193,7 @@ public class ProjectAccessPanel extends AbstractWizardJPanel {
add(mainPanel, BorderLayout.CENTER);
if (anonymousServerAccessAllowed) {
anonymousAccessCB = new JCheckBox("Allow Anonymous Access");
anonymousAccessCB.setSelected(origAnonymousAccessEnabled);
anonymousAccessCB = new GCheckBox("Allow Anonymous Access", origAnonymousAccessEnabled);
anonymousAccessCB.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
add(anonymousAccessCB, BorderLayout.SOUTH);
}

View File

@ -24,8 +24,10 @@ import java.util.List;
import javax.swing.*;
import javax.swing.border.TitledBorder;
import docking.*;
import docking.DialogComponentProvider;
import docking.DockingWindowManager;
import docking.options.editor.ButtonPanelFactory;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.list.ListPanel;
import ghidra.framework.model.DomainFile;
import ghidra.framework.model.ProjectLocator;
@ -51,7 +53,7 @@ public class SaveDataDialog extends DialogComponentProvider {
private ListPanel listPanel;
private JPanel mainPanel;
private JCheckBox[] checkboxes;
private GCheckBox[] checkboxes;
private List<DomainFile> files;
private boolean[] saveable;
private JButton selectAllButton;
@ -258,13 +260,12 @@ public class SaveDataDialog extends DialogComponentProvider {
// initList() may be called multiple times within one dialog showing,
// and some files may have been changed, so we need to update the list
files = checkForUnsavedFiles(files);
checkboxes = new JCheckBox[files.size()];
checkboxes = new GCheckBox[files.size()];
saveable = new boolean[files.size()];
String readOnlyString = " (Read-Only)";
yesButton.setEnabled(false);
for (int i = 0; i < files.size(); i++) {
checkboxes[i] = new JCheckBox(files.get(i).getName());
DockingUtils.turnOffHTMLRendering(checkboxes[i]);
checkboxes[i] = new GCheckBox(files.get(i).getName());
checkboxes[i].setBackground(Color.white);
saveable[i] = files.get(i).canSave();
if (!saveable[i]) {

View File

@ -185,7 +185,7 @@ class SelectProjectPanel extends AbstractWizardJPanel {
}
});
// sharedProjectCB = new JCheckBox("Project can be Shared with Others");
// sharedProjectCB = new GCheckBox("Project can be Shared with Others");
// sharedProjectCB.addItemListener(new ItemListener() {
// public void itemStateChanged(ItemEvent e) {
// panelManager.getWizardManager().validityChanged();

View File

@ -24,6 +24,7 @@ import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GDLabel;
import docking.widgets.list.GListCellRenderer;
import ghidra.framework.model.*;
@ -45,7 +46,7 @@ class ToolConnectionPanel extends JPanel implements ListSelectionListener {
private JList<JCheckBox> eventList; // names of events generated by source
private DefaultListModel<Tool> producerModel;
private DefaultListModel<Tool> consumerModel;
private JCheckBox[] checkboxes;
private GCheckBox[] checkboxes;
private String[] eventNames;
private final static String msgSource = "Tool Connection";
@ -345,13 +346,13 @@ class ToolConnectionPanel extends JPanel implements ListSelectionListener {
ToolConnection tc = toolManager.getConnection(producer, consumer);
eventNames = tc.getEvents();
checkboxes = new JCheckBox[eventNames.length];
checkboxes = new GCheckBox[eventNames.length];
int connectedCount = 0;
for (int i = 0; i < checkboxes.length; i++) {
checkboxes[i] = new JCheckBox(eventNames[i]);
checkboxes[i] = new GCheckBox(eventNames[i]);
checkboxes[i].setBackground(Color.white);
boolean isConnected = tc.isConnected(eventNames[i]);

View File

@ -22,6 +22,7 @@ import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.MultiLineLabel;
import docking.widgets.OptionDialog;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GIconLabel;
import ghidra.app.util.GenericHelpTopics;
import ghidra.framework.plugintool.PluginTool;
@ -88,7 +89,7 @@ public class CheckoutDialog extends DialogComponentProvider {
innerPanel.add(msgPanel, BorderLayout.CENTER);
exclusiveCB = new JCheckBox("Request exclusive check out");
exclusiveCB = new GCheckBox("Request exclusive check out");
JPanel cbPanel = new JPanel(new BorderLayout());
cbPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));

View File

@ -23,6 +23,7 @@ import java.util.List;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.list.ListPanel;
import ghidra.framework.model.DomainFile;
@ -33,7 +34,7 @@ import ghidra.framework.model.DomainFile;
class DomainFilesPanel extends JPanel {
private List<DomainFile> fileList;
private JCheckBox[] checkboxes;
private GCheckBox[] checkboxes;
private ListPanel listPanel;
/**
@ -47,12 +48,11 @@ class DomainFilesPanel extends JPanel {
setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5));
JPanel innerPanel = new JPanel(new BorderLayout());
checkboxes = new JCheckBox[fileList.size()];
checkboxes = new GCheckBox[fileList.size()];
for (int i = 0; i < fileList.size(); i++) {
DomainFile df = fileList.get(i);
checkboxes[i] = new JCheckBox(df.getPathname());
checkboxes[i] = new GCheckBox(df.getPathname(), true);
checkboxes[i].setBackground(Color.white);
checkboxes[i].setSelected(true);
}
//

View File

@ -21,6 +21,7 @@ import java.util.List;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.GIconLabel;
import docking.widgets.label.GLabel;
import ghidra.app.util.GenericHelpTopics;
@ -98,8 +99,7 @@ public class UndoActionDialog extends DialogComponentProvider {
innerPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
filePanel = new DomainFilesPanel(fileList, null);
saveCopyCB = new JCheckBox("Save copy of the file with a .keep extension");
saveCopyCB.setSelected(true);
saveCopyCB = new GCheckBox("Save copy of the file with a .keep extension", true);
JPanel cbPanel = new JPanel(new BorderLayout());
cbPanel.add(saveCopyCB);

View File

@ -21,6 +21,7 @@ import java.awt.Component;
import javax.swing.*;
import docking.DialogComponentProvider;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.*;
import ghidra.app.util.GenericHelpTopics;
import ghidra.framework.plugintool.PluginTool;
@ -158,8 +159,7 @@ public class VersionControlDialog extends DialogComponentProvider {
commentsTextArea = new JTextArea(4, 20);
JScrollPane sp = new JScrollPane(commentsTextArea);
keepCB = new JCheckBox("Keep File Checked Out");
keepCB.setSelected(true);
keepCB = new GCheckBox("Keep File Checked Out", true);
JPanel kPanel = new JPanel(new BorderLayout());
kPanel.add(keepCB, BorderLayout.WEST);
@ -172,8 +172,7 @@ public class VersionControlDialog extends DialogComponentProvider {
innerPanel.add(kPanel);
if (!addToVersionControl) {
keepFileCB = new JCheckBox("Create \".keep\" file");
keepFileCB.setSelected(false);
keepFileCB = new GCheckBox("Create \".keep\" file", false);
JPanel kpPanel = new JPanel(new BorderLayout());
kpPanel.add(keepFileCB, BorderLayout.WEST);
innerPanel.add(kpPanel);

View File

@ -21,6 +21,7 @@ import java.awt.event.ActionListener;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import ghidra.framework.main.logviewer.event.FVEvent;
import ghidra.framework.main.logviewer.event.FVEvent.EventType;
import ghidra.framework.main.logviewer.event.FVEventListener;
@ -74,7 +75,7 @@ public class ReloadDialog extends JDialog {
buttonPanel.add(noBtn);
contentPane.add(buttonPanel, BorderLayout.CENTER);
JCheckBox checkbox = new JCheckBox("Do not show this message again.");
JCheckBox checkbox = new GCheckBox("Do not show this message again.");
contentPane.add(checkbox, BorderLayout.SOUTH);
// When the user selects the YES button they're indicating they want to reload the file, so

View File

@ -27,6 +27,7 @@ import javax.swing.event.HyperlinkEvent.EventType;
import docking.EmptyBorderToggleButton;
import docking.widgets.HyperlinkComponent;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.label.*;
import ghidra.framework.plugintool.PluginConfigurationModel;
import ghidra.framework.plugintool.PluginTool;
@ -87,7 +88,7 @@ public class PluginManagerComponent extends JPanel implements ChangeListener, Sc
this.pluginPackage = pluginPackage;
JPanel panel = new JPanel(new HorizontalLayout(0));
panel.setBackground(BG);
jCheckBox = new JCheckBox();
jCheckBox = new GCheckBox();
jCheckBox.addActionListener(e -> checkBoxClicked());
if (!pluginPackage.isfullyAddable()) {
jCheckBox.setEnabled(false);

View File

@ -19,26 +19,27 @@ import java.awt.*;
import javax.swing.*;
import docking.widgets.list.GListCellRenderer;
import ghidra.framework.task.GTaskManager;
import ghidra.framework.task.GTaskResult;
import resources.Icons;
import resources.ResourceManager;
public class GTaskResultPanel extends JPanel {
private JList jList;
private JList<GTaskResultInfo> jList;
private CompletedTaskListModel model;
public GTaskResultPanel(GTaskManager taskMgr) {
super(new BorderLayout());
model = new CompletedTaskListModel(taskMgr);
jList = new JList(model);
jList = new JList<>(model);
jList.setCellRenderer(new GTaskResultCellRenderer());
JScrollPane scroll = new JScrollPane(jList);
add(scroll);
setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
}
static class GTaskResultCellRenderer extends DefaultListCellRenderer {
static class GTaskResultCellRenderer extends GListCellRenderer<GTaskResultInfo> {
private static final Icon CANCELLED_ICON =
ResourceManager.loadImage("images/dialog-cancel.png");
private static final Icon EXCEPTION_ICON = Icons.ERROR_ICON;
@ -46,12 +47,14 @@ public class GTaskResultPanel extends JPanel {
ResourceManager.loadImage("images/checkmark_green.gif");
@Override
public Component getListCellRendererComponent(JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
GTaskResultInfo element = (GTaskResultInfo) value;
GTaskResult result = element.getResult();
setText(value.toString());
setIcon(getIcon(result));
protected String getItemText(GTaskResultInfo value) {
return value.toString();
}
@Override
public Component getListCellRendererComponent(JList<? extends GTaskResultInfo> list,
GTaskResultInfo value, int index, boolean isSelected, boolean cellHasFocus) {
setIcon(getIcon(value.getResult()));
setBackground(Color.white);
return this;
}

View File

@ -23,6 +23,7 @@ import java.io.IOException;
import javax.swing.*;
import docking.framework.DockingApplicationConfiguration;
import docking.widgets.checkbox.GCheckBox;
import generic.concurrent.GThreadPool;
import ghidra.GhidraApplicationLayout;
import ghidra.framework.Application;
@ -79,7 +80,7 @@ public class TaskSimulator {
group.add(urgentButton);
mediumButton.setSelected(true);
yieldingCheckbox = new JCheckBox("Yielding");
yieldingCheckbox = new GCheckBox("Yielding");
addGroupButton.addActionListener(new ActionListener() {

View File

@ -23,6 +23,7 @@ import java.io.IOException;
import javax.swing.*;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.label.GHtmlLabel;
import docking.widgets.label.GLabel;
@ -103,7 +104,7 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
gbc.gridx = 3;
gbc.gridwidth = 1;
useOldFileIDCheckBox = new JCheckBox(" Use Old File ID");
useOldFileIDCheckBox = new GCheckBox(" Use Old File ID");
filePanel.add(useOldFileIDCheckBox, gbc);
}