mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-4555 set accessible names for components
This commit is contained in:
parent
136a944796
commit
6121818cd3
150 changed files with 1054 additions and 346 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,9 +168,9 @@ 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 " +
|
||||
"bytes and sends them to the clipboard");
|
||||
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"));
|
||||
this.addAction(sendSelectedToClipboardAction);
|
||||
|
@ -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"));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue