From 85e50a1399c0e675eca1d8c6edbfce2154276d93 Mon Sep 17 00:00:00 2001 From: saruman9 Date: Tue, 21 Jan 2020 17:45:09 +0300 Subject: [PATCH] [byte_viewer] Set settings for highlighting in the ByteViewerComponent Fix #1464 --- .../ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java index ec117f3885..9aa71fe4c7 100644 --- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java +++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java @@ -73,6 +73,8 @@ public class ByteViewerPanel extends JPanel implements TableColumnModelListener, private Color currentCursorColor; private Color cursorColor; private Color currentCursorLineColor; + private Color highlightColor; + private int highlightButton; private List layoutListeners = new ArrayList<>(1); private int indexPanelWidth; private boolean addingView; // don't respond to cursor location @@ -195,6 +197,7 @@ public class ByteViewerPanel extends JPanel implements TableColumnModelListener, } void setHighlightButton(int highlightButton) { + this.highlightButton = highlightButton; for (int i = 0; i < viewList.size(); i++) { ByteViewerComponent comp = viewList.get(i); comp.setHighlightButton(highlightButton); @@ -202,6 +205,7 @@ public class ByteViewerPanel extends JPanel implements TableColumnModelListener, } void setMouseButtonHighlightColor(Color color) { + this.highlightColor = color; for (int i = 0; i < viewList.size(); i++) { ByteViewerComponent comp = viewList.get(i); comp.setMouseButtonHighlightColor(color); @@ -404,6 +408,8 @@ public class ByteViewerPanel extends JPanel implements TableColumnModelListener, c.setCurrentCursorLineColor(currentCursorLineColor); c.setEditMode(editMode); c.setIndexMap(indexMap); + c.setMouseButtonHighlightColor(highlightColor); + c.setHighlightButton(highlightButton); viewList.add(c); c.setSize(c.getPreferredSize()); compPanel.addByteViewerComponent(c);