mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-19 16:40:38 -09:00
GP-2846 - Theming Documentation
This commit is contained in:
@@ -21,7 +21,7 @@ import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
import docking.widgets.label.GDLabel;
|
||||
import generic.theme.GThemeDefaults;
|
||||
import generic.theme.GThemeDefaults.Ids.Fonts;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.feature.fid.db.*;
|
||||
import ghidra.feature.fid.service.FidService;
|
||||
@@ -38,6 +38,7 @@ public class FidFunctionDebugPanel extends JPanel {
|
||||
/**
|
||||
* Creates the panel.
|
||||
* @param service the FID database service
|
||||
* @param fidQueryService the query service
|
||||
* @param functionRecord the function record to debug
|
||||
*/
|
||||
public FidFunctionDebugPanel(FidService service, FidQueryService fidQueryService,
|
||||
@@ -57,7 +58,7 @@ public class FidFunctionDebugPanel extends JPanel {
|
||||
JButton button = new JButton(text);
|
||||
button.addActionListener(listener);
|
||||
button.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
Gui.registerFont(button, GThemeDefaults.Ids.Fonts.MONOSPACED);
|
||||
Gui.registerFont(button, Fonts.MONOSPACED);
|
||||
add(button);
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ public class FidFunctionDebugPanel extends JPanel {
|
||||
private void addLabel(String text) {
|
||||
JLabel label = new GDLabel(text);
|
||||
label.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
label.setFont(Gui.getFont("font.monospaced"));
|
||||
Gui.registerFont(label, Fonts.MONOSPACED);
|
||||
add(label);
|
||||
}
|
||||
|
||||
@@ -85,16 +86,14 @@ public class FidFunctionDebugPanel extends JPanel {
|
||||
libraryRecord.getLibraryVersion(), libraryRecord.getLibraryVariant(),
|
||||
languageID.getIdAsString()));
|
||||
|
||||
addButton(String.format("0x%016x", functionRecord.getID()),
|
||||
e -> FidDebugUtils.searchByFunctionID(functionRecord.getID(), service,
|
||||
fidQueryService));
|
||||
addButton(String.format("0x%016x", functionRecord.getID()), e -> FidDebugUtils
|
||||
.searchByFunctionID(functionRecord.getID(), service, fidQueryService));
|
||||
|
||||
addButton(functionRecord.getName(),
|
||||
e -> FidDebugUtils.searchByName(functionRecord.getName(), service, fidQueryService));
|
||||
|
||||
addButton(shorten(functionRecord.getDomainPath()),
|
||||
e -> FidDebugUtils.searchByDomainPath(functionRecord.getDomainPath(), service,
|
||||
fidQueryService));
|
||||
addButton(shorten(functionRecord.getDomainPath()), e -> FidDebugUtils
|
||||
.searchByDomainPath(functionRecord.getDomainPath(), service, fidQueryService));
|
||||
|
||||
addLabel(String.format("Entry Point: 0x%x", functionRecord.getEntryPoint()));
|
||||
|
||||
|
||||
@@ -77,13 +77,13 @@ public class FidSearchDebugDialog extends DialogComponentProvider {
|
||||
|
||||
private JLabel getPreparedLabel(String text) {
|
||||
JLabel label = new GDLabel(text, SwingConstants.RIGHT);
|
||||
label.setFont(Gui.getFont(Fonts.MONOSPACED));
|
||||
Gui.registerFont(label, Fonts.MONOSPACED);
|
||||
return label;
|
||||
}
|
||||
|
||||
private JTextField getPreparedTextField() {
|
||||
JTextField textField = new JTextField(25);
|
||||
textField.setFont(Gui.getFont(Fonts.MONOSPACED));
|
||||
Gui.registerFont(textField, Fonts.MONOSPACED);
|
||||
return textField;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ import javax.swing.table.TableColumn;
|
||||
import javax.swing.table.TableColumnModel;
|
||||
|
||||
import docking.widgets.table.*;
|
||||
import generic.theme.GThemeDefaults.Ids.Fonts;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.feature.fid.db.*;
|
||||
import ghidra.feature.fid.service.FidService;
|
||||
import ghidra.util.Msg;
|
||||
@@ -66,7 +64,7 @@ public class FidSearchResultFrame extends JFrame implements FidQueryCloseListene
|
||||
|
||||
private void buildFrame() {
|
||||
GTableCellRenderer renderer = new GTableCellRenderer();
|
||||
renderer.setFont(Gui.getFont(Fonts.MONOSPACED));
|
||||
renderer.setFont(renderer.getFixedWidthFont());
|
||||
int columnCount = table.getColumnCount();
|
||||
for (int ii = 0; ii < columnCount; ++ii) {
|
||||
Class<?> columnClass = table.getColumnClass(ii);
|
||||
|
||||
Reference in New Issue
Block a user