GP-4555 set accessible names for components

This commit is contained in:
GhidraKraken 2024-04-30 15:54:58 -04:00 committed by ghidragon
parent 136a944796
commit 6121818cd3
150 changed files with 1054 additions and 346 deletions

View file

@ -176,8 +176,9 @@ public class DebuggerBlockChooserDialog extends ReusableDialogComponentProvider
panel.add(new JScrollPane(table));
filterPanel = new GhidraTableFilterPanel<>(table, tableModel);
filterPanel.getAccessibleContext().setAccessibleName("Filter");
panel.add(filterPanel, BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Debugger Block Chooser");
addWorkPanel(panel);
addOKButton();

View file

@ -84,6 +84,8 @@ public class DebuggerPlaceBreakpointDialog extends DialogComponentProvider {
JLabel labelAddress = new JLabel("Address");
fieldAddress = new JTextField();
labelAddress.getAccessibleContext().setAccessibleName("Address");
fieldAddress.getAccessibleContext().setAccessibleName("Address");
panel.add(labelAddress);
panel.add(fieldAddress);
@ -112,10 +114,13 @@ public class DebuggerPlaceBreakpointDialog extends DialogComponentProvider {
JLabel labelLength = new JLabel("Length");
fieldLength = new JTextField();
labelLength.getAccessibleContext().setAccessibleName("Length");
fieldLength.getAccessibleContext().setAccessibleName("Length");
panel.add(labelLength);
panel.add(fieldLength);
JLabel labelKinds = new JLabel("Kinds");
labelKinds.getAccessibleContext().setAccessibleName("Kinds");
DefaultComboBoxModel<String> kindModel = new DefaultComboBoxModel<>();
// TODO: Let user select whatever combo?
kindModel.addElement(TraceBreakpointKindSet.encode(Set.of(SW_EXECUTE)));
@ -125,14 +130,17 @@ public class DebuggerPlaceBreakpointDialog extends DialogComponentProvider {
kindModel.addElement(TraceBreakpointKindSet.encode(Set.of(READ, WRITE)));
fieldKinds = new JComboBox<String>(kindModel);
fieldKinds.setEditable(true);
fieldKinds.getAccessibleContext().setAccessibleName("Kinds");
panel.add(labelKinds);
panel.add(fieldKinds);
JLabel labelName = new JLabel("Name");
fieldName = new JTextField();
labelName.getAccessibleContext().setAccessibleName("Name");
fieldName.getAccessibleContext().setAccessibleName("Name");
panel.add(labelName);
panel.add(fieldName);
panel.getAccessibleContext().setAccessibleName("Place Debugger Breakpoint");
addWorkPanel(panel);
addOKButton();

View file

@ -322,7 +322,7 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
{
JPanel opts = new JPanel();
opts.setLayout(new BoxLayout(opts, BoxLayout.Y_AXIS));
opts.getAccessibleContext().setAccessibleName("Options");
{
Box progBox = Box.createHorizontalBox();
progBox.setBorder(BorderFactory.createEmptyBorder(GAP, GAP, GAP, GAP));
@ -336,7 +336,9 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
syncCbRelocateEnabled(getDestination());
reset();
});
comboDestination.getAccessibleContext().setAccessibleName("Combo Destination");
progBox.add(comboDestination);
progBox.getAccessibleContext().setAccessibleName("Program Box");
opts.add(progBox);
}
@ -344,15 +346,16 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
// Avoid Swing's automatic indentation
JPanel inner = new JPanel(new BorderLayout());
inner.setBorder(BorderFactory.createEmptyBorder(0, GAP, GAP, GAP));
cbCapture =
new JCheckBox("<html>Read live target's memory");
cbCapture = new JCheckBox("<html>Read live target's memory");
cbCapture.addActionListener(e -> {
if (!isVisible()) {
return;
}
reset();
});
cbCapture.getAccessibleContext().setAccessibleName("Read Target Memory");
inner.add(cbCapture);
inner.getAccessibleContext().setAccessibleName("Read Target Memory");
opts.add(inner);
}
@ -368,7 +371,9 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
}
reset();
});
cbRelocate.getAccessibleContext().setAccessibleName("Relocate via Mappings");
inner.add(cbRelocate);
inner.getAccessibleContext().setAccessibleName("Relocate via Mappings");
opts.add(inner);
}
@ -383,7 +388,9 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
}
reset();
});
cbUseOverlays.getAccessibleContext().setAccessibleName("Use Overlays");
inner.add(cbUseOverlays);
inner.getAccessibleContext().setAccessibleName("Use Overlays");
opts.add(inner);
}
@ -391,14 +398,17 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
JPanel panelInclude = new JPanel(new GridLayout(0, 2, GAP, GAP));
panelInclude.setBorder(BorderFactory.createTitledBorder("Include:"));
JButton buttonSelectNone = new JButton("Select None");
buttonSelectNone.getAccessibleContext().setAccessibleName("Select None");
buttonSelectNone.addActionListener(e -> plan.selectNone());
panelInclude.add(buttonSelectNone);
JButton buttonSelectAll = new JButton("Select All");
buttonSelectAll.getAccessibleContext().setAccessibleName("Select All");
buttonSelectAll.addActionListener(e -> plan.selectAll());
panelInclude.add(buttonSelectAll);
for (Copier copier : plan.getAllCopiers()) {
panelInclude.add(plan.getCheckBox(copier));
}
panelInclude.getAccessibleContext().setAccessibleName("Include All or None");
opts.add(panelInclude);
}
panel.add(opts, BorderLayout.NORTH);
@ -410,11 +420,14 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
tablePanel.add(new JScrollPane(table));
filterPanel = new GhidraTableFilterPanel<>(table, tableModel);
filterPanel.getAccessibleContext().setAccessibleName("Filter");
tablePanel.add(filterPanel, BorderLayout.SOUTH);
tablePanel.getAccessibleContext().setAccessibleName("Filters");
panel.add(tablePanel, BorderLayout.CENTER);
}
panel.setMinimumSize(new Dimension(600, 600));
panel.getAccessibleContext().setAccessibleName("Copy Debugger Into Program");
addWorkPanel(panel);
addOKButton();
@ -433,6 +446,7 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
resetButton = new JButton("Reset");
resetButton.setMnemonic('R');
resetButton.setName("Reset");
resetButton.getAccessibleContext().setAccessibleName("Reset");
resetButton.addActionListener(e -> resetCallback());
addButton(resetButton);
}
@ -713,8 +727,8 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
List<RangeEntry> result = new ArrayList<>();
Set<String> taken = new HashSet<>();
collectBlockNames(taken, dest);
Collection<MappedAddressRange> mappedSet = staticMappingService
.getOpenMappedViews(source.getTrace(), set, source.getSnap())
Collection<MappedAddressRange> mappedSet =
staticMappingService.getOpenMappedViews(source.getTrace(), set, source.getSnap())
.get(dest);
if (mappedSet == null) {
return;

View file

@ -61,20 +61,23 @@ public class DebuggerAddRegionDialog extends ReusableDialogComponentProvider {
panel.add(fieldPath);
panel.add(new JLabel("Range: "));
fieldRange.getAccessibleContext().setAccessibleName("Range");
panel.add(fieldRange);
panel.add(new JLabel("Length: "));
fieldLength.setFont(Font.decode("monospaced"));
fieldLength.getAccessibleContext().setAccessibleName("Length");
panel.add(fieldLength);
panel.add(new JLabel("Lifespan: "));
fieldLifespan.getAccessibleContext().setAccessibleName("Lifespan");
panel.add(fieldLifespan);
MiscellaneousUtils.rigFocusAndEnter(fieldRange, this::rangeChanged);
MiscellaneousUtils.rigFocusAndEnter(fieldLength, this::lengthChanged);
fieldLifespan.setLifespan(Lifespan.nowOn(0));
panel.getAccessibleContext().setAccessibleName("Debugger Region Addition");
addWorkPanel(panel);
addOKButton();

View file

@ -59,22 +59,28 @@ public class DebuggerAddMappingDialog extends ReusableDialogComponentProvider {
panel.setBorder(new EmptyBorder(10, 10, 10, 10));
panel.add(new JLabel("Program: "));
labelProg.getAccessibleContext().setAccessibleName("Program");
panel.add(labelProg);
panel.add(new JLabel("Static Range: "));
fieldProgRange.getAccessibleContext().setAccessibleName("Program Static Range");
panel.add(fieldProgRange);
panel.add(new JLabel("Trace: "));
labelTrace.getAccessibleContext().setAccessibleName("Trace");
panel.add(labelTrace);
panel.add(new JLabel("Dynamic Range: "));
fieldTraceRange.getAccessibleContext().setAccessibleName("Program Dynamic Range");
panel.add(fieldTraceRange);
panel.add(new JLabel("Length: "));
fieldLength.setFont(Font.decode("monospaced"));
fieldLength.getAccessibleContext().setAccessibleName("Length");
panel.add(fieldLength);
panel.add(new JLabel("Lifespan: "));
fieldSpan.getAccessibleContext().setAccessibleName("Lifespan");
panel.add(fieldSpan);
MiscellaneousUtils.rigFocusAndEnter(fieldProgRange, this::progRangeChanged);
@ -83,7 +89,7 @@ public class DebuggerAddMappingDialog extends ReusableDialogComponentProvider {
MiscellaneousUtils.rigFocusAndEnter(fieldSpan, this::spanChanged);
fieldSpan.setLifespan(Lifespan.nowOn(0));
panel.getAccessibleContext().setAccessibleName("Debugger Mapping Addition");
addWorkPanel(panel);
addApplyButton();
@ -215,8 +221,8 @@ public class DebuggerAddMappingDialog extends ReusableDialogComponentProvider {
protected void applyCallback() {
TraceLocation from = new DefaultTraceLocation(trace, null, fieldSpan.getLifespan(),
fieldTraceRange.getRange().getMinAddress());
ProgramLocation to = new ProgramLocation(program,
fieldProgRange.getRange().getMinAddress());
ProgramLocation to =
new ProgramLocation(program, fieldProgRange.getRange().getMinAddress());
try {
mappingService.addMapping(from, to, getLength(), false);
@ -244,8 +250,8 @@ public class DebuggerAddMappingDialog extends ReusableDialogComponentProvider {
* @param lifespan the lifespan
* @throws AddressOverflowException if the length is too large for either space
*/
public void setValues(Program program, Trace trace, Address progStart,
Address traceStart, long length, Lifespan lifespan) throws AddressOverflowException {
public void setValues(Program program, Trace trace, Address progStart, Address traceStart,
long length, Lifespan lifespan) throws AddressOverflowException {
// NB. This dialog will not validate these. The caller is responsible.
this.program = program;
this.trace = trace;

View file

@ -183,18 +183,24 @@ public class DebuggerSelectPlatformOfferDialog extends DialogComponentProvider {
offerTable = new GhidraTable(offerTableModel);
offerTableFilterPanel = new GhidraTableFilterPanel<>(offerTable, offerTableModel);
scrollPane.setViewportView(offerTable);
scrollPane.getAccessibleContext().setAccessibleName("Scroll");
offerTableFilterPanel.getAccessibleContext().setAccessibleName("Offer Table Filter");
JPanel descPanel = new JPanel(new BorderLayout());
descPanel.setBorder(BorderFactory.createTitledBorder("Description"));
descLabel.getAccessibleContext().setAccessibleName("Description");
descPanel.add(descLabel, BorderLayout.CENTER);
descPanel.getAccessibleContext().setAccessibleName("Description");
JPanel nested1 = new JPanel(new BorderLayout());
nested1.add(scrollPane, BorderLayout.CENTER);
nested1.add(offerTableFilterPanel, BorderLayout.SOUTH);
nested1.getAccessibleContext().setAccessibleName("Offer Table Filter");
JPanel nested2 = new JPanel(new BorderLayout());
nested2.add(nested1, BorderLayout.CENTER);
nested2.add(descPanel, BorderLayout.SOUTH);
nested2.getAccessibleContext().setAccessibleName("Table Filter and Description");
setLayout(new BorderLayout());
add(nested2, BorderLayout.CENTER);
@ -209,6 +215,7 @@ public class DebuggerSelectPlatformOfferDialog extends DialogComponentProvider {
overrideCheckBox.addActionListener(evt -> {
setFilterRecommended(overrideCheckBox.isSelected());
});
overrideCheckBox.getAccessibleContext().setAccessibleName("Override Checkbox");
}
public void setPreferredIDs(LanguageID langID, CompilerSpecID csID) {
@ -276,6 +283,7 @@ public class DebuggerSelectPlatformOfferDialog extends DialogComponentProvider {
super(DebuggerResources.NAME_CHOOSE_PLATFORM, true, false, true, false);
offerPanel = new OfferPanel(tool);
offerPanel.getAccessibleContext().setAccessibleName("Debugger Select Platform Offer");
populateComponents();
}

View file

@ -64,8 +64,7 @@ public class DebuggerAvailableRegistersDialog extends ReusableDialogComponentPro
@SuppressWarnings("unchecked")
<T> AvailableRegisterTableColumns(String header, Class<T> cls,
Function<AvailableRegisterRow, T> getter,
BiConsumer<AvailableRegisterRow, T> setter,
boolean sortable) {
BiConsumer<AvailableRegisterRow, T> setter, boolean sortable) {
this.header = header;
this.cls = cls;
this.getter = getter;
@ -145,12 +144,14 @@ public class DebuggerAvailableRegistersDialog extends ReusableDialogComponentPro
availableTable = new GTable(availableTableModel);
// Selection is actually via checkboxes
availableTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
availableTable.getAccessibleContext().setAccessibleName("Selection Choices");
panel.add(new JScrollPane(availableTable));
availableTable.setAutoLookupColumn(AvailableRegisterTableColumns.NAME.ordinal());
availableFilterPanel = new GhidraTableFilterPanel<>(availableTable, availableTableModel);
availableFilterPanel.getAccessibleContext().setAccessibleName("Available Filters");
panel.add(availableFilterPanel, BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Available Debugger Registers");
addWorkPanel(panel);
TableColumnModel columnModel = availableTable.getColumnModel();

View file

@ -71,6 +71,7 @@ public class DebuggerTimeSelectionDialog extends DialogComponentProvider {
hbox.setBorder(BorderFactory.createTitledBorder("Schedule"));
hbox.add(new JLabel("Expression: "));
scheduleText = new JTextField();
scheduleText.getAccessibleContext().setAccessibleName("Schedule");
hbox.add(scheduleText);
hbox.add(new JLabel("Ticks: "));
hbox.add(tickBack = new GButton(DebuggerResources.ICON_STEP_BACK));
@ -78,6 +79,7 @@ public class DebuggerTimeSelectionDialog extends DialogComponentProvider {
hbox.add(new JLabel("Ops: "));
hbox.add(opBack = new GButton(DebuggerResources.ICON_STEP_BACK));
hbox.add(opStep = new GButton(DebuggerResources.ICON_STEP_INTO));
hbox.getAccessibleContext().setAccessibleName("Schedule");
workPanel.add(hbox, BorderLayout.NORTH);
}
@ -88,6 +90,7 @@ public class DebuggerTimeSelectionDialog extends DialogComponentProvider {
{
snapshotPanel = new DebuggerSnapshotTablePanel(tool);
snapshotPanel.getAccessibleContext().setAccessibleName("Snapshot");
workPanel.add(snapshotPanel, BorderLayout.CENTER);
}
@ -118,7 +121,7 @@ public class DebuggerTimeSelectionDialog extends DialogComponentProvider {
scheduleTextChanged();
}
});
workPanel.getAccessibleContext().setAccessibleName("Debugger Time Selection");
addWorkPanel(workPanel);
addOKButton();
addCancelButton();

View file

@ -57,6 +57,7 @@ public class MultiChoiceSelectionDialog<T> extends DialogComponentProvider {
model = new ChoiceTableModel(choices, selected, dataConverter, dataTitle);
filterTable = new GFilterTable<ChoiceRowObject>(model);
panel.add(filterTable);
panel.getAccessibleContext().setAccessibleName("Multi Choice Selection");
return panel;
}

View file

@ -86,6 +86,7 @@ public abstract class AbstractBSimSearchDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(buildNorthPanel(), BorderLayout.NORTH);
panel.add(buildCenterPanel(), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("BSim Search");
return panel;
}
@ -93,6 +94,7 @@ public abstract class AbstractBSimSearchDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new VerticalLayout(10));
panel.add(buildServerPanel());
panel.add(createTitledPanel("Options", buildOptionsPanel(), false));
panel.getAccessibleContext().setAccessibleName("Server and Options");
return panel;
}
@ -104,6 +106,7 @@ public abstract class AbstractBSimSearchDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new PairLayout(10, 10));
panel.add(new JLabel("BSim Server:"));
panel.add(buildServerComponent());
panel.getAccessibleContext().setAccessibleName("Server");
return panel;
}
@ -129,6 +132,7 @@ public abstract class AbstractBSimSearchDialog extends DialogComponentProvider {
panel.add(similarityField);
panel.add(confidenceLabel);
panel.add(confidenceField);
panel.getAccessibleContext().setAccessibleName("Options");
return panel;
}

View file

@ -121,19 +121,24 @@ public class CreateBsimServerInfoDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
panel.add(buildTypePanel(), BorderLayout.NORTH);
panel.add(buildCardPanel(), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Create Bsim Server Info");
return panel;
}
private Component buildCardPanel() {
postgresPanel = new DbPanel(DBType.postgres);
postgresPanel.getAccessibleContext().setAccessibleName("Postgress");
elasticPanel = new DbPanel(DBType.elastic);
elasticPanel.getAccessibleContext().setAccessibleName("Elastic");
filePanel = new FilePanel();
filePanel.getAccessibleContext().setAccessibleName("File");
cardPanel = new JPanel(new CardLayout());
cardPanel.add(postgresPanel, POSTGRES);
cardPanel.add(elasticPanel, ELASTIC);
cardPanel.add(filePanel, FILE_H2);
activePanel = postgresPanel;
cardPanel.getAccessibleContext().setAccessibleName("Cards");
return cardPanel;
}
@ -143,8 +148,11 @@ public class CreateBsimServerInfoDialog extends DialogComponentProvider {
JPanel innerPanel = new JPanel(new HorizontalLayout(20));
ButtonGroup group = new ButtonGroup();
postgresButton = new GRadioButton(POSTGRES);
postgresButton.getAccessibleContext().setAccessibleName("Postgress");
elasticButton = new GRadioButton(ELASTIC);
elasticButton.getAccessibleContext().setAccessibleName("Elastic");
fileButton = new GRadioButton(FILE_H2);
fileButton.getAccessibleContext().setAccessibleName("File");
postgresButton.setSelected(true);
@ -160,8 +168,10 @@ public class CreateBsimServerInfoDialog extends DialogComponentProvider {
innerPanel.add(postgresButton);
innerPanel.add(elasticButton);
innerPanel.add(fileButton);
innerPanel.getAccessibleContext().setAccessibleName("Buttons");
panel.add(innerPanel);
panel.getAccessibleContext().setAccessibleName("Types");
return panel;
}

View file

@ -76,6 +76,7 @@ public class SelectedFunctionsTableDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(buildFunctionsTable(getProgram(), goToService), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Selected Functions Table");
return panel;
}
@ -84,6 +85,7 @@ public class SelectedFunctionsTableDialog extends DialogComponentProvider {
GhidraFilterTable<FunctionSymbol> table = new GhidraFilterTable<>(model);
table.setNavigateOnSelectionEnabled(true);
table.installNavigation(goToService);
table.getAccessibleContext().setAccessibleName("Functions");
return table;
}

View file

@ -57,6 +57,7 @@ public class AnalysisOptionsDialog extends DialogComponentProvider
setHelpLocation(new HelpLocation("AutoAnalysisPlugin", "AnalysisOptions"));
panel = new AnalysisPanel(programs, editorStateFactory, this);
panel.setToLastUsedAnalysisOptionsIfProgramNotAnalyzed();
panel.getAccessibleContext().setAccessibleName("Analysis Options");
addWorkPanel(panel);
addOKButton();
addCancelButton();

View file

@ -74,10 +74,11 @@ public class ArchiveDialog extends ReusableDialogComponentProvider {
protected JPanel buildMainPanel() {
GridBagLayout gbl = new GridBagLayout();
JPanel outerPanel = new JPanel(gbl);
outerPanel.getAccessibleContext().setAccessibleName("Archive");
archiveLabel = new GDLabel(" Archive File ");
archiveField = new JTextField();
archiveField.setName("archiveField");
archiveField.getAccessibleContext().setAccessibleName("Archive Field");
archiveField.setColumns(NUM_TEXT_COLUMNS);
archiveBrowse = new JButton(ArchivePlugin.DOT_DOT_DOT);
archiveBrowse.addActionListener(e -> {
@ -95,6 +96,7 @@ public class ArchiveDialog extends ReusableDialogComponentProvider {
Gui.registerFont(archiveBrowse, Font.BOLD);
archiveBrowse.setName("archiveBrowse");
archiveBrowse.getAccessibleContext().setAccessibleName("Browse Archive");
// Layout the components.
GridBagConstraints gbc = new GridBagConstraints();

View file

@ -78,12 +78,15 @@ public class RestoreDialog extends ReusableDialogComponentProvider {
// Create the individual components that make up the panel.
archiveLabel = new GDLabel(" Archive File ");
archiveLabel.getAccessibleContext().setAccessibleName("Archive File");
archiveField = new JTextField();
archiveField.setColumns(NUM_TEXT_COLUMNS);
archiveField.setName("archiveField");
archiveField.getAccessibleContext().setAccessibleName("Archive");
archiveBrowse = new JButton(ArchivePlugin.DOT_DOT_DOT);
archiveBrowse.setName("archiveButton");
archiveBrowse.getAccessibleContext().setAccessibleName("Archive");
archiveBrowse.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -117,12 +120,15 @@ public class RestoreDialog extends ReusableDialogComponentProvider {
Gui.registerFont(archiveBrowse, Font.BOLD);
restoreLabel = new GDLabel(" Restore Directory ");
restoreLabel.getAccessibleContext().setAccessibleName("Restore Directory");
restoreField = new JTextField();
restoreField.setName("restoreField");
restoreField.getAccessibleContext().setAccessibleName("Restore");
restoreField.setColumns(RestoreDialog.NUM_TEXT_COLUMNS);
restoreBrowse = new JButton(ArchivePlugin.DOT_DOT_DOT);
restoreBrowse.setName("restoreButton");
restoreBrowse.getAccessibleContext().setAccessibleName("Restore Browse");
restoreBrowse.addActionListener(e -> {
String dirPath = chooseDirectory("Choose restore directory",
"Select the directory for restoring the project.");
@ -134,8 +140,10 @@ public class RestoreDialog extends ReusableDialogComponentProvider {
Gui.registerFont(restoreBrowse, Font.BOLD);
projectNameLabel = new GDLabel(" Project Name ");
projectNameLabel.getAccessibleContext().setAccessibleName("Project Name");
projectNameField = new JTextField();
projectNameField.setName("projectNameField");
projectNameField.getAccessibleContext().setAccessibleName("Project Name");
projectNameField.setColumns(RestoreDialog.NUM_TEXT_COLUMNS);
projectNameField.addActionListener(e -> {
@ -206,7 +214,7 @@ public class RestoreDialog extends ReusableDialogComponentProvider {
gbc.gridy = 1;
gbl.setConstraints(restoreBrowse, gbc);
outerPanel.add(restoreBrowse);
outerPanel.getAccessibleContext().setAccessibleName("Restore");
return outerPanel;
}

View file

@ -96,7 +96,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
panel.add(buildIconLabel(), BorderLayout.WEST);
panel.add(buildCentralPanel(), BorderLayout.CENTER);
panel.add(buildCheckboxPanel(), BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Bookmark Creation");
return panel;
}
@ -106,6 +106,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
panel.add(selectionCB);
panel.getAccessibleContext().setAccessibleName("Selection Ranges");
return panel;
}
@ -125,7 +126,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
panel.add(new JLabel("Description: ", SwingConstants.RIGHT));
panel.add(descriptionTextField);
panel.getAccessibleContext().setAccessibleName("Bookmark Details");
return panel;
}
@ -142,6 +143,7 @@ public class CreateBookmarkDialog extends DialogComponentProvider {
JLabel imageLabel = new GIconLabel(icon);
imageLabel.setPreferredSize(
new Dimension(icon.getIconWidth() + 20, icon.getIconHeight() + 20));
imageLabel.getAccessibleContext().setAccessibleName("Icons");
return imageLabel;
}

View file

@ -47,6 +47,7 @@ class FilterDialog extends DialogComponentProvider {
private JComponent buildPanel(Program program) {
JPanel p = new JPanel(new VerticalLayout(20));
p.add(getTypesPanel(program));
p.getAccessibleContext().setAccessibleName("Bookmark Filter");
return p;
}
@ -58,14 +59,18 @@ class FilterDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createTitledBorder("Include Bookmark Types"));
for (int i = 0; i < types.length; i++) {
buttons[i] = new GCheckBox();
buttons[i].getAccessibleContext().setAccessibleDescription(types[i].getTypeString());
JPanel p = new JPanel(new BorderLayout());
p.add(buttons[i], BorderLayout.WEST);
buttons[i].setSelected(provider.isShowingType(types[i].getTypeString()));
JLabel l =
new GLabel(types[i].getTypeString(), types[i].getIcon(), SwingConstants.LEFT);
p.add(l, BorderLayout.CENTER);
p.getAccessibleContext()
.setAccessibleName(types[i].getTypeString() + " Button and Label");
panel.add(p);
}
panel.getAccessibleContext().setAccessibleName("Bookmark Inclusion");
return panel;
}

View file

@ -91,16 +91,20 @@ public class ClearFlowDialog extends DialogComponentProvider {
panel = new JPanel();
panel.setLayout(new BorderLayout(10, 10));
panel.getAccessibleContext().setAccessibleName("Clear Flow Options");
panel.add(new GLabel("Clear Flow Options:"), BorderLayout.NORTH);
JPanel cbPanel = new JPanel();
BoxLayout bl = new BoxLayout(cbPanel, BoxLayout.Y_AXIS);
cbPanel.setLayout(bl);
cbPanel.getAccessibleContext().setAccessibleName("Checkboxes");
symbolsCb = new GCheckBox("Clear Symbols");
symbolsCb.getAccessibleContext().setAccessibleName("Clear Symbols");
dataCb = new GCheckBox("Clear Data");
dataCb.getAccessibleContext().setAccessibleName("Clear Data");
repairCb = new GCheckBox("Repair Flow");
repairCb.getAccessibleContext().setAccessibleName("Repair Flow");
symbolsCb.setSelected(false);
symbolsCb.addKeyListener(listener);

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,9 +15,6 @@
*/
package ghidra.app.plugin.core.clipboard;
import ghidra.app.util.ClipboardType;
import ghidra.util.HelpLocation;
import java.awt.BorderLayout;
import java.awt.event.*;
import java.util.List;
@ -28,7 +24,8 @@ import javax.swing.border.TitledBorder;
import docking.DialogComponentProvider;
import docking.widgets.list.ListPanel;
import ghidra.app.util.ClipboardType;
import ghidra.util.HelpLocation;
public class CopyPasteSpecialDialog extends DialogComponentProvider {
@ -78,14 +75,13 @@ public class CopyPasteSpecialDialog extends DialogComponentProvider {
}
}
});
listPanel.getAccessibleContext().setAccessibleName("Available Types");
mainPanel.add(listPanel, BorderLayout.CENTER);
mainPanel.setBorder(new TitledBorder("Select Format"));
mainPanel.getAccessibleContext().setAccessibleName("Copy Paste Special");
return mainPanel;
}
@Override
protected void okCallback() {
close();

View file

@ -145,7 +145,6 @@ public class BitFieldEditorDialog extends DialogComponentProvider {
BitFieldEditorPanel.BitFieldEditorContext editorContext =
(BitFieldEditorPanel.BitFieldEditorContext) context;
bitFieldEditorPanel.initAdd(null, editorContext.getAllocationOffset(),
editorContext.getSelectedBitOffset(), true);
setApplyEnabled(true);
@ -279,6 +278,7 @@ public class BitFieldEditorDialog extends DialogComponentProvider {
else {
initEdit(editOrdinal, false);
}
bitFieldEditorPanel.getAccessibleContext().setAccessibleName("Bit Field Editor");
return bitFieldEditorPanel;
}

View file

@ -193,18 +193,22 @@ class ParseDialog extends ReusableDialogComponentProvider {
comboBox = new GhidraComboBox<>(comboModel);
comboItemListener = e -> selectionChanged(e);
comboBox.getAccessibleContext().setAccessibleName("Parse Configurations");
comboBox.addItemListener(comboItemListener);
JPanel cPanel = new JPanel(new BorderLayout());
cPanel.setBorder(BorderFactory.createTitledBorder("Parse Configuration"));
cPanel.add(comboBox);
cPanel.getAccessibleContext().setAccessibleName("Configuration");
JPanel comboPanel = new JPanel(new BorderLayout());
comboPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
comboPanel.getAccessibleContext().setAccessibleName("Configurations");
comboPanel.add(cPanel);
// enable edits, add to bottom, ordered
pathPanel = new PathnameTablePanel(null, true, false, true);
pathPanel.setBorder(BorderFactory.createTitledBorder("Source files to parse"));
pathPanel.getAccessibleContext().setAccessibleName("Path");
String importDir = Preferences.getProperty(LAST_IMPORT_C_DIRECTORY);
if (importDir == null) {
importDir = Preferences.getProperty(Preferences.LAST_PATH_DIRECTORY);
@ -223,6 +227,7 @@ class ParseDialog extends ReusableDialogComponentProvider {
public Component getTableCellRendererComponent(GTableCellRenderingData data) {
JLabel label = (JLabel) super.getTableCellRendererComponent(data);
label.getAccessibleContext().setAccessibleName("Path Data");
Object value = data.getValue();
String pathName = (String) value;
@ -245,7 +250,6 @@ class ParseDialog extends ReusableDialogComponentProvider {
if (!fileExists) {
label.setForeground(getErrorForegroundColor(data.isSelected()));
}
return label;
}
});
@ -275,6 +279,7 @@ class ParseDialog extends ReusableDialogComponentProvider {
parsePathTableModel.addTableModelListener(parsePathTableListener);
JPanel optionsPanel = new JPanel(new BorderLayout());
optionsPanel.getAccessibleContext().setAccessibleName("Options");
optionsPanel.setBorder(BorderFactory.createTitledBorder("Parse Options"));
// create options field
@ -282,10 +287,12 @@ class ParseDialog extends ReusableDialogComponentProvider {
parseOptionsField = new JTextArea(5, 70);
JScrollPane pane = new JScrollPane(parseOptionsField);
pane.getViewport().setPreferredSize(new Dimension(300, 200));
pane.getAccessibleContext().setAccessibleName("Options");
optionsPanel.add(pane, BorderLayout.CENTER);
JPanel archPanel = new JPanel(new BorderLayout());
archPanel.setBorder(BorderFactory.createTitledBorder("Program Architecture:"));
archPanel.getAccessibleContext().setAccessibleName("Program Architecture");
archPanel.add(new GLabel(" ", SwingConstants.RIGHT));
languagePanel = buildLanguagePanel();
archPanel.add(languagePanel);
@ -295,11 +302,13 @@ class ParseDialog extends ReusableDialogComponentProvider {
parseButton = new JButton("Parse to Program");
parseButton.addActionListener(ev -> doParse(false));
parseButton.setToolTipText("Parse files and add data types to current program");
parseButton.getAccessibleContext().setAccessibleName("Parse to Program");
addButton(parseButton);
parseToFileButton = new JButton("Parse to File...");
parseToFileButton.addActionListener(ev -> doParse(true));
parseToFileButton.setToolTipText("Parse files and output to archive file");
parseToFileButton.getAccessibleContext().setAccessibleName("Parse to File");
addButton(parseToFileButton);
mainPanel.add(comboPanel, BorderLayout.NORTH);
@ -307,10 +316,12 @@ class ParseDialog extends ReusableDialogComponentProvider {
includePathPanel.setPreferredSize(new Dimension(pathPanel.getPreferredSize().width, 200));
JSplitPane optionsPane =
new JSplitPane(JSplitPane.VERTICAL_SPLIT, includePathPanel, optionsPanel);
optionsPane.getAccessibleContext().setAccessibleName("Include Path and Options");
optionsPane.setResizeWeight(0.50);
pathPanel.setPreferredSize(new Dimension(pathPanel.getPreferredSize().width, 200));
JSplitPane outerPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, pathPanel, optionsPane);
outerPane.getAccessibleContext().setAccessibleName("Path and Options");
outerPane.setResizeWeight(0.50);
mainPanel.add(outerPane, BorderLayout.CENTER);
@ -322,6 +333,7 @@ class ParseDialog extends ReusableDialogComponentProvider {
loadProfile();
initialBuild = false;
mainPanel.getAccessibleContext().setAccessibleName("Parse");
return mainPanel;
}

View file

@ -155,8 +155,7 @@ public abstract class AbstractSettingsDialog extends DialogComponentProvider {
if (settingsDefinition instanceof NumberSettingsDefinition) {
String propertyName = getHexModePropertyName(settingsDefinition);
boolean hexMode = Boolean
.valueOf(
Preferences.getProperty(propertyName, Boolean.FALSE.toString()));
.valueOf(Preferences.getProperty(propertyName, Boolean.FALSE.toString()));
intHexModeMap.put(settingsDefinition.getName(), hexMode);
}
}
@ -223,7 +222,7 @@ public abstract class AbstractSettingsDialog extends DialogComponentProvider {
if (hasImmutableSettings) {
workPanel.add(new JLabel("* Immutable setting"), BorderLayout.SOUTH);
}
workPanel.getAccessibleContext().setAccessibleName("Settings");
return workPanel;
}

View file

@ -105,7 +105,7 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
setStatusJustification(SwingConstants.LEFT);
setCreateStructureByName(true);
mainPanel.getAccessibleContext().setAccessibleName("Create Structure");
return mainPanel;
}
@ -131,6 +131,7 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
nameTextField.requestFocus();
}
});
nameTextField.getAccessibleContext().setAccessibleName("Name Text");
namePanel.add(nameTextField);
nameTextField.getDocument().addDocumentListener(new DocumentListener() {
@ -166,7 +167,7 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
}
}
});
namePanel.getAccessibleContext().setAccessibleName("Name Text");
return namePanel;
}
@ -188,13 +189,15 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
};
JScrollPane scrollPane = new JScrollPane(table);
scrollPane.getAccessibleContext().setAccessibleName("Scroll");
structurePanel.add(scrollPane);
structurePanel.add(Box.createVerticalStrut(10));
filterPanel.getAccessibleContext().setAccessibleName("Structure Filter");
structurePanel.add(filterPanel);
structurePanel.add(Box.createVerticalStrut(10));
structurePanel.add(buildMatchingStyelPanel());
structurePanel.add(Box.createVerticalStrut(10));
structurePanel.getAccessibleContext().setAccessibleName("Matching Structure");
return structurePanel;
}
@ -223,8 +226,9 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
!(sourceListSelectionModel.isSelectionEmpty())) {
// show the user that the structure choice is now
// coming from the list of current structures
Structure structure = ((StructureWrapper) matchingStructuresTable.getValueAt(
matchingStructuresTable.getSelectedRow(), 0)).getStructure();
Structure structure = ((StructureWrapper) matchingStructuresTable
.getValueAt(matchingStructuresTable.getSelectedRow(), 0))
.getStructure();
updateStatusText(false, structure.getName());
setCreateStructureByName(false);
}
@ -234,7 +238,7 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
}
}
});
matchingStructuresTable.getAccessibleContext().setAccessibleName("Matching Structures");
return matchingStructuresTable;
}
@ -246,11 +250,13 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
}
};
matchingStylePanel.setLayout(new BoxLayout(matchingStylePanel, BoxLayout.X_AXIS));
matchingStylePanel.setBorder(
new TitledBorder(BorderFactory.createEmptyBorder(), "Matching: "));
matchingStylePanel
.setBorder(new TitledBorder(BorderFactory.createEmptyBorder(), "Matching: "));
exactMatchButton = new GRadioButton("Exact");
exactMatchButton.getAccessibleContext().setAccessibleName("Exact Match");
sizeMatchButton = new GRadioButton("Size");
sizeMatchButton.getAccessibleContext().setAccessibleName("Size Match");
exactMatchButton.setToolTipText(
"Match structures with the same " + "number and type of data elements");
@ -269,7 +275,7 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
matchingStylePanel.add(exactMatchButton);
matchingStylePanel.add(sizeMatchButton);
matchingStylePanel.getAccessibleContext().setAccessibleName("Matching Style");
return matchingStylePanel;
}
@ -485,8 +491,8 @@ public class CreateStructureDialog extends ReusableDialogComponentProvider {
}
else {
// get the selected object in the table
currentStructure = ((StructureWrapper) matchingStructuresTable.getValueAt(
matchingStructuresTable.getSelectedRow(), 0)).getStructure();
currentStructure = ((StructureWrapper) matchingStructuresTable
.getValueAt(matchingStructuresTable.getSelectedRow(), 0)).getStructure();
}
close();

View file

@ -74,6 +74,7 @@ class RenameDataFieldDialog extends DialogComponentProvider {
private JPanel create() {
recentChoices = new GhidraComboBox<>();
recentChoices.getAccessibleContext().setAccessibleName("Recent Choices");
recentChoices.setEditable(true);
JPanel mainPanel = new JPanel(new BorderLayout());
@ -81,7 +82,7 @@ class RenameDataFieldDialog extends DialogComponentProvider {
Border border = BorderFactory.createTitledBorder("Data Field Name");
topPanel.setBorder(border);
topPanel.getAccessibleContext().setAccessibleName("Recent Choices");
mainPanel.add(topPanel, BorderLayout.NORTH);
topPanel.add(recentChoices, BorderLayout.NORTH);
@ -93,7 +94,7 @@ class RenameDataFieldDialog extends DialogComponentProvider {
}
});
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
mainPanel.getAccessibleContext().setAccessibleName("Rename Data Field");
return mainPanel;
}

View file

@ -52,11 +52,15 @@ public class DataTypeSyncDialog extends DialogComponentProvider implements DataT
this.operationName = operationName;
syncPanel = new DataTypeSyncPanel(list, preselectedInfos, this);
syncPanel.getAccessibleContext().setAccessibleName("Data Sync");
comparePanel = new DataTypeComparePanel(clientName, sourceName);
comparePanel.getAccessibleContext().setAccessibleName("Compare Data");
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, syncPanel, comparePanel);
splitPane.setResizeWeight(0.6);
splitPane.getAccessibleContext().setAccessibleName("Data Sync and Compare");
mainPanel = new JPanel(new BorderLayout());
mainPanel.add(splitPane, BorderLayout.CENTER);
mainPanel.getAccessibleContext().setAccessibleName("Data Type Sync");
addWorkPanel(mainPanel);
initialize();
createActions();

View file

@ -65,6 +65,8 @@ class DataTypeSyncPanel extends JPanel {
TableModel model = table.getModel();
cb.setEnabled(model.isCellEditable(row, column));
c.getAccessibleContext().setAccessibleName("Sync Boolean Reader");
return c;
}
}
@ -80,12 +82,15 @@ class DataTypeSyncPanel extends JPanel {
syncTable = new GhidraTable(tableModel);
syncTable.setDefaultRenderer(Boolean.class, new DataTypeSyncBooleanRenderer());
syncTable.getAccessibleContext().setAccessibleName("Sync");
JScrollPane sp = new JScrollPane(syncTable);
sp.getAccessibleContext().setAccessibleName("Sync Scroll");
Dimension d = new Dimension(940, 200);
syncTable.setPreferredScrollableViewportSize(d);
syncTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
tableFilterPanel = new GhidraTableFilterPanel<>(syncTable, tableModel);
tableFilterPanel.getAccessibleContext().setAccessibleName("Table Filter");
add(sp, BorderLayout.CENTER);
add(tableFilterPanel, BorderLayout.SOUTH);
tableModel.fireTableDataChanged();

View file

@ -69,8 +69,9 @@ class AnnotationHandlerDialog extends DialogComponentProvider {
JPanel create() {
JPanel outerPanel = new JPanel(new BorderLayout());
outerPanel.getAccessibleContext().setAccessibleName("Annotation Handler");
handlerComboBox = new GhidraComboBox<>(handlerList);
handlerComboBox.getAccessibleContext().setAccessibleName("Combo Box");
handlerComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {

View file

@ -110,9 +110,10 @@ public class DataTypeChooserDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
messageLabel = new GLabel("Choose the data type you wish to use.");
messageLabel.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 2));
messageLabel.getAccessibleContext().setAccessibleName("Message");
panel.add(messageLabel, BorderLayout.NORTH);
panel.add(this.tree, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Data Type Chooser");
return panel;
}

View file

@ -79,20 +79,24 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
protected JPanel buildMainPanel() {
mainPanel = new JPanel(new BorderLayout());
mainPanel.getAccessibleContext().setAccessibleName("Address Table");
// Find Button
searchButton = new JButton("Search");
searchButton.addActionListener(e -> searchSelection());
searchButton.getAccessibleContext().setAccessibleName("Search");
// right panel for populating results and selecting tables to disassemble
JPanel resultsPanel = new JPanel(new BorderLayout());
resultsPanel.setPreferredSize(new Dimension(600, 300));
resultsPanel.setBorder(BorderFactory.createTitledBorder("Possible Address Tables"));
resultsPanel.getAccessibleContext().setAccessibleName("Results");
// create right side query results table with three columns
resultsTablePanel = new GhidraThreadedTablePanel<>(plugin.getModel());
resultsTable = resultsTablePanel.getTable();
resultsTable.installNavigation(plugin.getTool());
resultsTable.getAccessibleContext().setAccessibleName("Results");
ListSelectionModel selModel = resultsTable.getSelectionModel();
selModel.addListSelectionListener(e -> {
@ -119,31 +123,36 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
// make button panel for right panel
JPanel makeTablePanel = new JPanel(new FlowLayout());
makeTablePanel.getAccessibleContext().setAccessibleName("Make Table");
makeTableButton = new JButton("Make Table");
makeTableButton.setToolTipText("Make a table of addresses at the selected location(s).");
makeTableButton.getAccessibleContext().setAccessibleName("Make Table");
makeTablePanel.add(makeTableButton);
makeTableButton.setEnabled(false);
makeTableButton.addActionListener(e -> plugin.makeTable(resultsTable.getSelectedRows()));
JPanel disassemblePanel = new JPanel(new FlowLayout());
disassemblePanel.getAccessibleContext().setAccessibleName("Disassemble");
disassembleTableButton = new JButton("Disassemble");
disassembleTableButton.setToolTipText(
"Disassemble at all locations pointed to by the selected address table(s) members.");
disassembleTableButton.getAccessibleContext().setAccessibleName("Dissasemble");
disassembleTableButton.setEnabled(false);
disassemblePanel.add(disassembleTableButton);
disassembleTableButton.addActionListener(
e -> plugin.disassembleTable(resultsTable.getSelectedRows()));
disassembleTableButton
.addActionListener(e -> plugin.disassembleTable(resultsTable.getSelectedRows()));
// make bottom of right panel
JPanel myButtonPanel = new JPanel(new FlowLayout());
myButtonPanel.add(makeTablePanel);
myButtonPanel.add(disassemblePanel);
myButtonPanel.getAccessibleContext().setAccessibleName("Buttons");
// search options panel
JPanel searchOptionsPanel = new JPanel(new BorderLayout());
searchOptionsPanel.setBorder(BorderFactory.createTitledBorder("Search Options"));
searchOptionsPanel.getAccessibleContext().setAccessibleName("Search Options");
JLabel minLengthLabel = new GLabel("Minimum Length: ");
minLengthLabel.setToolTipText(
@ -151,14 +160,17 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
minLengthField = new JTextField(5);
minLengthField.setName("Minimum Length");
minLengthField.setText(Integer.toString(DEFAULT_MINIMUM_TABLE_SIZE));
minLengthField.getAccessibleContext().setAccessibleName("Minimum Length for Table");
JPanel minLengthPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
minLengthPanel.add(minLengthLabel);
minLengthPanel.add(minLengthField);
minLengthPanel.getAccessibleContext().setAccessibleName("Minimum Length");
alignLabel = new GDLabel("Alignment: ");
alignField = new JTextField(5);
alignField.setName("Alignment");
alignField.getAccessibleContext().setAccessibleName("Alignment");
alignLabel.setToolTipText(
"Alignment that address tables and what they are pointing to must satisfy.");
int align = plugin.getProgram().getLanguage().getInstructionAlignment();
@ -170,29 +182,36 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
skipLabel = new GDLabel("Skip Length: ");
skipField = new JTextField(5);
skipField.setName("Skip");
skipField.getAccessibleContext().setAccessibleName("Skip");
skipLabel.setToolTipText("Number of bytes to skip between found addresses in a table.");
skipField.setText("0");
JPanel alignPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
alignPanel.add(alignLabel);
alignPanel.add(alignField);
alignPanel.getAccessibleContext().setAccessibleName("Alignment");
JPanel skipPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
skipPanel.add(skipLabel);
skipPanel.add(skipField);
skipPanel.getAccessibleContext().setAccessibleName("Skip");
JPanel optPanel = new JPanel(new GridLayout(3, 1));
optPanel.add(minLengthPanel);
optPanel.add(alignPanel);
optPanel.add(skipPanel);
optPanel.getAccessibleContext().setAccessibleName("Options");
selectionButton = new GCheckBox("Search Selection");
selectionButton.setSelected(false);
selectionButton.setToolTipText("If checked, search only the current selection.");
selectionButton.getAccessibleContext().setAccessibleName("Use Selection");
JPanel searchOptionsWestPanel = new JPanel(new GridLayout(2, 1));
searchOptionsWestPanel.getAccessibleContext().setAccessibleDescription("Search Options");
searchOptionsWestPanel.add(selectionButton);
shiftedAddressButton = new GCheckBox("Shifted Addresses");
shiftedAddressButton.getAccessibleContext().setAccessibleName("Shifted Addresses");
boolean allowShiftedAddresses =
plugin.getProgram().getDataTypeManager().getDataOrganization().getPointerShift() != 0;
@ -214,37 +233,44 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
searchOptionsPanel.add(searchOptionsWestPanel, BorderLayout.WEST);
JPanel findPanel = new JPanel(new FlowLayout());
findPanel.add(searchButton);
findPanel.getAccessibleContext().setAccessibleName("Find");
searchOptionsPanel.add(findPanel, BorderLayout.SOUTH);
JPanel makeOptionsPanel = new JPanel(new BorderLayout());
makeOptionsPanel.setBorder(BorderFactory.createTitledBorder("Make Table Options"));
makeOptionsPanel.getAccessibleContext().setAccessibleName("Make Table Options");
autoLabelCB = new GCheckBox("Auto Label");
autoLabelCB.setSelected(true);
autoLabelCB.setEnabled(false);
autoLabelCB.setToolTipText(
"Label the top of the address table and all members of the table.");
autoLabelCB
.setToolTipText("Label the top of the address table and all members of the table.");
autoLabelCB.getAccessibleContext().setAccessibleName("Auto Label");
offsetLabel = new GDLabel("Offset: ");
offsetLabel.setToolTipText("Offset from the beginning of the selected table(s)");
offsetLabel.setEnabled(false);
offsetLabel.getAccessibleContext().setAccessibleName("Offset");
JLabel viewOffsetLabel = new GDLabel(" ");
viewOffsetLabel.setEnabled(false);
viewOffsetLabel.getAccessibleContext().setAccessibleName("View Offset");
viewOffset = new HintTextField("<table start address>");
viewOffset.setName("viewOffset");
viewOffset.getAccessibleContext().setAccessibleName("View Offset");
viewOffset.setToolTipText("Address of the selected table starting at the given offset");
viewOffset.setColumns(20);
viewOffset.setEnabled(false);
offsetField = new JTextField(2);
offsetField.setName("offset");
offsetField.getAccessibleContext().setAccessibleName("Offset");
offsetField.setToolTipText("Offset from the beginning of the selected table(s)");
offsetField.setText("0");
offsetField.setEnabled(false);
offsetField.addActionListener(
e -> plugin.updateOffsetString(resultsTable.getSelectedRows()));
offsetField
.addActionListener(e -> plugin.updateOffsetString(resultsTable.getSelectedRows()));
offsetField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
@ -269,6 +295,7 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
offsetPanel.add(offsetField);
offsetPanel.add(viewOffsetLabel);
offsetPanel.add(viewOffset);
offsetPanel.getAccessibleContext().setAccessibleName("Offset");
makeOptionsPanel.add(offsetPanel, BorderLayout.NORTH);
makeOptionsPanel.add(myButtonPanel, BorderLayout.SOUTH);
@ -278,6 +305,7 @@ public class AddressTableDialog extends ReusableDialogComponentProvider {
optionsPanel.add(searchOptionsPanel);
optionsPanel.add(makeOptionsPanel);
optionsPanel.getAccessibleContext().setAccessibleName("Options");
// put sub-panels onto main panel
mainPanel.add(resultsPanel, BorderLayout.CENTER);

View file

@ -87,6 +87,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
if (instruction != null && instruction.getFlowType().isConditional()) {
mainPanel.add(buildNotePanel("*Conditional flow will be preserved"));
}
mainPanel.getAccessibleContext().setAccessibleName("Set Flow Override");
return mainPanel;
}
@ -102,7 +103,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
panel.add(Box.createGlue());
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
panel.getAccessibleContext().setAccessibleName("Current Flow");
return panel;
}
@ -114,7 +115,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
panel.add(new GLabel(note));
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
panel.getAccessibleContext().setAccessibleName("Note");
return panel;
}
@ -124,6 +125,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
flowOverrideComboBox = new GhidraComboBox<>();
flowOverrideComboBox.getAccessibleContext().setAccessibleName("Flow Override");
flowOverrideComboBox.addItem(DEFAULT_CHOICE);
for (FlowOverride element : FlowOverride.values()) {
if (element == FlowOverride.NONE) {
@ -145,7 +147,7 @@ class SetFlowOverrideDialog extends DialogComponentProvider {
panel.add(Box.createGlue());
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
panel.getAccessibleContext().setAccessibleName("Flow Override");
return panel;
}

View file

@ -142,6 +142,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
addrField.addActionListener(e -> model.setCurrentFallthrough(addrField.getAddress()));
panel.add(createHomePanel(), BorderLayout.NORTH);
panel.add(createAddressPanel(), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Override Fallthrough");
return panel;
}
@ -151,6 +152,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
panel.add(addrField, BorderLayout.NORTH);
panel.add(createRadioButtonPanel(), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Address");
return panel;
}
@ -168,7 +170,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
homeButton = createButton("Home");
homeButton.addActionListener(e -> plugin.goTo(model.getAddress()));
homeButton.getAccessibleContext().setAccessibleName("Home");
JPanel innerPanel = new JPanel();
BoxLayout bl = new BoxLayout(innerPanel, BoxLayout.X_AXIS);
innerPanel.setLayout(bl);
@ -180,7 +182,9 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
innerPanel.add(Box.createHorizontalStrut(20));
innerPanel.add(instLabel);
innerPanel.add(Box.createHorizontalStrut(10));
innerPanel.getAccessibleContext().setAccessibleName("Home Content");
panel.add(innerPanel, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Home");
return panel;
}
@ -194,19 +198,21 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
defaultRB = new GRadioButton("Default", true);
defaultRB.addActionListener(ev -> model.defaultSelected());
defaultRB.setToolTipText("Use default fallthrough address");
defaultRB.getAccessibleContext().setAccessibleName("Default");
userRB = new GRadioButton("User", false);
userRB.addActionListener(ev -> model.userSelected());
userRB.setToolTipText("Override default fallthrough address");
userRB.getAccessibleContext().setAccessibleName("User");
group.add(defaultRB);
group.add(userRB);
panel.add(defaultRB);
panel.add(userRB);
panel.getAccessibleContext().setAccessibleName("Radio Buttons");
JPanel outerPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
outerPanel.add(panel);
outerPanel.getAccessibleContext().setAccessibleName("Radio Button");
return outerPanel;
}
@ -218,6 +224,7 @@ class FallThroughDialog extends DialogComponentProvider implements ChangeListene
button.setMargin(noInsets);
button.setToolTipText("Go back to home address");
button.getAccessibleContext().setAccessibleName("Home");
return button;
}

View file

@ -180,6 +180,7 @@ public abstract class AbstractEditFunctionSignatureDialog extends DialogComponen
mainPanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 2));
mainPanel.add(buildSignaturePanel());
mainPanel.add(buildAttributePanel());
mainPanel.getAccessibleContext().setAccessibleName("Edit Function Signature");
if (allowCallFixup) {
JPanel callFixupPanel = buildCallFixupPanel();
mainPanel.add(callFixupPanel != null ? callFixupPanel : buildSpacerPanel());
@ -198,6 +199,8 @@ public abstract class AbstractEditFunctionSignatureDialog extends DialogComponen
signaturePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
signaturePanel.getAccessibleContext().setAccessibleName("Signature");
return signaturePanel;
}
@ -224,6 +227,8 @@ public abstract class AbstractEditFunctionSignatureDialog extends DialogComponen
}
attributePanel.add(Box.createGlue());
attributePanel.getAccessibleContext().setAccessibleName("Attribute");
return attributePanel;
}
@ -394,8 +399,8 @@ public abstract class AbstractEditFunctionSignatureDialog extends DialogComponen
*/
protected final FunctionDefinitionDataType parseSignature() throws CancelledException {
setFunctionInfo(); // needed for testing which never shows dialog
FunctionSignatureParser parser = new FunctionSignatureParser(
getDataTypeManager(), tool.getService(DataTypeManagerService.class));
FunctionSignatureParser parser = new FunctionSignatureParser(getDataTypeManager(),
tool.getService(DataTypeManagerService.class));
try {
return parser.parse(getFunctionSignature(), getSignature());
}

View file

@ -358,11 +358,12 @@ public class ThunkReferenceAddressDialog extends DialogComponentProvider {
JPanel mainPanel = new JPanel(new PairLayout(5, 5));
refFunctionField = new JTextField(20);
refFunctionField.getAccessibleContext().setAccessibleName("Reference Function");
mainPanel.add(new GLabel("Destination Function/Address:"));
mainPanel.add(refFunctionField);
mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
mainPanel.getAccessibleContext().setAccessibleName("Think Reference Address");
return mainPanel;
}

View file

@ -217,6 +217,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(buildPreview(), BorderLayout.NORTH);
panel.add(buildCenterPanel(hasOptionalSignatureCommit), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Function Editor");
return panel;
}
@ -226,6 +227,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
centerPanel.add(buildAttributePanel(), BorderLayout.NORTH);
centerPanel.add(buildTable(), BorderLayout.CENTER);
centerPanel.add(buildBottomPanel(hasOptionalSignatureCommit), BorderLayout.SOUTH);
centerPanel.getAccessibleContext().setAccessibleName("Function Attributes");
return centerPanel;
}
@ -241,6 +243,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
Function thunkedFunction = model.getFunction().getThunkedFunction(false);
if (thunkedFunction != null) {
JPanel thunkedPanel = createThunkedFunctionTextPanel(thunkedFunction);
thunkedPanel.getAccessibleContext().setAccessibleName("Thunked Function");
thunkedPanel.setBorder(BorderFactory.createTitledBorder(b, "Thunked Function:"));
panel.add(thunkedPanel, BorderLayout.CENTER); // provide as much space as possible
}
@ -270,6 +273,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
panel.add(commitFullParamDetailsCheckBox, BorderLayout.SOUTH);
}
panel.getAccessibleContext().setAccessibleName("Call Fixup and Thunked Function");
return panel;
}
@ -290,8 +294,10 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
private JComponent buildPreview() {
previewPanel = new JPanel(new BorderLayout());
JPanel verticalScrollPanel = new VerticalScrollablePanel();
verticalScrollPanel.getAccessibleContext().setAccessibleName("Vertical Scroll");
verticalScrollPanel.add(createSignatureTextPanel());
scroll = new JScrollPane(verticalScrollPanel);
scroll.getAccessibleContext().setAccessibleName("Scroll");
scroll.setBorder(null);
scroll.setOpaque(true);
previewPanel.add(scroll, BorderLayout.CENTER);
@ -304,13 +310,14 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
signatureTextField.requestFocus();
}
});
previewPanel.getAccessibleContext().setAccessibleName("Preview");
return previewPanel;
}
private JComponent createSignatureTextPanel() {
JPanel panel = new JPanel(new BorderLayout());
signatureTextField = new FunctionSignatureTextField();
signatureTextField.getAccessibleContext().setAccessibleName("Signature");
signatureFieldUndoRedoKeeper = DockingUtils.installUndoRedo(signatureTextField);
panel.add(signatureTextField);
@ -368,6 +375,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
signatureTextField
.setChangeListener(e -> model.setSignatureFieldText(signatureTextField.getText()));
panel.getAccessibleContext().setAccessibleName("Signature Text");
return panel;
}
@ -413,9 +421,10 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
leftPanel.add(new GLabel("Calling Convention"));
leftPanel.add(createCallingConventionCombo());
leftPanel.setBorder(BorderFactory.createEmptyBorder(14, 0, 0, 10));
leftPanel.getAccessibleContext().setAccessibleName("Function");
panel.add(leftPanel, BorderLayout.CENTER);
panel.add(buildTogglePanel(), BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Attributes");
return panel;
}
@ -423,22 +432,26 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
JPanel panel = new JPanel(new PairLayout());
varArgsCheckBox = new GCheckBox("Varargs");
varArgsCheckBox.addItemListener(e -> model.setHasVarArgs(varArgsCheckBox.isSelected()));
varArgsCheckBox.getAccessibleContext().setAccessibleName("Variable Argument");
panel.add(varArgsCheckBox);
inLineCheckBox = new GCheckBox("In Line");
inLineCheckBox.getAccessibleContext().setAccessibleName("In Line");
panel.add(inLineCheckBox);
inLineCheckBox.addItemListener(e -> model.setIsInLine(inLineCheckBox.isSelected()));
inLineCheckBox.setEnabled(model.isInlineAllowed());
noReturnCheckBox = new GCheckBox("No Return");
noReturnCheckBox.getAccessibleContext().setAccessibleName("No Return");
noReturnCheckBox.addItemListener(e -> model.setNoReturn(noReturnCheckBox.isSelected()));
storageCheckBox = new GCheckBox("Use Custom Storage");
storageCheckBox.getAccessibleContext().setAccessibleName("Custom Storage");
storageCheckBox
.addItemListener(e -> model.setUseCustomizeStorage(storageCheckBox.isSelected()));
panel.add(noReturnCheckBox);
panel.add(storageCheckBox);
panel.setBorder(BorderFactory.createTitledBorder("Function Attributes:"));
panel.getAccessibleContext().setAccessibleName("Toggle");
return panel;
}
@ -457,6 +470,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
JPanel panel = new JPanel();
callFixupComboBox = new GComboBox<>();
callFixupComboBox.getAccessibleContext().setAccessibleName("Call Fixup");
String[] callFixupNames = model.getCallFixupNames();
callFixupComboBox.addItem(FunctionEditorModel.NONE_CHOICE);
@ -475,6 +489,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
}
panel.add(callFixupComboBox);
panel.getAccessibleContext().setAccessibleName("Call Fixup");
return panel;
}
@ -486,10 +501,13 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
paramTableModel = new ParameterTableModel(model);
parameterTable = new ParameterTable(paramTableModel);
selectionListener = e -> model.setSelectedParameterRows(parameterTable.getSelectedRows());
parameterTable.getAccessibleContext().setAccessibleName("Parameter");
JScrollPane tableScroll = new JScrollPane(parameterTable);
tableScroll.getAccessibleContext().setAccessibleName("Scroll");
panel.add(tableScroll, BorderLayout.CENTER);
panel.add(buildButtonPanel(), BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Function Variables");
return panel;
}
@ -539,6 +557,7 @@ public class FunctionEditorDialog extends DialogComponentProvider implements Mod
}
};
nameField.getDocument().addDocumentListener(nameFieldDocumentListener);
nameField.getAccessibleContext().setAccessibleName("Name");
return nameField;
}

