Merge remote-tracking branch 'origin/GP-4275_naming_components_for_accessibility--SQUASHED'

This commit is contained in:
Ryan Kurtz 2024-03-12 13:36:43 -04:00
commit c8c4c43794
62 changed files with 565 additions and 202 deletions

View file

@ -446,7 +446,6 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
new VTFunctionAssociationTableModel(tool, controller, sourceProgram, true);
sourceThreadedTablePanel = new GhidraThreadedTablePanel<>(sourceFunctionsModel, 1000);
sourceFunctionsTable = sourceThreadedTablePanel.getTable();
sourceFunctionsTable.setName("SourceFunctionTable");
sourceFunctionsTable
.setPreferenceKey("VTFunctionAssociationTableModel - Source Function Table");
sourceFunctionsTable.installNavigation(tool);
@ -474,7 +473,6 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
sourceTableFilterPanel =
new GhidraTableFilterPanel<>(sourceFunctionsTable, sourceFunctionsModel);
JPanel sourceFunctionPanel = new JPanel(new BorderLayout());
String sourceString =
(sourceProgram != null) ? sourceProgram.getDomainFile().toString() : NO_SESSION;
@ -484,6 +482,11 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
sourceFunctionPanel.add(sourceSessionLabel, BorderLayout.NORTH);
sourceFunctionPanel.add(sourceThreadedTablePanel, BorderLayout.CENTER);
sourceFunctionPanel.add(sourceTableFilterPanel, BorderLayout.SOUTH);
String namePrefix = "Source Functions";
sourceFunctionsTable.setAccessibleNamePrefix(namePrefix);
sourceTableFilterPanel.setAccessibleNamePrefix(namePrefix);
return sourceFunctionPanel;
}
@ -495,7 +498,6 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
destinationThreadedTablePanel =
new GhidraThreadedTablePanel<>(destinationFunctionsModel, 1000);
destinationFunctionsTable = destinationThreadedTablePanel.getTable();
destinationFunctionsTable.setName("DestinationFunctionTable");
destinationFunctionsTable.setPreferenceKey(
"VTFunctionAssociationTableModel - " + "Destination Function Table");
destinationFunctionsTable.installNavigation(tool);
@ -526,7 +528,6 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
destinationTableFilterPanel =
new GhidraTableFilterPanel<>(destinationFunctionsTable, destinationFunctionsModel);
JPanel destinationFunctionPanel = new JPanel(new BorderLayout());
String destinationString =
(destinationProgram != null) ? destinationProgram.getDomainFile().toString()
@ -537,6 +538,11 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
destinationFunctionPanel.add(destinationSessionLabel, BorderLayout.NORTH);
destinationFunctionPanel.add(destinationThreadedTablePanel, BorderLayout.CENTER);
destinationFunctionPanel.add(destinationTableFilterPanel, BorderLayout.SOUTH);
String namePrefix = "Destination Functions";
destinationFunctionsTable.setAccessibleNamePrefix(namePrefix);
destinationTableFilterPanel.setAccessibleNamePrefix(namePrefix);
return destinationFunctionPanel;
}

View file

@ -90,6 +90,11 @@ public class VTImpliedMatchesTableProvider extends ComponentProviderAdapter
filterPanel = new GhidraTableFilterPanel<>(impliedMatchesTable, impliedMatchTableModel);
panel.add(tablePanel, BorderLayout.CENTER);
panel.add(filterPanel, BorderLayout.SOUTH);
String namePrefix = "Implied Matches";
impliedMatchesTable.setAccessibleNamePrefix(namePrefix);
filterPanel.setAccessibleNamePrefix(namePrefix);
return panel;
}
@ -250,7 +255,6 @@ public class VTImpliedMatchesTableProvider extends ComponentProviderAdapter
new GhidraThreadedTablePanel<>(impliedMatchTableModel);
impliedMatchesTable = impliedMatchTablePanel.getTable();
impliedSelectionListener = e -> {
if (e.getValueIsAdjusting()) {
return;

View file

@ -175,6 +175,9 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
functionComparisonPanel);
splitPane.setResizeWeight(0.4);
markupPanel.add(splitPane, BorderLayout.CENTER);
markupItemsTable.setAccessibleNamePrefix("Markup Items");
return markupPanel;
}
@ -405,6 +408,10 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
.addActionListener(e -> tool.showDialog(ancillaryFilterDialog, component));
ancillaryFilterButton.setToolTipText("Filters Dialog");
String buttonNamePrefix = "Markup Items Table Filter";
ancillaryFilterButton.setName(buttonNamePrefix + " Button");
ancillaryFilterButton.getAccessibleContext().setAccessibleName(buttonNamePrefix);
parentPanel.add(ancillaryFilterButton, BorderLayout.EAST);
HelpLocation filterHelpLocation =

View file

@ -98,7 +98,6 @@ public class VTMatchTableProvider extends ComponentProviderAdapter
setIcon(VersionTrackingPluginPackage.ICON);
setDefaultWindowPosition(WindowPosition.TOP);
createActions();
component = createComponent();
setVisible(true);
@ -219,14 +218,14 @@ public class VTMatchTableProvider extends ComponentProviderAdapter
matchesTable = createMatchesTable();
JPanel matchesTablePanel = new JPanel(new BorderLayout());
JPanel filterAreaPanel = createFilterArea();
matchesTablePanel.add(tablePanel, BorderLayout.CENTER);
matchesTablePanel.add(filterAreaPanel, BorderLayout.SOUTH);
JPanel parentPanel = new JPanel(new BorderLayout());
parentPanel.add(matchesTablePanel);
matchesTable.setAccessibleNamePrefix("Matches");
return parentPanel;
}

View file

@ -71,6 +71,7 @@ public abstract class AbstractTextFilter<T> extends Filter<T> {
textField.disableFocusEventProcessing();
JLabel label = new GDLabel(filterName + ": ");
label.setLabelFor(textField);
panel.add(label, BorderLayout.WEST);
panel.add(textField, BorderLayout.CENTER);