GP-6386: Reg value editor should used fixed-width.

This commit is contained in:
Dan
2026-03-11 17:26:22 +00:00
parent ab12df43f0
commit 9633a6132c
2 changed files with 16 additions and 5 deletions
@@ -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) {
@@ -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() {