mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 14:57:09 +08:00
GP-5327 - Fixed sizing issues with the data type and category editors
This commit is contained in:
+18
-1
@@ -19,6 +19,9 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.swing.JRadioButton;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.table.TableColumn;
|
||||
import javax.swing.table.TableColumnModel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -66,7 +69,21 @@ public class DataPluginScreenShots extends GhidraScreenShotGenerator {
|
||||
GhidraTable table = (GhidraTable) getInstanceField("matchingStructuresTable", dialog);
|
||||
selectRow(table, 2);
|
||||
|
||||
captureDialog(500, 400);
|
||||
shrinkCategoryColumn(table);
|
||||
|
||||
captureDialog(600, 500);
|
||||
}
|
||||
|
||||
private void shrinkCategoryColumn(JTable table) {
|
||||
|
||||
runSwing(() -> {
|
||||
TableColumnModel columnModel = table.getColumnModel();
|
||||
int columnIndex = columnModel.getColumnIndex("Category");
|
||||
TableColumn column = columnModel.getColumn(columnIndex);
|
||||
int size = 150;
|
||||
column.setPreferredWidth(size);
|
||||
column.setMaxWidth(size);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user