mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-26 16:45:41 +08:00
Merge remote-tracking branch 'origin/GP-6386_Dan_regValEditorFixedWidth'
(Closes #8508)
This commit is contained in:
+13
-2
@@ -142,8 +142,8 @@ public class DebuggerRegistersProvider extends ComponentProviderAdapter
|
||||
|
||||
protected static final RegisterValueCellRenderer VALUE_RENDERER =
|
||||
new RegisterValueCellRenderer();
|
||||
protected static final HexBigIntegerTableCellEditor VALUE_EDITOR =
|
||||
new HexBigIntegerTableCellEditor();
|
||||
protected static final RegisterValueCellEditor VALUE_EDITOR =
|
||||
new RegisterValueCellEditor();
|
||||
protected static final SettingsDefinition[] VALUE_DEFS =
|
||||
new SettingsDefinition[] { FormatSettingsDefinition.DEF_HEX, };
|
||||
protected static final RegisterDataTypeEditor TYPE_EDITOR = new RegisterDataTypeEditor();
|
||||
@@ -465,6 +465,17 @@ public class DebuggerRegistersProvider extends ComponentProviderAdapter
|
||||
}
|
||||
}
|
||||
|
||||
static class RegisterValueCellEditor extends HexBigIntegerTableCellEditor {
|
||||
@Override
|
||||
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
|
||||
int row, int column) {
|
||||
super.getTableCellEditorComponent(table, value, isSelected, row, column);
|
||||
JComponent component = input.getComponent();
|
||||
component.setFont(VALUE_RENDERER.getFixedWidthFont());
|
||||
return component;
|
||||
}
|
||||
}
|
||||
|
||||
static class RegisterDataTypeEditor extends AbstractDataTypeTableCellEditor {
|
||||
@Override
|
||||
protected AllowedDataTypes getAllowed(int row, int column) {
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -26,7 +26,7 @@ import javax.swing.table.TableCellEditor;
|
||||
import docking.widgets.textfield.IntegerTextField;
|
||||
|
||||
public class HexBigIntegerTableCellEditor extends AbstractCellEditor implements TableCellEditor {
|
||||
private IntegerTextField input;
|
||||
protected IntegerTextField input;
|
||||
|
||||
@Override
|
||||
public BigInteger getCellEditorValue() {
|
||||
|
||||
Reference in New Issue
Block a user