View file

@ -125,6 +125,7 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
JPanel panel = new JPanel(new BorderLayout());
panel.add(buildInfoPanel(service), BorderLayout.NORTH);
panel.add(buildTablePanel(), BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Storage Address Editor");
return panel;
}
@ -195,9 +196,12 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
final DropDownSelectionTextField<DataType> textField = dataTypeEditor.getTextField();
textField.setBorder((new JTextField()).getBorder()); // restore default border
textField.getAccessibleContext().setAccessibleName("Data Type Editor");
JButton chooserButton = dataTypeEditor.getChooserButton();
chooserButton.getAccessibleContext().setAccessibleName("Choose");
JButton defaultButton = new JButton(); // restore default border/background
defaultButton.getAccessibleContext().setAccessibleName("Default");
chooserButton.setBorder(defaultButton.getBorder());
chooserButton.setBackground(defaultButton.getBackground());
@ -223,13 +227,15 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
panel.add(dataTypeEditComponent);
panel.add(new GLabel("Datatype Size: "));
sizeLabel = new GDLabel(Integer.toString(size));
sizeLabel.getAccessibleContext().setAccessibleName("Size");
panel.add(sizeLabel);
panel.add(new GLabel("Allocated Size:"));
currentSizeLabel = new GDLabel("");
currentSizeLabel.getAccessibleContext().setAccessibleName("Current Size");
panel.add(currentSizeLabel);
setFocusComponent(textField);
panel.getAccessibleContext().setAccessibleName("Info");
return panel;
}
@ -238,6 +244,7 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
panel.setBorder(BorderFactory.createTitledBorder("Storage Locations"));
varnodeTableModel = new VarnodeTableModel(model);
varnodeTable = new GTable(varnodeTableModel);
varnodeTable.getAccessibleContext().setAccessibleName("Varnode");
selectionListener = new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
@ -258,8 +265,10 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
varnodeTable.setSurrendersFocusOnKeystroke(true);
JScrollPane scroll = new JScrollPane(varnodeTable);
scroll.getAccessibleContext().setAccessibleName("Varnode");
panel.add(scroll, BorderLayout.CENTER);
panel.add(buildButtonPanel(), BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Table");
return panel;
}
@ -267,9 +276,13 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
JPanel panel = new JPanel(new VerticalLayout(5));
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
addButton = new JButton("Add");
addButton.getAccessibleContext().setAccessibleName("Add");
removeButton = new JButton("Remove");
removeButton.getAccessibleContext().setAccessibleName("Remove");
upButton = new JButton("Up");
upButton.getAccessibleContext().setAccessibleName("Up");
downButton = new JButton("Down");
downButton.getAccessibleContext().setAccessibleName("Down");
addButton.addActionListener(new ActionListener() {
@Override
@ -301,6 +314,7 @@ public class StorageAddressEditorDialog extends DialogComponentProvider
panel.add(new JSeparator());
panel.add(upButton);
panel.add(downButton);
panel.getAccessibleContext().setAccessibleName("Button");
return panel;
}

View file

@ -393,12 +393,13 @@ public class InstructionSearchDialog extends ReusableDialogComponentProvider imp
if (controlPanel == null) {
controlPanel = new ControlPanel(plugin, this);
}
controlPanel.getAccessibleContext().setAccessibleName("Control");
messagePanel.getAccessibleContext().setAccessibleName("Message");
lowerPanel.add(controlPanel);
lowerPanel.add(messagePanel);
lowerPanel.getAccessibleContext().setAccessibleName("Control and Message");
mainPanel.add(lowerPanel, BorderLayout.SOUTH);
mainPanel.getAccessibleContext().setAccessibleName("Instruction Search");
return mainPanel;
}
@ -454,6 +455,7 @@ public class InstructionSearchDialog extends ReusableDialogComponentProvider imp
searchAllButton = new JButton("Search All");
searchAllButton.addActionListener(ev -> searchAllButtonActionPerformed());
searchAllButton.setName("Search All");
searchAllButton.getAccessibleContext().setAccessibleName("Search All");
addButton(searchAllButton);
addCancelButton();

View file

@ -76,6 +76,7 @@ public class LabelHistoryInputDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createTitledBorder("Enter Symbol Name"));
inputField = new JTextField(25);
inputField.getAccessibleContext().setAccessibleName("Input");
setFocusComponent(inputField);
inputField.addActionListener(new ActionListener() {
@Override
@ -101,9 +102,11 @@ public class LabelHistoryInputDialog extends DialogComponentProvider {
});
panel.add(inputField, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Name Entry");
JPanel outerPanel = new JPanel(new BorderLayout());
outerPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5));
outerPanel.add(panel, BorderLayout.CENTER);
outerPanel.getAccessibleContext().setAccessibleName("Label History Input");
return outerPanel;
}

View file

@ -60,15 +60,14 @@ public class OperandLabelDialog extends DialogComponentProvider {
mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
label = new GDLabel("Label: ");
myChoice = new GhidraComboBox<>();
myChoice.setName("MYCHOICE");
myChoice.setEditable(true);
myChoice.addActionListener(ev -> okCallback());
myChoice.getAccessibleContext().setAccessibleName("My Choice");
mainPanel.add(label);
mainPanel.add(myChoice);
mainPanel.getAccessibleContext().setAccessibleName("Operand Label");
return mainPanel;
}

View file

@ -35,6 +35,7 @@ public class OverviewColorLegendDialog extends DialogComponentProvider {
*/
public OverviewColorLegendDialog(String title, JComponent component, HelpLocation help) {
super(title, false);
component.getAccessibleContext().setAccessibleName("Overview Color Legend");
addWorkPanel(component);
addDismissButton();
setHelpLocation(help);

View file

@ -76,6 +76,7 @@ public class EntropyOverviewColorService implements OverviewColorService {
@Override
public void setOverviewComponent(OverviewColorComponent component) {
this.overviewComponent = component;
this.overviewComponent.getAccessibleContext().setAccessibleName("Overview Component");
}
@Override

View file

@ -72,6 +72,7 @@ public class PrintOptionsDialog extends ReusableDialogComponentProvider {
JPanel rangePanel = new JPanel();
rangePanel.setLayout(new BoxLayout(rangePanel, BoxLayout.Y_AXIS));
rangePanel.setBorder(BorderFactory.createTitledBorder("Print Range"));
rangePanel.getAccessibleContext().setAccessibleName("Print Range");
KeyListener key = new KeyAdapter() {
@Override
@ -87,41 +88,50 @@ public class PrintOptionsDialog extends ReusableDialogComponentProvider {
selection = new GRadioButton("Selected area(s)");
selection.addKeyListener(key);
selection.getAccessibleContext().setAccessibleName("Selected Area");
rangePanel.add(selection);
group.add(selection);
selection.setEnabled(selectionEnabled);
visible = new GRadioButton("Code visible on screen");
visible.addKeyListener(key);
visible.getAccessibleContext().setAccessibleName("Visible Code");
rangePanel.add(visible);
group.add(visible);
view = new GRadioButton("Current view");
view.addKeyListener(key);
view.getAccessibleContext().setAccessibleName("Current View");
rangePanel.add(view);
group.add(view);
JPanel headerPanel = new JPanel();
headerPanel.setLayout(new BoxLayout(headerPanel, BoxLayout.X_AXIS));
headerPanel.setBorder(BorderFactory.createTitledBorder("Header and Footer"));
headerPanel.getAccessibleContext().setAccessibleName("Info");
title = new GCheckBox("Title");
title.setSelected(true);
title.addKeyListener(key);
title.getAccessibleContext().setAccessibleName("Title");
headerPanel.add(title);
date = new GCheckBox("Date/Time");
date.setSelected(true);
date.addKeyListener(key);
date.getAccessibleContext().setAccessibleName("Date/Time");
headerPanel.add(date);
pageNum = new GCheckBox("Page Numbers");
pageNum.setSelected(true);
pageNum.addKeyListener(key);
pageNum.getAccessibleContext().setAccessibleName("Page Numbers");
headerPanel.add(pageNum);
JPanel optionsPanel = new JPanel();
optionsPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
optionsPanel.setBorder(BorderFactory.createTitledBorder("Other Print Options"));
optionsPanel.getAccessibleContext().setAccessibleName("Other Options");
monochrome = new GCheckBox("Use Monochrome", true);
monochrome.addKeyListener(key);
monochrome.getAccessibleContext().setAccessibleName("Monochrome");
optionsPanel.add(monochrome);
outerPanel.add(rangePanel, BorderLayout.NORTH);
@ -129,7 +139,7 @@ public class PrintOptionsDialog extends ReusableDialogComponentProvider {
outerPanel.add(optionsPanel, BorderLayout.SOUTH);
setFocusComponent();
outerPanel.getAccessibleContext().setAccessibleName("Print Options");
return outerPanel;
}

View file

@ -82,7 +82,7 @@ public class SetLanguageDialog extends DialogComponentProvider {
selectLangPanel.addSelectionListener(listener);
selectLangPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
selectLangPanel.getAccessibleContext().setAccessibleName("Set Language");
addWorkPanel(selectLangPanel);
addOKButton();
addCancelButton();

View file

@ -141,12 +141,14 @@ public class OffsetTableDialog extends DialogComponentProvider {
comboBox = new GComboBox<>(new String[] { "1", "2", "4", "8" });
int pointerSize = defaultAddress.getPointerSize();
comboBox.setSelectedItem(Integer.toString(pointerSize));
comboBox.getAccessibleContext().setAccessibleName("Address");
panel.add(new GLabel("Select Data Size (Bytes):", SwingConstants.RIGHT));
panel.add(comboBox);
signedCheckBox = new GCheckBox("Signed Data Value(s)", true);
signedCheckBox.getAccessibleContext().setAccessibleName("Signed Data Value");
panel.add(signedCheckBox);
panel.getAccessibleContext().setAccessibleName("Offset Table");
return panel;
}
}

View file

@ -54,6 +54,7 @@ class EditRegisterValueDialog extends DialogComponentProvider {
JTextField registerField =
new JTextField(register.getName() + " (" + register.getBitLength() + ")");
registerField.getAccessibleContext().setAccessibleName("Register");
registerField.setEditable(false);
Consumer<Address> addressChangeListener = a -> updateOk();
@ -61,6 +62,7 @@ class EditRegisterValueDialog extends DialogComponentProvider {
endAddrField = new AddressInput(program, addressChangeListener);
registerValueField = new FixedBitSizeValueField(register.getBitLength(), true, false);
registerValueField.getAccessibleContext().setAccessibleName("Register Value");
startAddrField.setAddress(start);
endAddrField.setAddress(end);
registerValueField.setValue(value);
@ -76,7 +78,7 @@ class EditRegisterValueDialog extends DialogComponentProvider {
panel.add(endAddrField);
panel.add(new GLabel("Value:"));
panel.add(registerValueField);
panel.getAccessibleContext().setAccessibleName("Edit Register Value");
return panel;
}

View file

@ -112,7 +112,7 @@ public class ScalarSearchDialog extends DialogComponentProvider {
newMainPanel.setLayout(new BorderLayout());
newMainPanel.add(buildSearchLayout(), BorderLayout.NORTH);
newMainPanel.getAccessibleContext().setAccessibleName("Scalar Search");
return newMainPanel;
}
@ -124,7 +124,7 @@ public class ScalarSearchDialog extends DialogComponentProvider {
finalPanel.add(searchLayout, BorderLayout.NORTH);
finalPanel.add(buildSelectionPanel(), BorderLayout.SOUTH);
finalPanel.getAccessibleContext().setAccessibleName("Search");
return finalPanel;
}
@ -143,10 +143,11 @@ public class ScalarSearchDialog extends DialogComponentProvider {
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.setBorder(new TitledBorder("Search Scope"));
panel.getAccessibleContext().setAccessibleName("Search Choice");
searchSelectionRadioButton = new GRadioButton("Search Selection");
searchSelectionRadioButton.getAccessibleContext().setAccessibleName("Search Selection");
searchAllRadioButton = new GRadioButton("Search All");
searchAllRadioButton.getAccessibleContext().setAccessibleName("Search All");
searchSelectionRadioButton.setToolTipText("Search only the current selection");
searchAllRadioButton.setToolTipText("Search the entire program");
@ -173,7 +174,7 @@ public class ScalarSearchDialog extends DialogComponentProvider {
HelpService helpService = DockingWindowManager.getHelpService();
helpService.registerHelp(selectionPanel,
new HelpLocation(plugin.getName(), "Scalar_Selection_Scope"));
selectionPanel.getAccessibleContext().setAccessibleName("Selection");
return selectionPanel;
}
@ -182,6 +183,7 @@ public class ScalarSearchDialog extends DialogComponentProvider {
beginSearchButton = new JButton("Search");
beginSearchButton.setMnemonic('B');
beginSearchButton.addActionListener(ev -> searchCallback());
beginSearchButton.getAccessibleContext().setAccessibleName("Begin Search");
this.addButton(beginSearchButton);
}
@ -260,7 +262,9 @@ public class ScalarSearchDialog extends DialogComponentProvider {
setBorder(new TitledBorder("Search Type"));
searchAllScalars = new GRadioButton("Scalars in Range:");
searchAllScalars.getAccessibleContext().setAccessibleName("Search All Scalars");
searchAScalar = new GRadioButton("Specific Scalar:");
searchAScalar.getAccessibleContext().setAccessibleName("Search Specific Scalar");
searchAllScalars.setToolTipText(
"Search program (or selection) for scalar operands or defined scalar data types with values in the following range:");
@ -290,17 +294,18 @@ public class ScalarSearchDialog extends DialogComponentProvider {
JPanel allScalarsPanel = new JPanel();
allScalarsPanel.setLayout(new BorderLayout());
allScalarsPanel.add(searchAllScalars, BorderLayout.NORTH);
allScalarsPanel.getAccessibleContext().setAccessibleName("All Scalars");
rangeFilter = new RangeFilter();
rangeFilter.getAccessibleContext().setAccessibleName("All Scalar");
allScalarsPanel.add(Box.createHorizontalStrut(18), BorderLayout.WEST);
allScalarsPanel.add(rangeFilter, BorderLayout.CENTER);
JPanel aScalarPanel = new JPanel();
aScalarPanel.setLayout(new BorderLayout());
aScalarPanel.add(searchAScalar, BorderLayout.NORTH);
aScalarPanel.getAccessibleContext().setAccessibleName("Specifc Scalar");
exactValueField = new IntegerTextField(8);
exactValueField.getComponent().getAccessibleContext().setAccessibleName("Exact Value");
aScalarPanel.add(Box.createHorizontalStrut(18), BorderLayout.WEST);
aScalarPanel.add(exactValueField.getComponent(), BorderLayout.CENTER);

View file

@ -47,7 +47,7 @@ class KeyBindingInputDialog extends DialogComponentProvider implements KeyEntryL
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(new GLabel(scriptName), BorderLayout.NORTH);
panel.add(kbPanel, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Key Binding Input");
addWorkPanel(panel);
addOKButton();
addCancelButton();

View file

@ -78,7 +78,7 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
mainPanel.add(methodPanel(), gbc);
gbc.gridx++;
mainPanel.add(buildBlockPanel(), gbc);
mainPanel.getAccessibleContext().setAccessibleName("Select Block");
return mainPanel;
}
@ -90,13 +90,16 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
main.add(new GLabel("Ending Address:"));
toAddressField = new JTextField(10);
toAddressField.getAccessibleContext().setAccessibleName("To Address");
main.add(toAddressField);
main.add(new GLabel("Length: "));
numberInputField = new IntegerTextField(10);
numberInputField.getComponent().getAccessibleContext().setAccessibleName("Number Input");
numberInputField.setMaxValue(BigInteger.valueOf(Integer.MAX_VALUE));
numberInputField.setAllowNegativeValues(false);
main.add(numberInputField.getComponent());
main.getAccessibleContext().setAccessibleName("Block");
return main;
}
@ -111,6 +114,7 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
forwardButton = new GRadioButton("Select Forward", true);
forwardButton.setName("forwardButton");
forwardButton.getAccessibleContext().setAccessibleName("Forward");
forwardButton.addActionListener(ae -> {
setStatusText("Enter number of bytes to select");
setAddressFieldEnabled(false);
@ -119,6 +123,7 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
buttonGroup.add(forwardButton);
backwardButton = new GRadioButton("Select Backward");
backwardButton.setName("backwardButton");
backwardButton.getAccessibleContext().setAccessibleName("Backward");
backwardButton.addActionListener(ae -> {
setStatusText("Enter number of bytes to select");
setAddressFieldEnabled(false);
@ -127,6 +132,7 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
buttonGroup.add(backwardButton);
allButton = new GRadioButton("Select All");
allButton.setName("allButton");
allButton.getAccessibleContext().setAccessibleName("All");
allButton.addActionListener(ae -> {
setItemsEnabled(false);
clearStatusText();
@ -135,6 +141,7 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
buttonGroup.add(allButton);
toButton = new GRadioButton("To Address");
toButton.setName("toButton");
toButton.getAccessibleContext().setAccessibleName("To Address");
toButton.addActionListener(ae -> {
setStatusText("Enter an Address to go to");
setAddressFieldEnabled(true);
@ -152,6 +159,7 @@ class SelectBlockDialog extends ReusableDialogComponentProvider {
gbc.gridy++;
main.add(backwardButton, gbc);
setStatusText("Enter number of bytes to select");
main.getAccessibleContext().setAccessibleName("Methods");
return main;
}

View file

@ -117,7 +117,7 @@ public class SearchStringDialog extends DialogComponentProvider {
panel.add(buildLeftPanel(), BorderLayout.WEST);
panel.add(Box.createHorizontalStrut(10), BorderLayout.CENTER);
panel.add(buildRightPanel(), BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Search String");
return panel;
}
@ -130,7 +130,7 @@ public class SearchStringDialog extends DialogComponentProvider {
panel.add(buildOptionsPanelLeft(), BorderLayout.NORTH);
panel.add(Box.createVerticalStrut(15), BorderLayout.CENTER);
panel.add(buildMemoryBlocksPanel(), BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Memory Block Search");
return panel;
}
@ -144,7 +144,7 @@ public class SearchStringDialog extends DialogComponentProvider {
panel.add(buildOptionsPanelRight(), BorderLayout.NORTH);
panel.add(Box.createVerticalStrut(15), BorderLayout.CENTER);
panel.add(buildSelectionScopePanel(), BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Selection Scope Search");
return panel;
}
@ -159,12 +159,14 @@ public class SearchStringDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new GridLayout(3, 1, 10, 14));
nullTerminateCheckbox = new GCheckBox("Require Null Termination");
nullTerminateCheckbox.getAccessibleContext().setAccessibleName("Require Null Termination");
pascalStringsCheckbox = new GCheckBox("Pascal Strings");
pascalStringsCheckbox.getAccessibleContext().setAccessibleName("Pascal Strings");
nullTerminateCheckbox.setSelected(true);
panel.add(nullTerminateCheckbox);
panel.add(pascalStringsCheckbox);
panel.getAccessibleContext().setAccessibleName("Options");
return panel;
}
@ -181,6 +183,7 @@ public class SearchStringDialog extends DialogComponentProvider {
JLabel minLengthLabel = new GLabel("Minimum Length: ");
minLengthLabel.setName("minLen");
minLengthLabel.getAccessibleContext().setAccessibleName("Minimum Length");
minLengthLabel.setToolTipText("<html>Searches for valid ascii or ascii unicode strings " +
"greater or equal to minimum search length.<br> The null characters are not included " +
"in the minimum string length.");
@ -188,10 +191,12 @@ public class SearchStringDialog extends DialogComponentProvider {
minLengthField = new IntegerTextField(5, 5L);
minLengthField.getComponent().setName("minDefault");
minLengthField.getComponent().getAccessibleContext().setAccessibleName("Minimum Length");
panel.add(minLengthField.getComponent());
JLabel alignLabel = new GLabel("Alignment: ");
alignLabel.setName("alignment");
alignLabel.getAccessibleContext().setAccessibleName("Alignment");
alignLabel
.setToolTipText("<html>Searches for strings that start on the given alignment<br>" +
"value. The default alignment is processor dependent.");
@ -199,10 +204,11 @@ public class SearchStringDialog extends DialogComponentProvider {
alignField = new IntegerTextField(5, 1L);
alignField.getComponent().setName("alignDefault");
alignField.getComponent().getAccessibleContext().setAccessibleName("Align");
panel.add(alignField.getComponent());
createModelFieldPanel(panel);
panel.getAccessibleContext().setAccessibleName("Options");
return panel;
}
@ -265,7 +271,9 @@ public class SearchStringDialog extends DialogComponentProvider {
ButtonGroup memoryBlockGroup = new ButtonGroup();
loadedBlocksRB = new GRadioButton("Loaded Blocks", true);
loadedBlocksRB.getAccessibleContext().setAccessibleName("Loaded Bocks");
allBlocksRB = new GRadioButton("All Blocks", false);
allBlocksRB.getAccessibleContext().setAccessibleName("All Blocks");
memoryBlockGroup.add(loadedBlocksRB);
memoryBlockGroup.add(allBlocksRB);
@ -278,7 +286,7 @@ public class SearchStringDialog extends DialogComponentProvider {
panel.add(loadedBlocksRB);
panel.add(allBlocksRB);
panel.getAccessibleContext().setAccessibleName("Memory Blocks");
return panel;
}
@ -294,7 +302,9 @@ public class SearchStringDialog extends DialogComponentProvider {
panel.setBorder(new TitledBorder("Selection Scope"));
searchSelectionRB = new GRadioButton("Search Selection");
searchSelectionRB.getAccessibleContext().setAccessibleName("Search Selection");
searchAllRB = new GRadioButton("Search All");
searchAllRB.getAccessibleContext().setAccessibleName("Search All");
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(searchSelectionRB);
@ -311,7 +321,7 @@ public class SearchStringDialog extends DialogComponentProvider {
JPanel selectionPanel = new JPanel();
selectionPanel.setLayout(new BorderLayout());
selectionPanel.add(panel, BorderLayout.NORTH);
selectionPanel.getAccessibleContext().setAccessibleName("Selections Scope");
return selectionPanel;
}

View file

@ -289,6 +289,7 @@ public class EncodedStringsDialog extends DialogComponentProvider {
addWorkPanel(buildWorkPanel());
createButton = new JButton("Create");
createButton.setName("Create");
createButton.getAccessibleContext().setAccessibleName("Create");
createButton.addActionListener(e -> {
if (isSingleStringMode()) {
@ -308,7 +309,7 @@ public class EncodedStringsDialog extends DialogComponentProvider {
private JComponent buildWorkPanel() {
optionsPanel = new JPanel(new PairLayout(5, 5));
optionsPanel.setBorder(BorderFactory.createTitledBorder("Options"));
optionsPanel.getAccessibleContext().setAccessibleName("Options");
buildCharsetPickerComponents();
buildOptionsButtonComponents();
buildAdvancedOptionsComponents();
@ -322,7 +323,9 @@ public class EncodedStringsDialog extends DialogComponentProvider {
advancedFailedCountLabel);
GLabel scriptLabel = new GLabel("Script:", SwingConstants.RIGHT);
scriptLabel.getAccessibleContext().setAccessibleName("Script");
GLabel allowAddLabel = new GLabel("Allow Additional:");
allowAddLabel.getAccessibleContext().setAccessibleName("Allow Additional");
scriptRow =
addRow(scriptLabel, requiredUnicodeScript, scriptFailedCountLabel, allowAddLabel,
allowAnyScriptButton, otherScriptsFailedCountLabel, allowLatinScriptButton,
@ -338,6 +341,7 @@ public class EncodedStringsDialog extends DialogComponentProvider {
else {
GLabel minLenLabel = new GLabel("Min Length:", SwingConstants.RIGHT);
minLenLabel.setToolTipText(minStringLengthSpinner.getSpinner().getToolTipText());
minLenLabel.getAccessibleContext().setAccessibleName("Minimum Length");
advOptsRow2 = addRow(null, minLenLabel, minStringLengthSpinner.getSpinner(),
minLenFailedCountLabel, alignStartOfStringCB, breakOnRefCB);
}
@ -354,11 +358,12 @@ public class EncodedStringsDialog extends DialogComponentProvider {
JPanel previewTablePanel = new JPanel(new BorderLayout());
previewTablePanel.add(threadedTablePanel, BorderLayout.CENTER);
previewTablePanel.add(filterPanel, BorderLayout.SOUTH);
previewTablePanel.getAccessibleContext().setAccessibleName("Preview Table");
JPanel panel = new JPanel(new BorderLayout());
panel.add(optionsPanel, BorderLayout.NORTH);
panel.add(previewTablePanel, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Encoded Strings");
return panel;
}
@ -418,21 +423,25 @@ public class EncodedStringsDialog extends DialogComponentProvider {
JPanel emptyTableOverlay = new JPanel(new GridBagLayout());
emptyTableOverlay.add(new GHtmlLabel("<html>No strings matched filter criteria..."),
new GridBagConstraints());
emptyTableOverlay.getAccessibleContext().setAccessibleName("Empty Table Overlay");
threadedTablePanel =
new EncodedStringsThreadedTablePanel<>(tableModel, 1000, emptyTableOverlay);
threadedTablePanel.setBorder(BorderFactory.createTitledBorder("Preview"));
threadedTablePanel.getAccessibleContext().setAccessibleName("Threaded Table");
table = threadedTablePanel.getTable();
table.setName("DataTable");
table.getAccessibleContext().setAccessibleName("Data Table");
table.setPreferredScrollableViewportSize(new Dimension(350, 150));
table.getSelectionModel().addListSelectionListener(e -> selectedRowChange());
table.installNavigation(tool);
filterPanel.getAccessibleContext().setAccessibleName("Filter");
filterPanel = new GhidraTableFilterPanel<>(table, tableModel);
}
private void buildCharsetPickerComponents() {
charsetComboBox = new GhidraComboBox<>();
charsetComboBox.getAccessibleContext().setAccessibleName("Charset Checkboxes");
for (String charsetName : CharsetInfo.getInstance().getCharsetNames()) {
charsetComboBox.addToModel(charsetName);
}
@ -474,6 +483,7 @@ public class EncodedStringsDialog extends DialogComponentProvider {
private void buildOptionsButtonComponents() {
showAdvancedOptionsButton = new JToggleButton("Advanced...");
showAdvancedOptionsButton.setName("SHOW_ADVANCED_OPTIONS");
showAdvancedOptionsButton.getAccessibleContext().setAccessibleName("Show Advanced Options");
showAdvancedOptionsButton.setToolTipText("Show advanced options.");
showAdvancedOptionsButton.addActionListener(e -> {
setRowVisibility(advOptsRow1, showAdvancedOptionsButton.isSelected());
@ -488,9 +498,11 @@ public class EncodedStringsDialog extends DialogComponentProvider {
advancedFailedCountLabel.setToolTipText(
"Number of strings excluded due to filtering options in advanced options.");
advancedFailedCountLabel.setVisible(!showAdvancedOptionsButton.isSelected());
advancedFailedCountLabel.getAccessibleContext().setAccessibleName("Advanced Failed Count");
showScriptOptionsButton = new JToggleButton("A-Z,\u6211\u7684,\u062d\u064e\u0648\u0651");
showScriptOptionsButton.setName("SHOW_SCRIPT_OPTIONS");
showScriptOptionsButton.getAccessibleContext().setAccessibleName("Show Script Options");
showScriptOptionsButton.setToolTipText("Filter by character scripts (alphabets).");
showScriptOptionsButton.addActionListener(e -> {
setRowVisibility(scriptRow, showScriptOptionsButton.isSelected());
@ -499,6 +511,8 @@ public class EncodedStringsDialog extends DialogComponentProvider {
showTranslateOptionsButton = new JToggleButton("Translate");
showTranslateOptionsButton.setName("SHOW_TRANSLATE_OPTIONS");
showTranslateOptionsButton.getAccessibleContext()
.setAccessibleName("Show Translate Options");
showTranslateOptionsButton.setToolTipText("Translate strings after creation.");
showTranslateOptionsButton.addActionListener(e -> {
setRowVisibility(translateRow, showTranslateOptionsButton.isSelected());
@ -513,10 +527,13 @@ public class EncodedStringsDialog extends DialogComponentProvider {
excludeStringsWithCodecErrorCB.setToolTipText("""
<html>Exclude strings that have charset codec errors.<br>
(bytes/sequences that are invalid for the chosen charset)""");
excludeStringsWithCodecErrorCB.getAccessibleContext()
.setAccessibleName("Exclude Strings With Codec Error");
codecErrorsCountLabel = new GDHtmlLabel();
codecErrorsCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
codecErrorsCountLabel.setToolTipText("Number of strings excluded due to codec errors.");
codecErrorsCountLabel.getAccessibleContext().setAccessibleName("Codec Errors Count");
excludeStringsWithNonStdCtrlCharsCB = new GCheckBox("Exclude non-std ctrl chars");
excludeStringsWithNonStdCtrlCharsCB.setSelected(!singleStringMode);
@ -524,11 +541,14 @@ public class EncodedStringsDialog extends DialogComponentProvider {
<html>Exclude strings that contain non-standard control characters.<br>
(ASCII 1..31, not including tab, CR, LF)""");
excludeStringsWithNonStdCtrlCharsCB.addItemListener(this::checkboxItemListener);
excludeStringsWithNonStdCtrlCharsCB.getAccessibleContext()
.setAccessibleName("Exclude Strings with Non-Standard Control Characters");
nonStdCtrlCharsErrorsCountLabel = new GDHtmlLabel();
nonStdCtrlCharsErrorsCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
nonStdCtrlCharsErrorsCountLabel.setToolTipText(
"Number of strings excluded due to non-standard control characters.");
nonStdCtrlCharsErrorsCountLabel.getAccessibleContext()
.setAccessibleName("Non-Standard Control Character Error Count");
alignStartOfStringCB = new GCheckBox("Align start of string");
alignStartOfStringCB.setToolTipText("""
@ -536,12 +556,12 @@ public class EncodedStringsDialog extends DialogComponentProvider {
strings that begin on an aligned boundary.""");
alignStartOfStringCB.setSelected(!singleStringMode);
alignStartOfStringCB.addItemListener(this::checkboxItemListener);
alignStartOfStringCB.getAccessibleContext().setAccessibleName("Align Start of String");
breakOnRefCB = new GCheckBox("Truncate at ref");
breakOnRefCB.setSelected(true);
breakOnRefCB.addItemListener(this::checkboxItemListener);
breakOnRefCB.setToolTipText("Truncate strings at references.");
breakOnRefCB.getAccessibleContext().setAccessibleName("Break on References");
minStringLengthSpinner = new IntegerSpinner(new SpinnerNumberModel( // spinner
Long.valueOf(Math.min(5, selectedAddresses.getNumAddresses())), // initial
Long.valueOf(0), // min
@ -553,11 +573,14 @@ public class EncodedStringsDialog extends DialogComponentProvider {
"Exclude strings that are shorter (in characters, not bytes) than this minimum");
minStringLengthSpinner.getTextField().setShowNumberMode(false);
minStringLengthSpinner.getSpinner().addChangeListener(e -> updateOptionsAndRefresh());
minStringLengthSpinner.getSpinner()
.getAccessibleContext()
.setAccessibleName("Minimum String Length");
minLenFailedCountLabel = new GDHtmlLabel();
minLenFailedCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
minLenFailedCountLabel.setToolTipText("Number of strings excluded due to length.");
minLenFailedCountLabel.getAccessibleContext()
.setAccessibleName("Minimum Failed Length Count");
stringModelFilenameComboBox = new GhidraComboBox<>();
stringModelFilenameComboBox.setEditable(true);
for (String builtinStringModelFilename : getBuiltinStringModelFilenames()) {
@ -574,16 +597,19 @@ public class EncodedStringsDialog extends DialogComponentProvider {
Enter the full path to a user-supplied .sng model file,<br>
or<br>
Clear the field for no string model.""");
stringModelFilenameComboBox.getAccessibleContext()
.setAccessibleName("String Model Filename");
requireValidStringCB = new GCheckBox("Exclude invalid strings");
requireValidStringCB.setSelected(false);
requireValidStringCB.setToolTipText("Verify strings against the string model.");
requireValidStringCB.addItemListener(this::checkboxItemListener);
requireValidStringCB.getAccessibleContext().setAccessibleName("Reguire Valid Sring");
stringModelFailedCountLabel = new GDHtmlLabel();
stringModelFailedCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
stringModelFailedCountLabel
.setToolTipText("Number of strings excluded due to failing string model check.");
stringModelFailedCountLabel.getAccessibleContext()
.setAccessibleName("String Model Failed Count");
}
private void buildScriptFilterComponents() {
@ -600,12 +626,12 @@ public class EncodedStringsDialog extends DialogComponentProvider {
<p>
Note: character scripts that are drawable using the current font will have<br>
some example characters displayed to the right of the name.""");
requiredUnicodeScript.getAccessibleContext().setAccessibleName("Required Unicode Script");
scriptFailedCountLabel = new GDHtmlLabel();
scriptFailedCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
scriptFailedCountLabel
.setToolTipText("Number of strings excluded due to failing script requirements.");
scriptFailedCountLabel.getAccessibleContext().setAccessibleName("Script Failed Count");
allowLatinScriptButton = new JToggleButton("A-Z");
allowLatinScriptButton.setName("ALLOW_LATIN_SCRIPT");
Gui.registerFont(allowLatinScriptButton, BUTTON_FONT_ID);
@ -614,12 +640,14 @@ public class EncodedStringsDialog extends DialogComponentProvider {
"Allow Latin characters (e.g. A-Z, etc) to also be present in the string.");
allowLatinScriptButton.setSelected(true);
allowLatinScriptButton.addItemListener(this::checkboxItemListener);
allowLatinScriptButton.getAccessibleContext().setAccessibleName("Allow Latin Script");
latinScriptFailedCountLabel = new GDHtmlLabel();
latinScriptFailedCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
latinScriptFailedCountLabel.setToolTipText(
"Number of strings excluded because they contained Latin characters.");
latinScriptFailedCountLabel.getAccessibleContext()
.setAccessibleName("Latin Script Failed Count");
allowCommonScriptButton = new JToggleButton("0-9,!?");
allowCommonScriptButton.setName("ALLOW_COMMON_SCRIPT");
Gui.registerFont(allowCommonScriptButton, BUTTON_FONT_ID);
@ -627,12 +655,13 @@ public class EncodedStringsDialog extends DialogComponentProvider {
"Allow common characters (e.g. 0-9, space, punctuation, etc) to also be present in the string.");
allowCommonScriptButton.setSelected(true);
allowCommonScriptButton.addItemListener(this::checkboxItemListener);
allowCommonScriptButton.getAccessibleContext().setAccessibleName("Allow Common Script");
commonScriptFailedCountLabel = new GDHtmlLabel();
commonScriptFailedCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
commonScriptFailedCountLabel.setToolTipText(
"Number of strings excluded because they contained Common (0-9, space, punctuation, etc) characters.");
commonScriptFailedCountLabel.getAccessibleContext()
.setAccessibleName("Common Script Failed Count");
allowAnyScriptButton = new JToggleButton("Any");
allowAnyScriptButton.setName("ALLOW_ANY_SCRIPT");
Gui.registerFont(allowAnyScriptButton, BUTTON_FONT_ID);
@ -640,11 +669,13 @@ public class EncodedStringsDialog extends DialogComponentProvider {
"Allow all other character scripts to also be present in the string.");
allowAnyScriptButton.setSelected(true);
allowAnyScriptButton.addItemListener(this::checkboxItemListener);
allowAnyScriptButton.getAccessibleContext().setAccessibleName("Allow Any Script");
otherScriptsFailedCountLabel = new GDHtmlLabel();
otherScriptsFailedCountLabel.setForeground(GThemeDefaults.Colors.Messages.ERROR);
otherScriptsFailedCountLabel.setToolTipText(
"Number of strings excluded because they contained characters from other scripts (alphabets).");
otherScriptsFailedCountLabel.getAccessibleContext()
.setAccessibleName("Other Scripts Failed Count");
}
private List<String> getBuiltinStringModelFilenames() {
@ -660,6 +691,7 @@ public class EncodedStringsDialog extends DialogComponentProvider {
List<StringTranslationService> translationServices =
StringTranslationService.getCurrentStringTranslationServices(tool);
translateComboBox = new GhidraComboBox<>(translationServices);
translateComboBox.getAccessibleContext().setAccessibleName("Translate Checkboxes");
StringTranslationService defaultSTS = getDefaultTranslationService(translationServices);
if (defaultSTS != null) {
translateComboBox.setSelectedItem(defaultSTS);

View file

@ -117,10 +117,11 @@ public class EditExternalLocationDialog extends DialogComponentProvider {
int panelHeight = (externalLocation != null) ? PREFERRED_EDIT_PANEL_HEIGHT
: PREFERRED_CREATE_PANEL_HEIGHT;
extLocPanel.setPreferredSize(new Dimension(PREFERRED_PANEL_WIDTH, panelHeight));
extLocPanel.getAccessibleContext().setAccessibleName("External Location");
JPanel workPanel = new JPanel(new BorderLayout());
workPanel.add(extLocPanel, BorderLayout.CENTER);
workPanel.getAccessibleContext().setAccessibleName("Edit External Location");
return workPanel;
}

View file

@ -97,6 +97,7 @@ public class FilterDialog extends ReusableDialogComponentProvider {
private JComponent buildWorkPanel() {
advancedFilterCheckbox = new GCheckBox("Use Advanced Filters");
advancedFilterCheckbox.getAccessibleContext().setAccessibleName("Advanced Filter");
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" +
@ -116,9 +117,9 @@ public class FilterDialog extends ReusableDialogComponentProvider {
});
JPanel mainPanel = new JPanel(new VerticalLayout(15));
mainPanel.getAccessibleContext().setAccessibleName("Symtable Filter");
JPanel filterPanel = new JPanel(new BorderLayout());
filterPanel.getAccessibleContext().setAccessibleName("Filter");
JPanel leftPanel = new JPanel(new VerticalLayout(20));
leftPanel.add(buildSourcePanel());
leftPanel.add(buildTypesPanel());
@ -150,9 +151,11 @@ public class FilterDialog extends ReusableDialogComponentProvider {
checkBoxMap.put(sourceName, cb);
cb.addItemListener(sourceItemListener);
cb.setToolTipText(HTMLUtilities.toHTML(filter.getFilterDescription(sourceName)));
cb.getAccessibleContext().setAccessibleName(sourceName);
panel.add(cb);
}
panel.setBorder(BorderFactory.createTitledBorder("Symbol Source"));
panel.getAccessibleContext().setAccessibleName("Source");
return panel;
}
@ -161,7 +164,7 @@ public class FilterDialog extends ReusableDialogComponentProvider {
JPanel infoPanel = new JPanel(new HorizontalLayout(20));
Icon icon = Icons.INFO_ICON;
infoPanel.getAccessibleContext().setAccessibleName("Info");
infoPanel.add(new GIconLabel(icon));
infoPanel.add(new GHtmlLabel(
HTMLUtilities.toHTML("Advanced filters do not apply to all symbol types.\n" +
@ -173,6 +176,7 @@ public class FilterDialog extends ReusableDialogComponentProvider {
"symbol types are disabled.")));
JPanel filtersPanel = new JPanel(new GridLayout(0, 2));
filtersPanel.getAccessibleContext().setAccessibleName("Filters");
// Border outer = BorderFactory.createEmptyBorder(0,40,0,0);
// Border inner = BorderFactory.createTitledBorder("Advanced Filters");
filtersPanel.setBorder(BorderFactory.createEmptyBorder(0, 40, 0, 0));
@ -182,12 +186,14 @@ public class FilterDialog extends ReusableDialogComponentProvider {
checkBoxMap.put(filterName, cb);
cb.addItemListener(checkboxListener);
cb.setToolTipText(HTMLUtilities.toHTML(filter.getFilterDescription(filterName)));
cb.getAccessibleContext().setAccessibleName(filterName);
filtersPanel.add(cb);
}
advancedFilterPanel = new JPanel(new VerticalLayout(10));
advancedFilterPanel.setBorder(BorderFactory.createTitledBorder("Advanced Filters"));
advancedFilterPanel.add(filtersPanel);
advancedFilterPanel.add(infoPanel);
advancedPanel.getAccessibleContext().setAccessibleName("Advanced");
return advancedPanel;
}
@ -199,6 +205,7 @@ public class FilterDialog extends ReusableDialogComponentProvider {
panel.add(buildLabelTypesPanel("Non-label Symbols", filter.getNonLabelTypeFilterNames()),
BorderLayout.EAST);
panel.add(buildSelectButtonPanel(), BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Types");
return panel;
}
@ -235,12 +242,15 @@ public class FilterDialog extends ReusableDialogComponentProvider {
panel.add(innerPanel);
JButton b1 = new JButton("Select All");
b1.getAccessibleContext().setAccessibleName("Select All");
JButton b2 = new JButton("Clear All");
b2.getAccessibleContext().setAccessibleName("Clear All");
b1.addActionListener(e -> setTypeFiltersActive(true));
b2.addActionListener(e -> setTypeFiltersActive(false));
innerPanel.add(b1);
innerPanel.add(b2);
panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
panel.getAccessibleContext().setAccessibleName("Select Button");
return panel;
}
@ -249,6 +259,7 @@ public class FilterDialog extends ReusableDialogComponentProvider {
JPanel panel = new JPanel(new MiddleLayout());
JPanel panel2 = new JPanel(new GridLayout(1, 0, 20, 0));
JButton button1 = new JButton("Reset Filters");
button1.getAccessibleContext().setAccessibleName("Reset Filters");
button1.addActionListener(e -> {
setStatusText("");
filter.setFilterDefaults();

View file

@ -37,6 +37,7 @@ public class ValidateProgramDialog extends DialogComponentProvider {
conditionTestPanel = new ConditionTestPanel(list);
conditionTestPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
conditionTestPanel.getAccessibleContext().setAccessibleName("Condition Test");
mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
mainPanel.setLayout(new BorderLayout());
@ -44,12 +45,14 @@ public class ValidateProgramDialog extends DialogComponentProvider {
JPanel runButtonPanel = new JPanel();
runButtonPanel.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0));
runButtonPanel.setLayout(new FlowLayout());
runButtonPanel.getAccessibleContext().setAccessibleName("Run Tests");
JButton runTestsButton = new JButton("Run Validators");
runTestsButton.addActionListener(e -> conditionTestPanel.runTests());
runTestsButton.getAccessibleContext().setAccessibleName("Run Tests");
runButtonPanel.add(runTestsButton);
mainPanel.add(conditionTestPanel, BorderLayout.CENTER);
mainPanel.add(runButtonPanel, BorderLayout.SOUTH);
mainPanel.getAccessibleContext().setAccessibleName("Validate Program");
addWorkPanel(mainPanel);
addOKButton();
setOkEnabled(true);

View file

@ -60,6 +60,7 @@ class InstalledProcessorsProvider extends ReusableDialogComponentProvider {
}
};
mainPanel.add(tabbedPane, BorderLayout.CENTER);
mainPanel.getAccessibleContext().setAccessibleName("Installed Processors");
return mainPanel;
}

View file

@ -46,7 +46,6 @@ class RuntimeInfoProvider extends ReusableDialogComponentProvider {
super("Runtime Information", false, false, true, false);
this.plugin = plugin;
setHelpLocation(plugin.getRuntimeInfoHelpLocation());
addWorkPanel(createWorkPanel());
}
@ -71,7 +70,6 @@ class RuntimeInfoProvider extends ReusableDialogComponentProvider {
memoryUsagePanel.hidden();
}
private JComponent createWorkPanel() {
tabbedPane = new JTabbedPane();
@ -92,6 +90,7 @@ class RuntimeInfoProvider extends ReusableDialogComponentProvider {
}
};
mainPanel.add(tabbedPane, BorderLayout.CENTER);
mainPanel.getAccessibleContext().setAccessibleName("Runtime Info Provider");
return mainPanel;
}
@ -113,6 +112,7 @@ class RuntimeInfoProvider extends ReusableDialogComponentProvider {
*/
private void addMemory() {
memoryUsagePanel = new MemoryUsagePanel();
memoryUsagePanel.getAccessibleContext().setAccessibleName("Memory Usage");
tabbedPane.add(memoryUsagePanel, "Memory");
}

View file

@ -78,6 +78,7 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
GCheckBox selectAllCheckBox = new GCheckBox("[ Select All ]", false);
selectAllCheckBox.setName("select.all.check.box");
selectAllCheckBox.getAccessibleContext().setAccessibleName("Select All");
panel.add(selectAllCheckBox);
panel.add(new JSeparator());
@ -91,7 +92,7 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
newCheckBox.setActionCommand(Integer.toString(i));
newCheckBox.setName("choice.check.box." + (i + 1));
newCheckBox.setSelected(false);
newCheckBox.getAccessibleContext().setAccessibleName(stringChoices.get(i).toString());
selectOptions[i] = newCheckBox;
panel.add(selectOptions[i]);
@ -99,7 +100,7 @@ public class MultipleOptionsDialog<T> extends DialogComponentProvider {
selectAllGroup.addCheckBox(newCheckBox);
}
}
panel.getAccessibleContext().setAccessibleName("Multiple Options");
addWorkPanel(panel);
addOKButton();
addCancelButton();

View file

@ -33,6 +33,7 @@ public class SelectLanguageDialog extends DialogComponentProvider {
languagePanel = new NewLanguagePanel();
setTransient(true);
languagePanel.getAccessibleContext().setAccessibleName("Select Language");
addWorkPanel(languagePanel);
addOKButton();
addCancelButton();

View file

@ -104,6 +104,7 @@ public class TableChooserDialog extends DialogComponentProvider
JPanel panel = new JPanel(new BorderLayout());
createTableModel();
TableChooserDialogPanel tablePanel = new TableChooserDialogPanel(model);
tablePanel.getAccessibleContext().setAccessibleName("Table Dialog");
table = tablePanel.getTable();
table.setAccessibleNamePrefix("Chooser");
@ -120,8 +121,10 @@ public class TableChooserDialog extends DialogComponentProvider
GhidraTableFilterPanel<AddressableRowObject> filterPanel =
new GhidraTableFilterPanel<>(table, model);
filterPanel.getAccessibleContext().setAccessibleName("Dialog");
panel.add(tablePanel, BorderLayout.CENTER);
panel.add(filterPanel, BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Table Chooser");
return panel;
}

View file

@ -130,11 +130,11 @@ public class EditFieldNameDialog extends DialogComponentProvider {
nameBorder = BorderFactory.createTitledBorder("Enter Field Name");
mainPanel.setBorder(nameBorder);
fieldName.getAccessibleContext().setAccessibleName("Name");
mainPanel.add(fieldName, BorderLayout.CENTER);
mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
mainPanel.getAccessibleContext().setAccessibleName("Edit Field Name");
return mainPanel;
}

View file

@ -41,8 +41,8 @@ public class OptionsDialog extends DialogComponentProvider implements OptionList
* require that a language be loaded or a program be opened and not all options require an
* AddressFactory. If null, address based options will not be available.
*/
public OptionsDialog(List<Option> originalOptions,
OptionValidator validator, AddressFactoryService addressFactoryService) {
public OptionsDialog(List<Option> originalOptions, OptionValidator validator,
AddressFactoryService addressFactoryService) {
super("Options");
this.validator = validator;
@ -57,7 +57,7 @@ public class OptionsDialog extends DialogComponentProvider implements OptionList
}
optionRenderer = new OptionsEditorPanel(options, addressFactoryService);
optionRenderer.getAccessibleContext().setAccessibleName("Options");
addOKButton();
addCancelButton();
addWorkPanel(optionRenderer);

View file

@ -67,8 +67,7 @@ import utility.function.Callback;
public class SetEquateDialog extends DialogComponentProvider {
private Color FG_EQUATE_SELECED_COLOR =
new GColor("color.fg.dialog.equates.equate.selected");
private Color FG_EQUATE_SELECED_COLOR = new GColor("color.fg.dialog.equates.equate.selected");
private Color FG_BAD_EQUATE_COLOR = new GColor("color.fg.dialog.equates.equate.bad");
private Color FG_EQUATE_COLOR = new GColor("color.fg.dialog.equates.equate");
private Color FG_SUGGESTION_COLOR = new GColor("color.fg.dialog.equates.suggestion");
@ -160,14 +159,12 @@ public class SetEquateDialog extends DialogComponentProvider {
int refCount = eqRowObject.getRefCount();
if (refCount > 0) {
if (eqRowObject.getEntryName().contains(EquateManager.ERROR_TAG)) {
c.setForeground(
isSelected ? FG_EQUATE_SELECED_COLOR : FG_BAD_EQUATE_COLOR);
c.setForeground(isSelected ? FG_EQUATE_SELECED_COLOR : FG_BAD_EQUATE_COLOR);
}
else {
Equate e = eqRowObject.getEquate();
if (e != null && !e.isEnumBased()) {
c.setForeground(
isSelected ? FG_EQUATE_SELECED_COLOR : FG_EQUATE_COLOR);
c.setForeground(isSelected ? FG_EQUATE_SELECED_COLOR : FG_EQUATE_COLOR);
}
}
}
@ -243,20 +240,24 @@ public class SetEquateDialog extends DialogComponentProvider {
protected JPanel buildMainPanel() {
titleLabel = new GDLabel("Possible Matches");
titleLabel.getAccessibleContext().setAccessibleName("Title");
titleLabel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
//long value = scalar.getSignedValue();
applyToCurrent = new GRadioButton("Current location", true);
applyToCurrent.setName("applyToCurrent");
applyToCurrent.getAccessibleContext().setAccessibleName("Apply to Location");
applyToCurrent.setToolTipText("Apply to current scalar operand only");
applyToSelection = new GRadioButton("Current selection", false);
applyToSelection.setName("applyToSelection");
applyToSelection.getAccessibleContext().setAccessibleName("Apply to Selection");
applyToSelection.setToolTipText(
"Apply to all matching, defined scalar code " + "units in current selection.");
applyToAll = new GRadioButton("Entire program", false);
applyToAll.setName("applyToAll");
applyToAll.getAccessibleContext().setAccessibleName("Apply to All");
applyToAll.setToolTipText(
"Apply to all matching, defined scalar code units " + "in entire program.");
@ -267,6 +268,7 @@ public class SetEquateDialog extends DialogComponentProvider {
overwriteExistingEquates = new GCheckBox("Overwrite existing equates", false);
overwriteExistingEquates.setName("Overwrite");
overwriteExistingEquates.getAccessibleContext().setAccessibleName("Overwrite");
overwriteExistingEquates.setEnabled(false);
overwriteExistingEquates.setToolTipText("If checked, apply equates to all unmarked " +
"scalars and overwrite any existing equates of the same value in the " +
@ -316,12 +318,15 @@ public class SetEquateDialog extends DialogComponentProvider {
});
JPanel tablePanel = new JPanel(new BorderLayout());
tablePanel.getAccessibleContext().setAccessibleName("Table Panel");
JScrollPane scrollPane = new JScrollPane(suggestedEquatesTable);
scrollPane.getAccessibleContext().setAccessibleName("Suggested Equates");
tablePanel.add(scrollPane);
tablePanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 5, 5));
filterPanel =
new GhidraTableFilterPanel<>(suggestedEquatesTable, model, " Equate String: ");
filterPanel.getAccessibleContext().setAccessibleName("Suggested Equates");
model.addTableModelListener(evt -> updateFilter());
GhidraTableCellRenderer renderer = getRenderer();
@ -334,10 +339,12 @@ public class SetEquateDialog extends DialogComponentProvider {
filterPanel.addEnterListener(enterListener);
JPanel northPanel = new JPanel(new VerticalLayout(2));
northPanel.getAccessibleContext().setAccessibleName("Equate Field");
String labelText = "Scalar Value: " + scalar.toString(16, false, true, "0x", "") + " (" +
scalar.toString(10, false, true, "", "") + ")";
JLabel label = new GLabel(labelText);
label.setName("EquateField");
label.getAccessibleContext().setAccessibleName("Equate Field");
label.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
northPanel.add(label);
northPanel.add(titleLabel);
@ -345,6 +352,7 @@ public class SetEquateDialog extends DialogComponentProvider {
northPanel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));
JPanel scopePanel = new JPanel(new HorizontalLayout(2));
scopePanel.getAccessibleContext().setAccessibleName("Application Scope");
scopePanel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));
scopePanel.add(new GLabel("Apply To: "));
@ -354,11 +362,12 @@ public class SetEquateDialog extends DialogComponentProvider {
JPanel optionsPanel = new JPanel(new HorizontalLayout(2));
optionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
optionsPanel.getAccessibleContext().setAccessibleName("Options");
optionsPanel.add(new GLabel("Options: "));
optionsPanel.add(overwriteExistingEquates);
JPanel southPanel = new JPanel(new VerticalLayout(0));
southPanel.getAccessibleContext().setAccessibleName("Application Scope and Options");
southPanel.add(scopePanel);
southPanel.add(optionsPanel);
@ -373,7 +382,7 @@ public class SetEquateDialog extends DialogComponentProvider {
mainPanel.add(northPanel, BorderLayout.NORTH);
mainPanel.add(tablePanel, BorderLayout.CENTER);
mainPanel.add(southPanel, BorderLayout.SOUTH);
mainPanel.getAccessibleContext().setAccessibleName("Set Equate");
return mainPanel;
}

View file

@ -102,6 +102,7 @@ public class DataTypeSelectionDialog extends DialogComponentProvider {
});
JComponent mainPanel = createEditorPanel(editor);
mainPanel.getAccessibleContext().setAccessibleName("Data Type Selection");
addWorkPanel(mainPanel);
rootPanel.validate();

View file

@ -50,6 +50,7 @@ public class CheckoutDialog extends DialogComponentProvider {
actionID = CHECKOUT;
close();
});
checkoutButton.getAccessibleContext().setAccessibleName("Checkout file");
addButton(checkoutButton);
JButton noCheckoutButton = new JButton("No");
@ -57,6 +58,7 @@ public class CheckoutDialog extends DialogComponentProvider {
actionID = DO_NOT_CHECKOUT;
close();
});
noCheckoutButton.getAccessibleContext().setAccessibleName("Don't checkout file");
addButton(noCheckoutButton);
}
@ -78,11 +80,13 @@ public class CheckoutDialog extends DialogComponentProvider {
JPanel innerPanel = new JPanel();
innerPanel.setLayout(new BorderLayout());
innerPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
innerPanel.getAccessibleContext().setAccessibleName("File Checkout");
JPanel msgPanel = new JPanel(new BorderLayout());
msgPanel.add(
new GIconLabel(OptionDialog.getIconForMessageType(OptionDialog.WARNING_MESSAGE)),
BorderLayout.WEST);
msgPanel.getAccessibleContext().setAccessibleName("Message");
MultiLineLabel msgText = new MultiLineLabel("File " + df.getName() +
" is NOT CHECKED OUT.\n" + "If you want to make changes and save them\n" +
@ -102,7 +106,10 @@ public class CheckoutDialog extends DialogComponentProvider {
exclusiveCB.addActionListener(e -> exclusiveCheckout = exclusiveCB.isSelected());
JPanel cbPanel = new JPanel(new BorderLayout());
cbPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
exclusiveCB.getAccessibleContext()
.setAccessibleDescription("Exclusize Checkout Box");
cbPanel.add(exclusiveCB);
cbPanel.getAccessibleContext().setAccessibleDescription("Checkboxes");
innerPanel.add(cbPanel, BorderLayout.SOUTH);
}
}

View file

@ -52,6 +52,7 @@ class PasswordDialog extends DialogComponentProvider {
setMinimumSize(300, 100);
passwordField = new JPasswordField(16);
passwordField.getAccessibleContext().setAccessibleName("Password Entry");
passwordField.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
@ -77,11 +78,12 @@ class PasswordDialog extends DialogComponentProvider {
workPanel.add(new GLabel(prompt != null ? prompt : "Password:"));
workPanel.add(passwordField);
workPanel.getAccessibleContext().setAccessibleName("Password");
addWorkPanel(workPanel);
addOKButton();
addCancelButton();
JButton cancelAllButton = new JButton("Cancel All");
cancelAllButton.getAccessibleContext().setAccessibleName("Cancel All");
cancelAllButton.addActionListener(e -> {
cancelledAll = true;
cancelButton.doClick();
@ -91,8 +93,7 @@ class PasswordDialog extends DialogComponentProvider {
setFocusComponent(passwordField);
setHelpLocation(
new HelpLocation("FileSystemBrowserPlugin", "PasswordDialog"));
setHelpLocation(new HelpLocation("FileSystemBrowserPlugin", "PasswordDialog"));
}
private void updateCapLockWarning() {

View file

@ -151,6 +151,7 @@ public class ImporterDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(buildMainPanel());
panel.add(buildButtonPanel());
panel.getAccessibleContext().setAccessibleName("Importer");
return panel;
}
@ -165,6 +166,7 @@ public class ImporterDialog extends DialogComponentProvider {
panel.add(buildFolderPanel());
panel.add(new GLabel("Program Name: ", SwingConstants.RIGHT));
panel.add(buildNameTextField());
panel.getAccessibleContext().setAccessibleName("Importer Details");
return panel;
}
@ -199,6 +201,7 @@ public class ImporterDialog extends DialogComponentProvider {
validateFormInput();
}
});
nameTextField.getAccessibleContext().setAccessibleName("Name");
return nameTextField;
}
@ -214,12 +217,14 @@ public class ImporterDialog extends DialogComponentProvider {
folderNameTextField = new JTextField();
folderNameTextField.setEditable(false);
folderNameTextField.setFocusable(false);
folderNameTextField.getAccessibleContext().setAccessibleName("Folder Name");
folderButton = new BrowseButton();
folderButton.addActionListener(e -> chooseProjectFolder());
folderButton.getAccessibleContext().setAccessibleName("Folder");
JPanel panel = new JPanel(new BorderLayout());
panel.add(folderNameTextField, BorderLayout.CENTER);
panel.add(folderButton, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Folder");
return panel;
}
@ -227,8 +232,10 @@ public class ImporterDialog extends DialogComponentProvider {
languageTextField = new JTextField();
languageTextField.setEditable(false);
languageTextField.setFocusable(false);
languageTextField.getAccessibleContext().setAccessibleName("Language");
languageButton = new BrowseButton();
languageButton.getAccessibleContext().setAccessibleName("Language");
languageButton.addActionListener(e -> {
Object selectedItem = loaderComboBox.getSelectedItem();
if (selectedItem instanceof Loader) {
@ -249,6 +256,7 @@ public class ImporterDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
panel.add(languageTextField, BorderLayout.CENTER);
panel.add(languageButton, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Language");
return panel;
}
@ -259,6 +267,7 @@ public class ImporterDialog extends DialogComponentProvider {
loaderComboBox = new GhidraComboBox<>(orderedLoaders);
loaderComboBox.addItemListener(e -> selectedLoaderChanged());
loaderComboBox.setEnterKeyForwarding(true);
loaderComboBox.getAccessibleContext().setAccessibleName("Loader Choices");
loaderComboBox.setRenderer(
GComboBoxCellRenderer.createDefaultTextRenderer(loader -> loader.getName()));
@ -268,6 +277,7 @@ public class ImporterDialog extends DialogComponentProvider {
panel.add(loaderComboBox, BorderLayout.CENTER);
panel.add(buildLoaderInfoButton(), BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Loader Choice");
return panel;
}
@ -275,10 +285,11 @@ public class ImporterDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
EmptyBorderButton helpButton = new EmptyBorderButton(new GIcon("icon.information"));
helpButton.setToolTipText("Show list of supported format/loaders");
helpButton.getAccessibleContext().setAccessibleName("Loader Info");
helpButton.addActionListener(e -> showSupportedImportFormats());
panel.add(helpButton);
panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2));
panel.getAccessibleContext().setAccessibleName("Loader Info");
return panel;
}
@ -315,12 +326,14 @@ public class ImporterDialog extends DialogComponentProvider {
JPanel innerPanel = new JPanel(new VerticalLayout(5));
innerPanel.add(buildOptionsButton());
panel.add(innerPanel, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Buttons");
return panel;
}
private Component buildOptionsButton() {
optionsButton = new JButton("Options...");
optionsButton.addActionListener(e -> showOptions());
optionsButton.getAccessibleContext().setAccessibleName("Options");
return optionsButton;
}

View file

@ -56,6 +56,7 @@ public class ImporterLanguageDialog extends DialogComponentProvider {
languagePanel = new NewLanguagePanel();
languagePanel.setRecommendedLcsPairsList(new ArrayList<LanguageCompilerSpecPair>());
languagePanel.setShowAllLcsPairs(false);
languagePanel.getAccessibleContext().setAccessibleName("Language");
languagePanel.setBorder(
BorderFactory.createTitledBorder(" Select Language and Compiler Specification "));
languagePanel.addSelectionListener(e -> {
@ -126,8 +127,8 @@ public class ImporterLanguageDialog extends DialogComponentProvider {
}
}
if (preferredLoadSpecs.size() == 1) {
languagePanel.setRecommendedLcsPair(
preferredLoadSpecs.get(0).getLanguageCompilerSpec());
languagePanel
.setRecommendedLcsPair(preferredLoadSpecs.get(0).getLanguageCompilerSpec());
}
else {
languagePanel.setRecommendedLcsPair(null);

View file

@ -72,8 +72,10 @@ public class NewLanguagePanel extends JPanel {
descriptionLabel = new GDLabel(DEFAULT_DESCRIPTION_TEXT);
Gui.registerFont(descriptionLabel, Font.ITALIC);
descriptionLabel.getAccessibleContext().setAccessibleName("Description");
recommendedCheckbox = new GCheckBox("Show Only Recommended Language/Compiler Specs");
recommendedCheckbox.getAccessibleContext().setAccessibleName("Recomendation");
recommendedCheckbox.addItemListener(e -> {
switch (e.getStateChange()) {
case ItemEvent.SELECTED:
@ -88,6 +90,7 @@ public class NewLanguagePanel extends JPanel {
});
formatLabel = new GDLabel();
formatLabel.getAccessibleContext().setAccessibleName("Format");
formatLabel.setHorizontalAlignment(SwingConstants.CENTER);
formatLabel.setForeground(Messages.NORMAL);
}
@ -109,6 +112,7 @@ public class NewLanguagePanel extends JPanel {
};
JPanel descriptionPanel = new JPanel();
descriptionPanel.getAccessibleContext().setAccessibleName("Description");
Border titledBorder = BorderFactory.createTitledBorder("Description");
descriptionPanel.setBorder(titledBorder);
descriptionPanel.setLayout(new BorderLayout());
@ -118,16 +122,19 @@ public class NewLanguagePanel extends JPanel {
innerPanel.setLayout(new BorderLayout());
innerPanel.add(scrollPane, BorderLayout.CENTER);
innerPanel.add(tableFilterPanel, BorderLayout.SOUTH);
innerPanel.getAccessibleContext().setAccessibleName("Table Filter");
JPanel middlePanel = new JPanel();
middlePanel.setLayout(new BorderLayout());
middlePanel.add(innerPanel, BorderLayout.CENTER);
middlePanel.add(descriptionPanel, BorderLayout.SOUTH);
middlePanel.getAccessibleContext().setAccessibleName("Table Filter Panel and Description");
JPanel outerPanel = new JPanel();
outerPanel.setLayout(new BorderLayout());
outerPanel.add(middlePanel, BorderLayout.CENTER);
outerPanel.add(recommendedCheckbox, BorderLayout.SOUTH);
outerPanel.getAccessibleContext().setAccessibleName("Recommended Checkbox");
setLayout(new BorderLayout());
add(outerPanel, BorderLayout.CENTER);

View file

@ -130,7 +130,7 @@ public class BatchImportDialog extends DialogComponentProvider {
};
table = new GTable(tableModel);
table.getAccessibleContext().setAccessibleName("Batch Content");
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -178,11 +178,13 @@ public class BatchImportDialog extends DialogComponentProvider {
JPanel sourceListPanel = new JPanel();
sourceListPanel.setLayout(new BorderLayout());
sourceListPanel.setBorder(createTitledBorder("Import Sources", false));
sourceListPanel.getAccessibleContext().setAccessibleName("Source List");
sourceListModel = new SourcesListModel();
JList<String> sourceList = new JList<>(sourceListModel);
sourceList.setName("batch.import.source.list");
sourceList.getAccessibleContext().setAccessibleName("Batch Import Source List");
sourceList.addListSelectionListener(e -> {
if (!e.getValueIsAdjusting()) {
boolean hasSelection = sourceList.getSelectedIndices().length > 0;
@ -191,8 +193,10 @@ public class BatchImportDialog extends DialogComponentProvider {
});
JScrollPane sourceListScrollPane = new JScrollPane(sourceList);
sourceListPanel.add(sourceListScrollPane, BorderLayout.CENTER);
sourceListScrollPane.getAccessibleContext().setAccessibleName("Source List Scroll");
JPanel sourceOptionsPanel = new JPanel();
sourceOptionsPanel.getAccessibleContext().setAccessibleName("Source Options");
// some padding before the files table
sourceOptionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
@ -231,10 +235,13 @@ public class BatchImportDialog extends DialogComponentProvider {
JPanel sourceListButtonsPanel = new JPanel();
sourceListButtonsPanel.setLayout(new BorderLayout());
sourceListButtonsPanel.getAccessibleContext().setAccessibleName("Source List Buttons");
JButton addSourceButton = new JButton("Add");
addSourceButton.getAccessibleContext().setAccessibleName("Add Source");
this.removeSourceButton = new JButton("Remove");
removeSourceButton.setEnabled(false);
removeSourceButton.getAccessibleContext().setAccessibleName("Remove");
addSourceButton.addActionListener(e -> {
addSources();
@ -282,11 +289,13 @@ public class BatchImportDialog extends DialogComponentProvider {
});
JPanel outputOptionsPanel = buildOutputOptionsPanel();
outputOptionsPanel.getAccessibleContext().setAccessibleName("Output Options");
Box box = Box.createVerticalBox();
box.add(sourceListPanel);
box.add(filesPanel);
box.add(outputOptionsPanel);
box.getAccessibleContext().setAccessibleName("Batch Import");
addOKButton();
addCancelButton();
@ -304,21 +313,25 @@ public class BatchImportDialog extends DialogComponentProvider {
JPanel outputChoicesPanel = new JPanel();
outputChoicesPanel.setLayout(new BoxLayout(outputChoicesPanel, BoxLayout.LINE_AXIS));
outputChoicesPanel.getAccessibleContext().setAccessibleName("Output Choices");
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");
stripLeadingCb.getAccessibleContext().setAccessibleName("Strip Leading Path");
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");
stripContainerCb.getAccessibleContext().setAccessibleName("Strip Container Paths");
GCheckBox openAfterImportCb = new GCheckBox("Open after import", openAfterImporting);
openAfterImportCb.addChangeListener(
e -> setOpenAfterImporting(openAfterImportCb.isSelected()));
openAfterImportCb
.addChangeListener(e -> setOpenAfterImporting(openAfterImportCb.isSelected()));
openAfterImportCb.setToolTipText("Open imported binaries in Code Browser");
openAfterImportCb.getAccessibleContext().setAccessibleName("Open After Import");
outputChoicesPanel.add(stripLeadingCb);
outputChoicesPanel.add(stripContainerCb);
@ -341,6 +354,7 @@ public class BatchImportDialog extends DialogComponentProvider {
outputOptionsPanel.setBorder(createTitledBorder("Import Options", true));
outputOptionsPanel.add(outputChoicesPanel, BorderLayout.NORTH);
outputOptionsPanel.add(destPanel, BorderLayout.SOUTH);
outputOptionsPanel.getAccessibleContext().setAccessibleName("Output Options");
return outputOptionsPanel;
}

View file

@ -155,6 +155,7 @@ public class ImageDialogProvider extends DialogComponentProvider {
private JComponent buildWorkPanel() {
shapeCombo = new GComboBox<>();
shapeCombo.getAccessibleContext().setAccessibleName("Shapes");
shapeCombo.addItem("Rectangle");
shapeCombo.addItem("Oval");
shapeCombo.addItem("Arrow");
@ -163,19 +164,22 @@ public class ImageDialogProvider extends DialogComponentProvider {
jPanel.add(shapeCombo, BorderLayout.NORTH);
JPanel imagePanel = new JPanel(new BorderLayout());
imagePanel.getAccessibleContext().setAccessibleName("Image");
newImageLabel = new GIconLabel(new ImageIcon(newImage));
newImageLabel.setOpaque(true);
newImageLabel.setBackground(Palette.BLACK);
newImageLabel.getAccessibleContext().setAccessibleName("New Image");
JPanel newLabelPanel = new JPanel(new BorderLayout());
newLabelPanel.getAccessibleContext().setAccessibleName("New Label");
if (oldImage != null) {
oldImageLabel = new GIconLabel(new ImageIcon(oldImage));
oldImageLabel.setOpaque(true);
oldImageLabel.setBackground(Palette.BLACK);
oldImageLabel.getAccessibleContext().setAccessibleName("Old Image");
}
else {
oldImageLabel = new GLabel(" Old image not found ");
oldImageLabel.getAccessibleContext().setAccessibleName("Old Image");
}
newLabelPanel.add(createImageLabelComponent("New Image"), BorderLayout.NORTH);
@ -186,7 +190,7 @@ public class ImageDialogProvider extends DialogComponentProvider {
oldLabelPanel.add(createImageLabelComponent("Old Image"), BorderLayout.NORTH);
oldLabelPanel.setBorder(BorderFactory.createLineBorder(Colors.BORDER, 20));
oldLabelPanel.add(oldImageLabel, BorderLayout.CENTER);
oldLabelPanel.getAccessibleContext().setAccessibleName("Old Label");
imagePanel.add(oldLabelPanel, BorderLayout.WEST);
imagePanel.add(newLabelPanel, BorderLayout.EAST);
@ -194,7 +198,7 @@ public class ImageDialogProvider extends DialogComponentProvider {
textField = new JTextField();
jPanel.add(textField, BorderLayout.SOUTH);
jPanel.getAccessibleContext().setAccessibleName("Image Provider");
return jPanel;
}
@ -203,6 +207,7 @@ public class ImageDialogProvider extends DialogComponentProvider {
JLabel label = createNameLabel(name);
panel.add(label);
panel.setBackground(label.getBackground());
panel.getAccessibleContext().setAccessibleName("Image Label");
return panel;
}
@ -212,6 +217,7 @@ public class ImageDialogProvider extends DialogComponentProvider {
label.setOpaque(true);
label.setBackground(Palette.BLACK);
label.setHorizontalTextPosition(SwingConstants.CENTER);
label.getAccessibleContext().setAccessibleName(name);
return label;
}

View file

@ -146,7 +146,6 @@ public class GhidraScriptAskMethodsTest extends AbstractGhidraHeadedIntegrationT
DataTreeDialog dtd = waitForDialogComponent(DataTreeDialog.class);
JButton okButton = (JButton) getInstanceField("okButton", dtd);
runSwing(() -> okButton.doClick());
// this test will fail if we encountered an exception
@ -761,6 +760,7 @@ public class GhidraScriptAskMethodsTest extends AbstractGhidraHeadedIntegrationT
JComboBox<String> comboField =
(JComboBox<String>) findComponentByName(askDialog, "JComboBox");
setComboBoxSelection(comboField, optionalValue);
waitForSwing();
}
@ -793,6 +793,7 @@ public class GhidraScriptAskMethodsTest extends AbstractGhidraHeadedIntegrationT
if (optionalValue != null) {
String name = "JTextField";
JTextField textField = (JTextField) findComponentByName(askDialog, name);
textField.getAccessibleContext().setAccessibleName("Option");
setText(textField, optionalValue);
waitForSwing();
}

View file

@ -63,13 +63,16 @@ public class BitsInputDialogComponentProvider extends InputDialogComponentProvid
mainPanel.add(new GLabel(TOTAL_BITS_LABEL));
totalBitsBox = new IntegerTextField();
totalBitsBox.setValue(DEFAULT_TOTAL_BITS);
totalBitsBox.getComponent().getAccessibleContext().setAccessibleName("Total Bits");
mainPanel.add(totalBitsBox.getComponent());
mainPanel.add(new GLabel(POST_BITS_LABEL));
preBitsBox = new IntegerTextField();
preBitsBox.setValue(DEFAULT_POST_BITS);
preBitsBox.getComponent().getAccessibleContext().setAccessibleName("Pre Bits");
mainPanel.add(preBitsBox.getComponent());
mainPanel.getAccessibleContext().setAccessibleName("Bits Input Provider");
return mainPanel;
}

View file

@ -99,6 +99,8 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
panel.add(infoPanel, BorderLayout.NORTH);
GFilterTable<ByteSequenceRowObject> filterTable = new GFilterTable<>(byteSequenceTable);
panel.add(filterTable, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Byte Sequence Analyzer");
return panel;
}
@ -108,21 +110,26 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
mergedSeqTextField.setEditable(false);
TitledBorder lubBorder = new TitledBorder("Merged Selections");
mergedSeqTextField.setBorder(lubBorder);
mergedSeqTextField.getAccessibleContext().setAccessibleName("Merged Selections");
bitsOfCheckField = new JTextField(5);
bitsOfCheckField.setEditable(false);
TitledBorder bitsOfCheckBorder = new TitledBorder("Bits of Check");
bitsOfCheckField.setBorder(bitsOfCheckBorder);
bitsOfCheckField.getAccessibleContext().setAccessibleName("Bits of Check");
noteField = new JTextField(60);
noteField.setText(note);
noteField.setEditable(true);
TitledBorder noteBorder = new TitledBorder("Note");
noteField.setBorder(noteBorder);
noteField.getAccessibleContext().setAccessibleName("Note");
panel.add(mergedSeqTextField, BorderLayout.NORTH);
panel.add(bitsOfCheckField, BorderLayout.CENTER);
panel.add(noteField, BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Info");
return panel;
}
@ -161,8 +168,8 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
Icon icon = new GIcon("icon.bytepatterns.send.to.clipboard");
sendSelectedToClipboardAction.setPopupMenuData(
new MenuData(new String[] { "Send Selected to Clipboard" }, icon));
sendSelectedToClipboardAction.setDescription(
"Creates patterns for the currently-selected strings of " +
sendSelectedToClipboardAction
.setDescription("Creates patterns for the currently-selected strings of " +
"bytes and sends them to the clipboard");
sendSelectedToClipboardAction.setHelpLocation(
new HelpLocation("FunctionBitPatternsExplorerPlugin", "Analyzing_Byte_Sequences"));
@ -235,8 +242,8 @@ public abstract class ByteSequenceAnalyzerProvider extends DialogComponentProvid
};
Icon icon = new GIcon("icon.bytepatterns.byte.sequence.analyzer.clipboard.merged");
sendMergedToClipboardAction.setPopupMenuData(
new MenuData(new String[] { "Send Merged to Clipboard" }, icon));
sendMergedToClipboardAction
.setPopupMenuData(new MenuData(new String[] { "Send Merged to Clipboard" }, icon));
sendMergedToClipboardAction.setDescription("Sends the Merge Patterns to the Clipboard");
sendMergedToClipboardAction.setHelpLocation(
new HelpLocation("FunctionBitPatternsExplorerPlugin", "Analyzing_Byte_Sequences"));

View file

@ -67,10 +67,13 @@ public class ByteSequenceLengthFilterInputDialog extends InputDialogComponentPro
mainPanel.setLayout(pairLayout);
mainPanel.add(new GLabel(INDEX_BOX_TITLE_TEXT));
indexBox = new IntegerTextField();
indexBox.getComponent().getAccessibleContext().setAccessibleName("Index");
mainPanel.add(indexBox.getComponent());
mainPanel.add(new GLabel(LENGTH_BOX_TITLE_TEXT));
minLengthBox = new IntegerTextField();
minLengthBox.getComponent().getAccessibleContext().setAccessibleName("Minimum Length");
mainPanel.add(minLengthBox.getComponent());
mainPanel.getAccessibleContext().setAccessibleName("Byte Sequence Length Filter");
return mainPanel;
}

View file

@ -80,6 +80,7 @@ public class ClosedPatternTableDialog extends DialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
tablePanel = new GThreadedTablePanel<>(closedPatternTableModel);
panel.add(tablePanel, BorderLayout.CENTER);
panel.getAccessibleContext().setAccessibleName("Closed Pattern Table");
return panel;
}
@ -117,8 +118,8 @@ public class ClosedPatternTableDialog extends DialogComponentProvider {
Icon icon = new GIcon("icon.bytepatterns.send.to.clipboard");
sendToClipboardAction.setPopupMenuData(
new MenuData(new String[] { "Send Selected Sequences to Clipboard" }, icon));
sendToClipboardAction.setDescription(
"Sends the currently selected sequences to the clipboard");
sendToClipboardAction
.setDescription("Sends the currently selected sequences to the clipboard");
this.addAction(sendToClipboardAction);
}

View file

@ -79,6 +79,8 @@ public class ContextRegisterFilterInputDialog extends InputDialogComponentProvid
currentRegPanel.setLayout(pairLayout);
JTextField currentTextField = new JTextField(currentRegister, TEXT_FIELD_COLUMNS);
currentTextField.setEditable(false);
currentTextField.getAccessibleContext()
.setAccessibleName(currentRegister + " Register");
currentRegPanel.add(currentTextField);
List<BigInteger> regValues = extent.getValuesForRegister(currentRegister);
RegisterValueWrapper[] valueArray = new RegisterValueWrapper[regValues.size() + 1];
@ -89,9 +91,11 @@ public class ContextRegisterFilterInputDialog extends InputDialogComponentProvid
GhidraComboBox<RegisterValueWrapper> currentCombo =
new GhidraComboBox<RegisterValueWrapper>(valueArray);
currentRegPanel.add(currentCombo);
currentRegPanel.getAccessibleContext().setAccessibleName(currentRegister + " Values");
panel.add(currentRegPanel);
regsToBoxes.put(currentRegister, currentCombo);
}
panel.getAccessibleContext().setAccessibleName("Context Register Filter");
return panel;
}
@ -105,8 +109,9 @@ public class ContextRegisterFilterInputDialog extends InputDialogComponentProvid
}
ContextRegisterFilter registerFilter = new ContextRegisterFilter();
for (String currentRegister : regsToBoxes.keySet()) {
BigInteger value = ((RegisterValueWrapper) regsToBoxes.get(
currentRegister).getSelectedItem()).getValue();
BigInteger value =
((RegisterValueWrapper) regsToBoxes.get(currentRegister).getSelectedItem())
.getValue();
if (value != null) {
registerFilter.addRegAndValueToFilter(currentRegister, value);
}

View file

@ -87,37 +87,50 @@ public class DataGatheringParamsDialog extends InputDialogComponentProvider {
mainPanel.add(new GLabel(FIRST_BYTES_TEXT));
firstBytesField = new IntegerTextField();
firstBytesField.setValue(DEFAULT_FIRST_BYTES);
firstBytesField.getComponent().getAccessibleContext().setAccessibleName("First Bytes");
mainPanel.add(firstBytesField.getComponent());
mainPanel.add(new GLabel(PRE_BYTES_TEXT));
preBytesField = new IntegerTextField();
preBytesField.setValue(DEFAULT_PRE_BYTES);
preBytesField.getComponent().getAccessibleContext().setAccessibleName("Pre Bytes");
mainPanel.add(preBytesField.getComponent());
mainPanel.add(new GLabel(RETURN_BYTES_TEXT));
returnBytesField = new IntegerTextField();
returnBytesField.setValue(DEFAULT_RETURN_BYTES);
returnBytesField.getComponent().getAccessibleContext().setAccessibleName("Return Bytes");
mainPanel.add(returnBytesField.getComponent());
mainPanel.add(new GLabel(FIRST_INSTRUCTIONS_TEXT));
firstInstructionsField = new IntegerTextField();
firstInstructionsField.setValue(DEFAULT_FIRST_INSTRUCTIONS);
firstInstructionsField.getComponent()
.getAccessibleContext()
.setAccessibleName("First Instructions");
mainPanel.add(firstInstructionsField.getComponent());
mainPanel.add(new GLabel(PRE_INSTRUCTIONS_TEXT));
preInstructionsField = new IntegerTextField();
preInstructionsField.setValue(DEFAULT_PRE_INSTRUCTIONS);
preInstructionsField.getComponent()
.getAccessibleContext()
.setAccessibleName("Pre Instructions");
mainPanel.add(preInstructionsField.getComponent());
mainPanel.add(new GLabel(RETURN_INSTRUCTIONS_TEXT));
returnInstructionsField = new IntegerTextField();
returnInstructionsField.setValue(DEFAULT_RETURN_INSTRUCTIONS);
returnInstructionsField.getComponent()
.getAccessibleContext()
.setAccessibleName("Return Instructions");
mainPanel.add(returnInstructionsField.getComponent());
mainPanel.add(new GLabel(CONTEXT_REGISTER_TEXT));
contextRegistersField = new JTextField(DEFAULT_CONTEXT_REGISTERS);
contextRegistersField.getAccessibleContext().setAccessibleName("Context Registers");
mainPanel.add(contextRegistersField);
mainPanel.getAccessibleContext().setAccessibleName("Data Gathering Parameters");
return mainPanel;
}

View file

@ -51,6 +51,7 @@ public class ExportPatternFileActionListener implements ActionListener {
*/
public ExportPatternFileActionListener(ClipboardPanel clipboardPanel, Component comp) {
this.clipboardPanel = clipboardPanel;
this.clipboardPanel.getAccessibleContext().setAccessibleName("Clipboard");
component = comp;
}

View file

@ -64,6 +64,7 @@ public class SequenceMiningParamsInputDialog extends InputDialogComponentProvide
public SequenceMiningParamsInputDialog(String title, Component parent) {
super(title);
JPanel panel = createPanel();
panel.getAccessibleContext().setAccessibleName("Sequence Mining Parameter Input");
addWorkPanel(panel);
addOKButton();
okButton.setText("OK");
@ -83,6 +84,7 @@ public class SequenceMiningParamsInputDialog extends InputDialogComponentProvide
mainPanel.add(new GLabel(PERCENTAGE_BOX_TEXT));
percentageBox = new JTextField(16);
percentageBox.getAccessibleContext().setAccessibleName("Percentage");
double percentage =
Double.parseDouble(Preferences.getProperty(PERCENTAGE_PROPERTY, DEFAULT_PERCENTAGE));
percentageBox.setText(Double.toString(percentage));
@ -91,16 +93,21 @@ public class SequenceMiningParamsInputDialog extends InputDialogComponentProvide
mainPanel.add(new GLabel(MIN_FIXED_BITS_BOX_TEXT));
minFixedBitsBox = new IntegerTextField();
int minFixBits = Integer.parseInt(
Preferences.getProperty(MIN_FIXED_BITS_PROPERTY, DEFAULT_MIN_FIXED_BITS));
minFixedBitsBox.getComponent()
.getAccessibleContext()
.setAccessibleName("Minimum Fixed Bits");
int minFixBits = Integer
.parseInt(Preferences.getProperty(MIN_FIXED_BITS_PROPERTY, DEFAULT_MIN_FIXED_BITS));
minFixedBitsBox.setValue(minFixBits);
mainPanel.add(minFixedBitsBox.getComponent());
boolean useBinary = Boolean.parseBoolean(
Preferences.getProperty(BINARY_SEQUENCES_PROPERTY, BINARY_SEQUENCES_DEFAULT));
binaryButton = new GRadioButton(BINARY_BUTTON_TEXT, useBinary);
binaryButton.getAccessibleContext().setAccessibleName("Use Binary");
binaryButton.setMnemonic(BINARY_MNEMONIC);
nibbleButton = new GRadioButton(NIBBLE_BUTTON_TEXT, !useBinary);
nibbleButton.getAccessibleContext().setAccessibleName("Use Nibble");
nibbleButton.setMnemonic(NIBBLE_MNEMONIC);
mainPanel.add(binaryButton);
mainPanel.add(nibbleButton);
@ -108,7 +115,7 @@ public class SequenceMiningParamsInputDialog extends InputDialogComponentProvide
bGroup = new ButtonGroup();
bGroup.add(binaryButton);
bGroup.add(nibbleButton);
mainPanel.getAccessibleContext().setAccessibleName("Sequenc Mining Parameter Input");
return mainPanel;
}

View file

@ -79,7 +79,7 @@ public class SetFormatDialogComponentProvider extends DialogComponentProvider {
listingPanel.showHeader(true);
container.add(listingPanel);
container.getAccessibleContext().setAccessibleName("Set Format");
return container;
}
@ -87,6 +87,7 @@ public class SetFormatDialogComponentProvider extends DialogComponentProvider {
FormatManager formatManagerCopy = currentFormatManager.createClone();
ListingPanel panel = new ListingPanel(formatManagerCopy, program);
panel.setView(view);
panel.getAccessibleContext().setAccessibleName("Listing");
return panel;
}

View file

@ -87,8 +87,10 @@ public class XRefChooserDialog extends DialogComponentProvider {
});
filterPanel = new GhidraTableFilterPanel<>(table, model);
filterPanel.getAccessibleContext().setAccessibleName("Filter");
workPanel.add(new JScrollPane(table), BorderLayout.CENTER);
workPanel.add(filterPanel, BorderLayout.SOUTH);
workPanel.getAccessibleContext().setAccessibleName("External Reference Chooser");
return workPanel;
}

View file

@ -84,6 +84,7 @@ public class FidSearchDebugDialog extends DialogComponentProvider {
private JTextField getPreparedTextField() {
JTextField textField = new JTextField(25);
Gui.registerFont(textField, Fonts.MONOSPACED);
textField.getAccessibleContext().setAccessibleName("Text");
return textField;
}
@ -94,22 +95,27 @@ public class FidSearchDebugDialog extends DialogComponentProvider {
panel.add(getPreparedLabel("Function ID: "));
functionIdTextField = getPreparedTextField();
functionIdTextField.getAccessibleContext().setAccessibleName("Function Id");
panel.add(functionIdTextField);
panel.add(getPreparedLabel("Name: "));
nameTextField = getPreparedTextField();
nameTextField.getAccessibleContext().setAccessibleName("Name");
panel.add(nameTextField);
panel.add(getPreparedLabel("Domain Path: "));
pathTextField = getPreparedTextField();
pathTextField.getAccessibleContext().setAccessibleName("Path");
panel.add(pathTextField);
panel.add(getPreparedLabel("FH: "));
fhTextField = getPreparedTextField();
fhTextField.getAccessibleContext().setAccessibleName("Full Hash");
panel.add(fhTextField);
panel.add(getPreparedLabel("XH: "));
xhTextField = getPreparedTextField();
xhTextField.getAccessibleContext().setAccessibleName("Specific Hash");
panel.add(xhTextField);
functionIdTextField.addActionListener(e -> {
@ -146,6 +152,7 @@ public class FidSearchDebugDialog extends DialogComponentProvider {
FidDebugUtils.searchBySpecificHash(val.longValue(), service, fidQueryService);
});
panel.getAccessibleContext().setAccessibleName("Fid Database Search");
return panel;
}

View file

@ -62,6 +62,7 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(buildCheckboxPanelScroller(), BorderLayout.CENTER);
panel.add(buildButtonPanel(), BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Active Fid Configuration");
return panel;
}
@ -71,8 +72,11 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
JButton noneButton = new JButton("Select None");
allButton.addActionListener(e -> selectAllCheckboxes(true));
noneButton.addActionListener(e -> selectAllCheckboxes(false));
allButton.getAccessibleContext().setAccessibleName("All");
noneButton.getAccessibleContext().setAccessibleName("None");
panel.add(allButton);
panel.add(noneButton);
panel.getAccessibleContext().setAccessibleName("Select All or None");
return panel;
}
@ -84,6 +88,7 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
private Component buildCheckboxPanelScroller() {
JScrollPane scrollPane = new JScrollPane(buildCheckBoxPanel());
scrollPane.getAccessibleContext().setAccessibleName("Checkbox Scroll");
return scrollPane;
}
@ -95,10 +100,12 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
for (FidFile fidFile : fidFiles) {
GCheckBox checkbox = new GCheckBox(fidFile.getName(), fidFile.isActive());
checkbox.setToolTipText(fidFile.getPath());
checkbox.getAccessibleContext().setAccessibleName(fidFile.getBaseName());
checkboxes.add(checkbox);
checkbox.addItemListener(e -> fidFile.setActive(checkbox.isSelected()));
panel.add(checkbox);
}
panel.getAccessibleContext().setAccessibleName("Checkboxes");
return panel;
}
}

View file

@ -114,22 +114,26 @@ public class PopulateFidDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JLabel jLabel = new GDLabel("Fid Database: ", SwingConstants.RIGHT);
jLabel.setToolTipText("Choose the Fid Database to populate");
jLabel.getAccessibleContext().setAccessibleName("Fid Database");
panel.add(jLabel);
panel.add(buildFidCombo());
panel.add(new GLabel("Library Family Name: ", SwingConstants.RIGHT));
libraryFamilyNameTextField = new JTextField(20);
libraryFamilyNameTextField.getDocument().addUndoableEditListener(e -> updateOkEnablement());
libraryFamilyNameTextField.getAccessibleContext().setAccessibleName("Library Family Name");
panel.add(libraryFamilyNameTextField);
panel.add(new GLabel("Library Version: ", SwingConstants.RIGHT));
versionTextField = new JTextField();
versionTextField.getDocument().addUndoableEditListener(e -> updateOkEnablement());
versionTextField.getAccessibleContext().setAccessibleName("Version");
panel.add(versionTextField);
panel.add(new GLabel("Library Variant: ", SwingConstants.RIGHT));
variantTextField = new JTextField();
variantTextField.getDocument().addUndoableEditListener(e -> updateOkEnablement());
variantTextField.getAccessibleContext().setAccessibleName("Variant");
panel.add(variantTextField);
panel.add(new GLabel("Base Library: ", SwingConstants.RIGHT));
@ -143,15 +147,17 @@ public class PopulateFidDialog extends DialogComponentProvider {
panel.add(new GLabel("Common Symbols File: ", SwingConstants.RIGHT));
panel.add(buildSymbolsFileField(), jLabel);
panel.getAccessibleContext().setAccessibleName("Populate Fid");
return panel;
}
private JComponent buildSymbolsFileField() {
JPanel panel = new JPanel(new BorderLayout());
symbolsFileTextField = new JTextField();
symbolsFileTextField.getAccessibleContext().setAccessibleName("Symbols File");
panel.add(symbolsFileTextField, BorderLayout.CENTER);
JButton browseButton = new BrowseButton();
browseButton.getAccessibleContext().setAccessibleName("Browse");
browseButton.addActionListener(e -> {
GhidraFileChooser chooser = new GhidraFileChooser(tool.getToolFrame());
chooser.setTitle("Choose Common Symbols File");
@ -165,14 +171,17 @@ public class PopulateFidDialog extends DialogComponentProvider {
});
symbolsFileTextField.getDocument().addUndoableEditListener(e -> updateOkEnablement());
panel.add(browseButton, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Symbols File");
return panel;
}
private Component buildLanguageField() {
JPanel panel = new JPanel(new BorderLayout());
languageIdField = new JTextField();
languageIdField.getAccessibleContext().setAccessibleName("Language Id");
panel.add(languageIdField, BorderLayout.CENTER);
JButton browseButton = new BrowseButton();
browseButton.getAccessibleContext().setAccessibleName("Browse");
browseButton.addActionListener(e -> {
SelectLanguageDialog selectLanguageDialog =
new SelectLanguageDialog("Select Language", "Ok");
@ -184,6 +193,7 @@ public class PopulateFidDialog extends DialogComponentProvider {
});
languageIdField.getDocument().addUndoableEditListener(e -> updateOkEnablement());
panel.add(browseButton, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Language");
return panel;
}
@ -191,6 +201,7 @@ public class PopulateFidDialog extends DialogComponentProvider {
private Component buildLibraryCombo() {
LibraryChoice[] choices = getChoicesForLibraryCombo();
libraryComboBox = new GComboBox<>(choices);
libraryComboBox.getAccessibleContext().setAccessibleName("Library");
return libraryComboBox;
}
@ -222,9 +233,11 @@ public class PopulateFidDialog extends DialogComponentProvider {
private Component buildDomainFolderChooserField() {
JPanel panel = new JPanel(new BorderLayout());
domainFolderField = new JTextField();
domainFolderField.getAccessibleContext().setAccessibleName("Domain Folder");
domainFolderField.setEditable(false);
panel.add(domainFolderField, BorderLayout.CENTER);
JButton browseButton = new BrowseButton();
browseButton.getAccessibleContext().setAccessibleName("Browse");
browseButton.addActionListener(e -> {
final DataTreeDialog dialog = new DataTreeDialog(tool.getToolFrame(),
"Choose Root Folder", CHOOSE_FOLDER);
@ -236,6 +249,7 @@ public class PopulateFidDialog extends DialogComponentProvider {
updateOkEnablement();
});
panel.add(browseButton, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Domain Folder Chooser");
return panel;
}
@ -244,6 +258,7 @@ public class PopulateFidDialog extends DialogComponentProvider {
FidFile[] files = fidFileList.toArray(new FidFile[fidFileList.size()]);
fidFileComboBox = new GComboBox<>(files);
fidFileComboBox.addActionListener(e -> updateLibraryChoices());
fidFileComboBox.getAccessibleContext().setAccessibleName("Fid File");
return fidFileComboBox;
}

View file

@ -42,6 +42,7 @@ public abstract class GhidraGoWaitDialog extends DialogComponentProvider {
addWorkPanel(buildMainPanel(msgText));
JButton waitButton = new JButton("Wait");
waitButton.getAccessibleContext().setAccessibleName("Wait");
waitButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -53,6 +54,7 @@ public abstract class GhidraGoWaitDialog extends DialogComponentProvider {
addButton(waitButton);
JButton noWaitButton = new JButton("No");
noWaitButton.getAccessibleContext().setAccessibleName("No Wait");
noWaitButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -91,15 +93,18 @@ public abstract class GhidraGoWaitDialog extends DialogComponentProvider {
innerPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
JPanel msgPanel = new JPanel(new BorderLayout());
msgPanel.getAccessibleContext().setAccessibleName("Message");
msgPanel.add(
new GIconLabel(OptionDialog.getIconForMessageType(OptionDialog.WARNING_MESSAGE)),
BorderLayout.WEST);
MultiLineLabel msgText = new MultiLineLabel(msgTextString);
msgText.getAccessibleContext().setAccessibleName("Message Text");
msgText.setMaximumSize(msgText.getPreferredSize());
msgPanel.add(msgText, BorderLayout.CENTER);
innerPanel.add(msgPanel, BorderLayout.CENTER);
innerPanel.getAccessibleContext().setAccessibleName("Ghidra Go Wait");
return innerPanel;
}
}

View file

@ -83,6 +83,7 @@ public class GraphExporterDialog extends DialogComponentProvider {
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panel.add(buildMainPanel());
panel.add(buildButtonPanel());
panel.getAccessibleContext().setAccessibleName("Graph Exporter");
return panel;
}
@ -99,6 +100,7 @@ public class GraphExporterDialog extends DialogComponentProvider {
panel.add(buildFormatChooser());
panel.add(new GLabel("Output File: ", SwingConstants.RIGHT));
panel.add(buildFilePanel());
panel.getAccessibleContext().setAccessibleName("Graph Exporter");
return panel;
}
@ -109,6 +111,7 @@ public class GraphExporterDialog extends DialogComponentProvider {
private Component buildFilePanel() {
filePathTextField = new JTextField();
filePathTextField.setName("OUTPUT_FILE_TEXTFIELD");
filePathTextField.getAccessibleContext().setAccessibleName("Output File");
filePathTextField.setText(getFileName());
filePathTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
@ -130,10 +133,12 @@ public class GraphExporterDialog extends DialogComponentProvider {
fileChooserButton = new BrowseButton();
fileChooserButton.addActionListener(e -> chooseDestinationFile());
fileChooserButton.getAccessibleContext().setAccessibleName("File Chooser");
JPanel panel = new JPanel(new BorderLayout());
panel.add(filePathTextField, BorderLayout.CENTER);
panel.add(fileChooserButton, BorderLayout.EAST);
panel.getAccessibleContext().setAccessibleName("Output File");
return panel;
}
@ -190,6 +195,7 @@ public class GraphExporterDialog extends DialogComponentProvider {
if (defaultExporter != null) {
comboBox.setSelectedItem(defaultExporter);
}
comboBox.getAccessibleContext().setAccessibleName("Format Choice");
return comboBox;
}

View file

@ -76,12 +76,14 @@ public class FilterDialog extends DialogComponentProvider {
JPanel vertexPanel = new JPanel(new VerticalLayout(5));
vertexPanel.setBorder(BorderFactory.createTitledBorder(VERTEX_TITLE));
vertexButtons.forEach(vertexPanel::add);
vertexPanel.getAccessibleContext().setAccessibleName("Vertex");
panel.add(vertexPanel);
}
if (!edgeButtons.isEmpty()) {
JPanel edgePanel = new JPanel(new VerticalLayout(5));
edgePanel.setBorder(BorderFactory.createTitledBorder(EDGE_TITLE));
edgeButtons.forEach(edgePanel::add);
edgePanel.getAccessibleContext().setAccessibleName("Edge");
panel.add(edgePanel);
}
@ -89,8 +91,10 @@ public class FilterDialog extends DialogComponentProvider {
JLabel label = new JLabel("No Filters available for this graph!");
label.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
label.getAccessibleContext().setAccessibleName("No Filter");
panel.add(label);
}
panel.getAccessibleContext().setAccessibleName("Filter");
return panel;
}
}

View file

@ -107,7 +107,9 @@ class FilePromptDialog extends DialogComponentProvider {
private void build(String prompt) {
GHtmlLabel promptLabel = new GHtmlLabel(prompt);
promptLabel.getAccessibleContext().setAccessibleName(prompt);
filePathTextField = new JTextField(file != null ? file.getPath() : null, 40);
filePathTextField.getAccessibleContext().setAccessibleName("File Path");
filePathTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void removeUpdate(DocumentEvent e) {
@ -126,21 +128,24 @@ class FilePromptDialog extends DialogComponentProvider {
});
JButton browseButton = new BrowseButton();
browseButton.addActionListener(e -> browse());
browseButton.getAccessibleContext().setAccessibleName("Browse");
JPanel textFieldWithButtonPanel = new JPanel(new BorderLayout());
textFieldWithButtonPanel.getAccessibleContext()
.setAccessibleName("File Path Text Field and Browse Button");
textFieldWithButtonPanel.add(filePathTextField, BorderLayout.CENTER);
textFieldWithButtonPanel.add(browseButton, BorderLayout.EAST);
JPanel mainPanel = new JPanel(new PairLayout());
mainPanel.add(promptLabel);
mainPanel.add(textFieldWithButtonPanel);
mainPanel.getAccessibleContext().setAccessibleName("File Prompt");
Dimension size = mainPanel.getPreferredSize();
size.width = Math.max(size.width, 500);
mainPanel.setPreferredSize(size);
mainPanel.setMinimumSize(size);
JPanel newMain = new JPanel(new BorderLayout());
newMain.add(mainPanel, BorderLayout.CENTER);
newMain.getAccessibleContext().setAccessibleName("File Prompt");
addWorkPanel(newMain);
addOKButton();
addCancelButton();

View file

@ -336,7 +336,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
private void buildSymbolFilePanel() {
// panel will be added in layoutAdvanced()
symbolFilePanel = new SymbolFilePanel(this::searchForPdbs);
symbolFilePanel.getAccessibleContext().setAccessibleName("Symbol File");
symbolFilePanel.getTable()
.getSelectionModel()
.addListSelectionListener(e -> updateSelectedRow());
@ -372,12 +372,12 @@ public class LoadPdbDialog extends DialogComponentProvider {
programNameTextField = new BetterNonEditableTextField(20);
programNameTextField.setEditable(false);
programNameTextField.setText(program.getName());
programNameTextField.getAccessibleContext().setAccessibleName("Program Name");
pdbPathTextField = new BetterNonEditableTextField(20, "Missing", Colors.ERROR);
pdbPathTextField.setEditable(false);
pdbPathTextField.setText(programSymbolFileInfo.getPath());
pdbPathTextField.getDocument().addDocumentListener(docListener);
pdbPathTextField.getAccessibleContext().setAccessibleName("PDB Path");
overridePdbPathCheckBox = new GCheckBox();
overridePdbPathCheckBox.setVisible(false);
overridePdbPathCheckBox.setToolTipText("Override PDB name (when searching).");
@ -390,6 +390,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
pdbPathTextField.setText(programSymbolFileInfo.getPath());
}
});
overridePdbPathCheckBox.getAccessibleContext().setAccessibleName("Override PDB Path");
DockingWindowManager.getHelpService()
.registerHelp(overridePdbPathCheckBox, new HelpLocation(
PdbPlugin.PDB_PLUGIN_HELP_TOPIC, SymbolFilePanel.SEARCH_OPTIONS_HELP_ANCHOR));
@ -401,7 +402,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
"&nbsp;&nbsp;<b>'012345678-0123-0123-0123-0123456789ABC'</b> (with or without dashes) or<br>" +
"PDB Signature ID - 8 hexadecimal characters:<br>" + "&nbsp;&nbsp;<b>'11223344'</b>");
pdbUniqueIdTextField.getDocument().addDocumentListener(docListener);
pdbUniqueIdTextField.getAccessibleContext().setAccessibleName("PDB Unique ID");
overridePdbUniqueIdCheckBox = new GCheckBox();
overridePdbUniqueIdCheckBox.setVisible(false);
overridePdbUniqueIdCheckBox.setToolTipText("Override PDB Unique ID (when searching).");
@ -414,6 +415,8 @@ public class LoadPdbDialog extends DialogComponentProvider {
pdbUniqueIdTextField.setText(programSymbolFileInfo.getUniqifierString());
}
});
overridePdbUniqueIdCheckBox.getAccessibleContext()
.setAccessibleName("Override PDB Unique ID");
DockingWindowManager.getHelpService()
.registerHelp(overridePdbUniqueIdCheckBox, new HelpLocation(
PdbPlugin.PDB_PLUGIN_HELP_TOPIC, SymbolFilePanel.SEARCH_OPTIONS_HELP_ANCHOR));
@ -424,7 +427,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
pdbAgeTextField.setValue(programSymbolFileInfo.getIdentifiers().getAge());
pdbAgeTextField.setEditable(false);
pdbAgeTextField.getDocument().addDocumentListener(docListener);
pdbAgeTextField.getAccessibleContext().setAccessibleName("PDB Age");
overridePdbAgeCheckBox = new GCheckBox();
overridePdbAgeCheckBox.setVisible(false);
overridePdbAgeCheckBox.setToolTipText("Override PDB age (when searching).");
@ -437,6 +440,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
pdbAgeTextField.setValue(programSymbolFileInfo.getIdentifiers().getAge());
}
});
overridePdbAgeCheckBox.getAccessibleContext().setAccessibleName("Override PDB Age");
DockingWindowManager.getHelpService()
.registerHelp(overridePdbAgeCheckBox, new HelpLocation(
PdbPlugin.PDB_PLUGIN_HELP_TOPIC, SymbolFilePanel.SEARCH_OPTIONS_HELP_ANCHOR));
@ -458,23 +462,26 @@ public class LoadPdbDialog extends DialogComponentProvider {
join(null, new GLabel("PDB Age:", SwingConstants.RIGHT), overridePdbAgeCheckBox));
programPdbPanel.add(join(pdbAgeTextField, new JPanel(), null));
programPdbPanel.getAccessibleContext().setAccessibleName("Program PDB");
return programPdbPanel;
}
private JPanel buildPdbLocationPanel() {
pdbLocationTextField = new HintTextField("Browse [...] for PDB file or use 'Advanced'");
pdbLocationTextField.setEditable(false);
pdbLocationTextField.getAccessibleContext().setAccessibleName("PDB Location");
choosePdbLocationButton = new BrowseButton();
choosePdbLocationButton.addActionListener(e -> choosePdbFile());
choosePdbLocationButton.getAccessibleContext().setAccessibleName("Choose PDB Location");
exactMatchIconLabel = new GIconLabel(Icons.EMPTY_ICON);
exactMatchIconLabel.getAccessibleContext().setAccessibleName("Exact Match");
pdbLocationPanel = new JPanel(new PairLayout(5, 5));
pdbLocationPanel.setBorder(BorderFactory.createTitledBorder("PDB Location"));
pdbLocationPanel.add(new GLabel("PDB Location:", SwingConstants.RIGHT));
pdbLocationPanel
.add(join(exactMatchIconLabel, pdbLocationTextField, choosePdbLocationButton));
pdbLocationPanel.getAccessibleContext().setAccessibleName("PDB Location");
return pdbLocationPanel;
}
@ -513,9 +520,11 @@ public class LoadPdbDialog extends DialogComponentProvider {
universalParserButton = new JRadioButton("Universal");
universalParserButton
.setToolTipText("Platform-independent PDB analyzer (No PDB.XML support).");
universalParserButton.getAccessibleContext().setAccessibleName("Universal");
msdiaParserButton = new JRadioButton("MSDIA");
msdiaParserButton.setToolTipText("<html>Legacy PDB Analyzer.<br>" +
"Requires MS DIA-SDK for raw PDB processing (Windows only), or preprocessed PDB.XML file.");
msdiaParserButton.getAccessibleContext().setAccessibleName("MSDIA");
universalParserButton.setSelected(true);
universalParserButton.addActionListener(l);
msdiaParserButton.addActionListener(l);
@ -527,11 +536,11 @@ public class LoadPdbDialog extends DialogComponentProvider {
JPanel radioButtons = new JPanel(new FlowLayout(FlowLayout.LEFT));
radioButtons.add(universalParserButton);
radioButtons.add(msdiaParserButton);
radioButtons.getAccessibleContext().setAccessibleName("Radio Buttons");
applicatorControlCombo = new GComboBox<>(PdbApplicatorControl.values());
applicatorControlCombo.setToolTipText("Selects which subsets of information to parse.");
applicatorControlCombo.setSelectedItem(PdbApplicatorControl.ALL);
applicatorControlCombo.getAccessibleContext().setAccessibleName("Applicator Controls");
parserOptionsPanel = new JPanel(new PairLayout(5, 5));
parserOptionsPanel.setBorder(BorderFactory.createTitledBorder("PDB Parser"));
DockingWindowManager.getHelpService()
@ -543,7 +552,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
parserOptionsPanel.add(new GLabel("Control:"));
parserOptionsPanel.add(applicatorControlCombo);
parserOptionsPanel.getAccessibleContext().setAccessibleName("Parser Options");
return parserOptionsPanel;
}
@ -551,7 +560,7 @@ public class LoadPdbDialog extends DialogComponentProvider {
loadPdbButton = new JButton("Load");
loadPdbButton.setName("Load");
loadPdbButton.getAccessibleContext().setAccessibleName("Load");
loadPdbButton.addActionListener(e -> {
if (selectedSymbolFile == null || (!selectedSymbolFile
.isExactMatch(programSymbolFileInfo) &&
@ -578,11 +587,14 @@ public class LoadPdbDialog extends DialogComponentProvider {
searchForPdbs(false);
}
});
configButton.getAccessibleContext().setAccessibleName("Configuration");
addButton(configButton);
advancedToggleButton = new JToggleButton("Advanced >>");
advancedToggleButton.addActionListener(e -> toggleAdvancedSearch());
advancedToggleButton.getAccessibleContext().setAccessibleName("Advanced Toggle");
buttonPanel.add(advancedToggleButton);
buttonPanel.getAccessibleContext().setAccessibleName("Button");
}
private void prepareSelectedSymbolFileAndClose(TaskMonitor monitor) {

View file

@ -135,9 +135,11 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
JPanel settingsPanel = new JPanel();
settingsPanel.add(createDiffPanel());
settingsPanel.getAccessibleContext().setAccessibleName("Settings");
panel.add(settingsPanel, BorderLayout.NORTH);
panel.add(createAddressPanel(), BorderLayout.CENTER);
setDiffFilter(diff);
panel.getAccessibleContext().setAccessibleName("Excecute Differences");
return panel;
}
@ -149,6 +151,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
TitledBorder border = new TitledBorder("Do Differences On");
panel.setBorder(border);
panel.add(createDiffFilterPanel());
panel.getAccessibleContext().setAccessibleName("Difference");
return panel;
}
@ -159,12 +162,13 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
addressPanel.add(createLimitPanel(), BorderLayout.NORTH);
addressText = new JTextArea(5, 30);
addressText.setName("AddressTextArea");
addressText.getAccessibleContext().setAccessibleName("Address Text Area");
addressText.setEditable(false);
DockingUtils.setTransparent(addressText);
addressText.setText(getAddressText());
JScrollPane scrolledAddresses = new JScrollPane(addressText);
addressPanel.add(scrolledAddresses, BorderLayout.CENTER);
addressPanel.getAccessibleContext().setAccessibleName("Address");
return addressPanel;
}
@ -184,7 +188,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
});
panel.add(limitToSelectionCB);
panel.getAccessibleContext().setAccessibleName("Limit");
return panel;
}
@ -220,6 +224,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
checkBoxPanel.add(diffSourceMapCB);
JPanel buttonPanel = new JPanel();
buttonPanel.getAccessibleContext().setAccessibleName("Button");
createSelectAllButton();
buttonPanel.add(selectAllButton);
createDeselectAllButton();
@ -228,13 +233,14 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
JPanel panel = new JPanel(new BorderLayout());
panel.add(checkBoxPanel, BorderLayout.CENTER);
panel.add(buttonPanel, BorderLayout.SOUTH);
panel.getAccessibleContext().setAccessibleName("Difference Filter");
return panel;
}
private void createBytesCheckBox() {
diffBytesCB = new GCheckBox("Bytes", diffBytes);
diffBytesCB.setName("BytesDiffCB");
diffBytesCB.getAccessibleContext().setAccessibleName("Byte Differences");
diffBytesCB.setToolTipText("Highlight byte differences.");
diffBytesCB.addItemListener(event -> {
diffBytes = (event.getStateChange() == ItemEvent.SELECTED);
@ -246,6 +252,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createLabelsCheckBox() {
diffLabelsCB = new GCheckBox("Labels", diffLabels);
diffLabelsCB.setName("LabelsDiffCB");
diffLabelsCB.getAccessibleContext().setAccessibleName("Label Differences");
diffLabelsCB.setToolTipText("Highlight label differences.");
diffLabelsCB.addItemListener(event -> {
diffLabels = (event.getStateChange() == ItemEvent.SELECTED);
@ -257,6 +264,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createCodeUnitsCheckBox() {
diffCodeUnitsCB = new GCheckBox("Code Units", diffCodeUnits);
diffCodeUnitsCB.setName("CodeUnitsDiffCB");
diffCodeUnitsCB.getAccessibleContext().setAccessibleName("Code Unit Differences");
diffCodeUnitsCB
.setToolTipText("Highlight the instruction, data, " + "and equate differences.");
diffCodeUnitsCB.addItemListener(event -> {
@ -270,6 +278,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createReferencesCheckBox() {
diffReferencesCB = new GCheckBox("References", diffReferences);
diffReferencesCB.setName("ReferencesDiffCB");
diffReferencesCB.getAccessibleContext().setAccessibleName("Reference Differences");
diffReferencesCB.setToolTipText("Highlight the reference differences.");
diffReferencesCB.addItemListener(event -> {
diffReferences = (event.getStateChange() == ItemEvent.SELECTED);
@ -281,6 +290,8 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createProgramContextCheckBox() {
diffProgramContextCB = new GCheckBox("Program Context", diffProgramContext);
diffProgramContextCB.setName("ProgramContextDiffCB");
diffProgramContextCB.getAccessibleContext()
.setAccessibleName("Program Context Differences");
diffProgramContextCB.setToolTipText("Highlight the program context register differences.");
diffProgramContextCB.addItemListener(event -> {
diffProgramContext = (event.getStateChange() == ItemEvent.SELECTED);
@ -292,6 +303,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createCommentsCheckBox() {
diffCommentsCB = new GCheckBox("Comments", diffComments);
diffCommentsCB.setName("CommentsDiffCB");
diffCommentsCB.getAccessibleContext().setAccessibleName("Comment Differences");
diffCommentsCB.setToolTipText("Highlight comment differences.");
diffCommentsCB.addItemListener(event -> {
diffComments = (event.getStateChange() == ItemEvent.SELECTED);
@ -303,6 +315,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createBookmarksCheckBox() {
diffBookmarksCB = new GCheckBox("Bookmarks", diffBookmarks);
diffBookmarksCB.setName("BookmarksDiffCB");
diffBookmarksCB.getAccessibleContext().setAccessibleName("Bookmark Differences");
diffBookmarksCB.setToolTipText(
"Highlight bookmark differences. " + "(for example, bookmark differences)");
diffBookmarksCB.addItemListener(event -> {
@ -315,6 +328,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createPropertiesCheckBox() {
diffPropertiesCB = new GCheckBox("Properties", diffProperties);
diffPropertiesCB.setName("PropertiesDiffCB");
diffPropertiesCB.getAccessibleContext().setAccessibleName("Property Differences");
diffPropertiesCB.setToolTipText("Highlight user defined property differences. " +
"(for example, Format (space) differences)");
diffPropertiesCB.addItemListener(event -> {
@ -327,6 +341,7 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createFunctionsCheckBox() {
diffFunctionsCB = new GCheckBox("Functions", diffFunctions);
diffFunctionsCB.setName("FunctionsDiffCB");
diffFunctionsCB.getAccessibleContext().setAccessibleName("Function Differences");
diffFunctionsCB.setToolTipText("Highlight function differences.");
diffFunctionsCB.addItemListener(event -> {
diffFunctions = (event.getStateChange() == ItemEvent.SELECTED);
@ -351,11 +366,13 @@ public class ExecuteDiffDialog extends ReusableDialogComponentProvider {
private void createSelectAllButton() {
selectAllButton.addActionListener(e -> setSelectAll(true));
selectAllButton.setMnemonic('S');
selectAllButton.getAccessibleContext().setAccessibleName("Select All");
}
private void createDeselectAllButton() {
deselectAllButton.addActionListener(e -> setSelectAll(false));
deselectAllButton.setMnemonic('D');
deselectAllButton.getAccessibleContext().setAccessibleName("Deselect All");
}
protected void setSelectAll(boolean selected) {

View file

@ -16,15 +16,6 @@
package ghidra.feature.vt.gui.editors;
import static ghidra.feature.vt.gui.editors.TagEditorDialog.TagState.Action.*;
import ghidra.feature.vt.api.db.VTSessionDB;
import ghidra.feature.vt.api.main.VTMatchTag;
import ghidra.feature.vt.api.main.VTSession;
import ghidra.feature.vt.gui.editors.TagEditorDialog.TagState.Action;
import ghidra.framework.model.TransactionInfo;
import ghidra.program.model.listing.Program;
import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.*;
import java.awt.BorderLayout;
import java.awt.event.*;
@ -37,6 +28,15 @@ import javax.swing.event.ListSelectionListener;
import docking.DialogComponentProvider;
import docking.widgets.OptionDialog;
import docking.widgets.list.ListRendererMouseEventForwarder;
import ghidra.feature.vt.api.db.VTSessionDB;
import ghidra.feature.vt.api.main.VTMatchTag;
import ghidra.feature.vt.api.main.VTSession;
import ghidra.feature.vt.gui.editors.TagEditorDialog.TagState.Action;
import ghidra.framework.model.TransactionInfo;
import ghidra.program.model.listing.Program;
import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.*;
public class TagEditorDialog extends DialogComponentProvider {
@ -60,8 +60,10 @@ public class TagEditorDialog extends DialogComponentProvider {
JPanel mainPanel = new JPanel(new BorderLayout());
JScrollPane scrollPane = new JScrollPane();
scrollPane.getAccessibleContext().setAccessibleName("Tag List");
listModel = new TagStateListModel(getTags());
list = new JList<>(listModel);
list.getAccessibleContext().setAccessibleName("Tag");
list.setBackground(scrollPane.getBackground());
list.setCellRenderer(new TagEditorRenderer(list, listModel));
list.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@ -75,6 +77,7 @@ public class TagEditorDialog extends DialogComponentProvider {
mainPanel.add(scrollPane, BorderLayout.CENTER);
JButton addButton = new JButton("Add");
addButton.getAccessibleContext().setAccessibleName("Add");
addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -87,9 +90,8 @@ public class TagEditorDialog extends DialogComponentProvider {
}
private TagState createNewTag() {
String tagName =
OptionDialog.showInputSingleLineDialog(getComponent(), "Create Tag",
"Enter tag name: ", "");
String tagName = OptionDialog.showInputSingleLineDialog(getComponent(),
"Create Tag", "Enter tag name: ", "");
if (tagName == null || "".equals(tagName.trim())) {
return null;
}
@ -98,6 +100,7 @@ public class TagEditorDialog extends DialogComponentProvider {
});
final JButton deleteButton = new JButton("Delete");
deleteButton.getAccessibleContext().setAccessibleName("Delete");
deleteButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -136,12 +139,13 @@ public class TagEditorDialog extends DialogComponentProvider {
});
JPanel editPanel = new JPanel();
editPanel.getAccessibleContext().setAccessibleName("Edit");
editPanel.add(addButton);
editPanel.add(Box.createHorizontalStrut(5));
editPanel.add(deleteButton);
mainPanel.add(editPanel, BorderLayout.SOUTH);
mainPanel.getAccessibleContext().setAccessibleName("Tag Editor");
return mainPanel;
}

View file

@ -49,8 +49,10 @@ public class TagFilterEditorDialog extends DialogComponentProvider implements Ta
JPanel mainPanel = new JPanel(new BorderLayout());
JScrollPane scrollPane = new JScrollPane();
scrollPane.getAccessibleContext().setAccessibleName("Tag List");
listModel = new TagListModel(allTags, excludedTags);
final JList list = new JList(listModel);
list.getAccessibleContext().setAccessibleName("Tag");
list.setBackground(scrollPane.getBackground());
list.setCellRenderer(new TagRenderer());
list.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
@ -75,6 +77,7 @@ public class TagFilterEditorDialog extends DialogComponentProvider implements Ta
mainPanel.add(scrollPane, BorderLayout.CENTER);
JButton editButton = new JButton("Manage Tags");
editButton.getAccessibleContext().setAccessibleName("Edit");
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -92,10 +95,11 @@ public class TagFilterEditorDialog extends DialogComponentProvider implements Ta
});
JPanel editPanel = new JPanel();
editPanel.getAccessibleContext().setAccessibleName("Edit");
editPanel.add(editButton);
mainPanel.add(editPanel, BorderLayout.SOUTH);
mainPanel.getAccessibleContext().setAccessibleName("Tag Filter Editor");
return mainPanel;
}

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,16 @@
*/
package ghidra.feature.vt.gui.provider.markuptable;
import javax.swing.*;
import ghidra.feature.vt.api.main.VTMarkupItem;
import ghidra.feature.vt.gui.filters.AncillaryFilterDialogComponentProvider;
import ghidra.feature.vt.gui.filters.FilterDialogModel;
import ghidra.feature.vt.gui.plugin.VTController;
import ghidra.util.HelpLocation;
import javax.swing.*;
public class MarkupItemFilterDialogComponentProvider extends
AncillaryFilterDialogComponentProvider<VTMarkupItem> {
public class MarkupItemFilterDialogComponentProvider
extends AncillaryFilterDialogComponentProvider<VTMarkupItem> {
MarkupItemFilterDialogComponentProvider(VTController controller,
FilterDialogModel<VTMarkupItem> dialogModel) {
@ -44,18 +43,20 @@ public class MarkupItemFilterDialogComponentProvider extends
// status filter
MarkupStatusFilter statusFilter = new MarkupStatusFilter();
statusFilter.getComponent().getAccessibleContext().setAccessibleName("Status");
addFilter(statusFilter);
rowOnePanel.add(statusFilter.getComponent());
// markup type
MarkupTypeFilter typeFilter = new MarkupTypeFilter();
typeFilter.getComponent().getAccessibleContext().setAccessibleName("Markup");
addFilter(typeFilter);
rowOnePanel.add(typeFilter.getComponent());
// These are currently handled by the text field filter on the provider
// source value
// destination value
rowOnePanel.getAccessibleContext().setAccessibleName("Markup Item Filter");
return rowOnePanel;
}
}

View file

@ -145,16 +145,19 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
private JComponent createComponent() {
markupPanel = new JPanel(new BorderLayout());
markupPanel.getAccessibleContext().setAccessibleName("Markup");
markupItemsTable = createMarkupItemTable();
markupItemsTablePanel = new JPanel(new BorderLayout());
markupItemsTablePanel.getAccessibleContext().setAccessibleName("Markup Item Table");
JPanel filterAreaPanel = createFilterArea();
filterAreaPanel.getAccessibleContext().setAccessibleName("Filter Area");
markupItemsTablePanel.add(tablePanel, BorderLayout.CENTER);
markupItemsTablePanel.add(filterAreaPanel, BorderLayout.SOUTH);
functionComparisonPanel = new FunctionComparisonPanel(tool, getOwner());
addSpecificCodeComparisonActions();
functionComparisonPanel.setCurrentTabbedComponent(ListingCodeComparisonPanel.NAME);
functionComparisonPanel.getAccessibleContext().setAccessibleName("Function Comparison");
functionComparisonPanel.setTitlePrefixes("Source:", "Destination:");
ListingCodeComparisonPanel dualListingPanel = functionComparisonPanel.getDualListingPanel();
if (dualListingPanel != null) {
@ -178,6 +181,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, markupItemsTablePanel,
functionComparisonPanel);
splitPane.setResizeWeight(0.4);
splitPane.getAccessibleContext().setAccessibleName("Markup Items and Function Comparison");
markupPanel.add(splitPane, BorderLayout.CENTER);
markupItemsTable.setAccessibleNamePrefix("Markup Items");
@ -316,10 +320,11 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
// ...account for the scroll bar width
JScrollBar scrollBar = new JScrollBar(Adjustable.VERTICAL);
scrollBar.getAccessibleContext().setAccessibleName("Markup Item Table");
Dimension scrollBarSize = scrollBar.getMinimumSize();
size.width = preferredSize.width + scrollBarSize.width;
table.setPreferredScrollableViewportSize(size);
table.getAccessibleContext().setAccessibleName("Markup Item");
return table;
}
@ -405,9 +410,11 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
JPanel parentPanel = new JPanel(new BorderLayout());
JComponent nameFilterPanel = createTextFilterPanel();
nameFilterPanel.getAccessibleContext().setAccessibleName("Name Filter");
parentPanel.add(nameFilterPanel, BorderLayout.CENTER);
ancillaryFilterButton = new JButton(FILTER_ICON);
ancillaryFilterButton.getAccessibleContext().setAccessibleName("Ancillary");
ancillaryFilterButton
.addActionListener(e -> tool.showDialog(ancillaryFilterDialog, component));
ancillaryFilterButton.setToolTipText("Filters Dialog");
@ -423,7 +430,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
HelpService helpService = DockingWindowManager.getHelpService();
helpService.registerHelp(parentPanel, filterHelpLocation);
helpService.registerHelp(ancillaryFilterButton, filterHelpLocation);
parentPanel.getAccessibleContext().setAccessibleName("Filter Area");
return parentPanel;
}

View file

@ -24,8 +24,8 @@ import ghidra.util.HelpLocation;
import ghidra.util.layout.VariableRowHeightGridLayout;
import ghidra.util.layout.VerticalLayout;
public class MatchesFilterDialogComponentProvider extends
AncillaryFilterDialogComponentProvider<VTMatch> {
public class MatchesFilterDialogComponentProvider
extends AncillaryFilterDialogComponentProvider<VTMatch> {
protected MatchesFilterDialogComponentProvider(VTController controller,
FilterDialogModel<VTMatch> dialogModel) {
@ -60,6 +60,7 @@ public class MatchesFilterDialogComponentProvider extends
AssociationStatusFilter associationStatusFilter = new AssociationStatusFilter();
addFilter(associationStatusFilter);
rowOnePanel.add(associationStatusFilter.getComponent());
rowOnePanel.getAccessibleContext().setAccessibleName("Match Type and Status");
// Row 2 - Left Component
// symbol type filter
@ -72,6 +73,7 @@ public class MatchesFilterDialogComponentProvider extends
AlgorithmFilter algorithmFilter = new AlgorithmFilter();
addFilter(algorithmFilter);
rowTwoPanel.add(algorithmFilter.getComponent());
rowTwoPanel.getAccessibleContext().setAccessibleName("Symbol Type and Algorithm");
//
// row three
@ -79,6 +81,7 @@ public class MatchesFilterDialogComponentProvider extends
// address range filter
MatchAddressRangeFilter addressRangeFilter = new MatchAddressRangeFilter();
addressRangeFilter.getComponent().getAccessibleContext().setAccessibleName("Address Range");
addFilter(addressRangeFilter);
// added below
// addressRangePanel.add( addressRangeFilter.getComponent() );
@ -88,6 +91,7 @@ public class MatchesFilterDialogComponentProvider extends
// row four
//
TagFilter tagFilter = new TagFilter(controller);
tagFilter.getComponent().getAccessibleContext().setAccessibleName("Tag");
addFilter(tagFilter);
// added below
@ -99,7 +103,7 @@ public class MatchesFilterDialogComponentProvider extends
panel.add(rowTwoPanel);
panel.add(addressRangeFilter.getComponent());
panel.add(tagFilter.getComponent());
panel.getAccessibleContext().setAccessibleName("Match Filter");
return panel;
}
}

View file

@ -488,6 +488,7 @@ public class DialogComponentProvider
okButton = new JButton("OK");
okButton.setMnemonic('K');
okButton.setName("OK");
okButton.getAccessibleContext().setAccessibleName("OK");
okButton.addActionListener(e -> okCallback());
addButton(okButton);
}
@ -500,6 +501,7 @@ public class DialogComponentProvider
cancelButton = new JButton("Cancel");
cancelButton.setMnemonic('C');
cancelButton.setName("Cancel");
cancelButton.getAccessibleContext().setAccessibleName("Cancel");
cancelButton.addActionListener(e -> cancelCallback());
addButton(cancelButton);
}
@ -512,6 +514,7 @@ public class DialogComponentProvider
dismissButton = new JButton("Dismiss");
dismissButton.setMnemonic('D');
dismissButton.setName("Dismiss");
dismissButton.getAccessibleContext().setAccessibleName("Dismiss");
dismissButton.addActionListener(e -> dismissCallback());
addButton(dismissButton);
}
@ -524,6 +527,7 @@ public class DialogComponentProvider
applyButton = new JButton("Apply");
applyButton.setMnemonic('A');
applyButton.setName("Apply");
applyButton.getAccessibleContext().setAccessibleName("Apply");
applyButton.addActionListener(e -> applyCallback());
addButton(applyButton);
}

View file

@ -89,6 +89,7 @@ public class DialogComponentProviderPopupActionManager {
// Popup menu if items are available
JPopupMenu popupMenu = menuMgr.getPopupMenu();
popupMenu.getAccessibleContext().setAccessibleName("Popup");
Component c = (Component) e.getSource();
popupMenu.addPopupMenuListener(popupMenuHandler);
popupMenu.show(c, e.getX(), e.getY());

View file

@ -101,14 +101,16 @@ public class MultiActionDialog extends DialogComponentProvider {
labelPanel.add(new GLabel("Multiple actions have been mapped to " + keystrokeName));
labelPanel.add(new GLabel("Actions that can be enabled at the same"));
labelPanel.add(new GLabel("time should be mapped to different keys"));
labelPanel.getAccessibleContext().setAccessibleName("Label");
innerPanel.setBorder(BorderFactory.createTitledBorder("Actions"));
innerPanel.getAccessibleContext().setAccessibleName("Actions");
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
Icon icon = UIManager.getIcon("OptionPane.warningIcon");
panel.add(new GIconLabel(icon));
panel.add(labelPanel);
panel.getAccessibleContext().setAccessibleName("Icon");
listModel = new DefaultListModel<>();
actionList = new JList<>(listModel);
@ -137,12 +139,14 @@ public class MultiActionDialog extends DialogComponentProvider {
actionList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
actionList.setVisibleRowCount(5);
actionList.getAccessibleContext().setAccessibleName("Action");
JScrollPane listScrollPane = new JScrollPane(actionList);
listScrollPane.getAccessibleContext().setAccessibleName("Action List");
innerPanel.add(listScrollPane, BorderLayout.CENTER);
mainPanel.add(panel, BorderLayout.NORTH);
mainPanel.add(innerPanel, BorderLayout.CENTER);
mainPanel.getAccessibleContext().setAccessibleName("Multi Action");
return mainPanel;
}

View file

@ -73,9 +73,11 @@ public class KeyEntryDialog extends DialogComponentProvider {
defaultPanel = new JPanel(new BorderLayout());
defaultPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 5));
defaultPanel.getAccessibleContext().setAccessibleName("Default");
JLabel imageLabel = new GIconLabel(Icons.INFO_ICON);
bgColor = imageLabel.getBackground();
imageLabel.getAccessibleContext().setAccessibleName("Image");
JTextPane pane = new JTextPane();
pane.setBorder(BorderFactory.createEmptyBorder(0, 5, 2, 5));
pane.setBackground(bgColor);
@ -92,6 +94,7 @@ public class KeyEntryDialog extends DialogComponentProvider {
JPanel labelPanel = new JPanel();
labelPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
labelPanel.getAccessibleContext().setAccessibleName("Label");
BoxLayout bl = new BoxLayout(labelPanel, BoxLayout.X_AXIS);
labelPanel.setLayout(bl);
labelPanel.add(Box.createHorizontalStrut(5));
@ -110,6 +113,7 @@ public class KeyEntryDialog extends DialogComponentProvider {
JPanel p = new JPanel(new FlowLayout(FlowLayout.CENTER));
p.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
p.add(keyEntryPanel);
p.getAccessibleContext().setAccessibleName("Key Entry");
KeyStroke keyBinding = action.getKeyBinding();
if (keyBinding != null) {
keyEntryPanel.setKeyStroke(keyBinding);
@ -120,6 +124,7 @@ public class KeyEntryDialog extends DialogComponentProvider {
JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.add(defaultPanel, BorderLayout.NORTH);
mainPanel.add(createCollisionPanel(), BorderLayout.CENTER);
mainPanel.getAccessibleContext().setAccessibleName("Key Entry");
return mainPanel;
}
@ -133,9 +138,11 @@ public class KeyEntryDialog extends DialogComponentProvider {
doc = collisionPane.getStyledDocument();
noWrapPanel.add(collisionPane, BorderLayout.CENTER);
JScrollPane sp = new JScrollPane(noWrapPanel);
sp.getAccessibleContext().setAccessibleName("Scroll");
Dimension d = defaultPanel.getPreferredSize();
sp.setPreferredSize(new Dimension(sp.getPreferredSize().width, d.height));
parent.add(sp, BorderLayout.CENTER);
parent.getAccessibleContext().setAccessibleName("Collision");
return parent;
}

View file

@ -60,6 +60,7 @@ public class AboutDialog extends DialogComponentProvider {
JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.setBorder(BorderFactory.createRaisedBevelBorder());
mainPanel.setBackground(Colors.BACKGROUND);
mainPanel.getAccessibleContext().setAccessibleName("About");
mainPanel.add(createInfoComponent(), BorderLayout.CENTER);
return mainPanel;
}

View file

@ -46,6 +46,7 @@ public class ColorEditor extends PropertyEditorSupport {
previewLabel.setOpaque(true);
previewLabel.setPreferredSize(new Dimension(100, 20));
previewLabel.setHorizontalAlignment(SwingConstants.CENTER);
previewLabel.getAccessibleContext().setAccessibleName("Preview");
previewLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent evt) {
@ -64,6 +65,7 @@ public class ColorEditor extends PropertyEditorSupport {
JPanel dialogPanel = new JPanel();
dialogPanel.setLayout(new BorderLayout());
dialogPanel.add(new ColorEditorPanel(), BorderLayout.CENTER);
dialogPanel.getAccessibleContext().setAccessibleName(parentComponent.getName());
EditorProvider provider = new EditorProvider(dialogPanel);
DockingWindowManager.showDialog(previewLabel, provider);
}

View file

@ -36,6 +36,7 @@ public class FontEditor extends PropertyEditorSupport {
public FontEditor() {
previewButton = new JButton(FontPropertyEditor.SAMPLE_STRING);
previewButton.getAccessibleContext().setAccessibleName("Preview");
previewButton.addActionListener(e -> buttonPushed());
fontPropertyEditor = new FontPropertyEditor();
fontPropertyEditor.addPropertyChangeListener(ev -> fontChanged());
@ -94,6 +95,7 @@ public class FontEditor extends PropertyEditorSupport {
private JComponent buildWorkPanel() {
JPanel panel = new JPanel(new BorderLayout());
panel.add(fontPropertyEditor.getCustomEditor());
panel.getAccessibleContext().setAccessibleName("Font Editor");
return panel;
}

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