From c018c3bac553e3986678850a038cf8052bca822f Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Tue, 9 Apr 2019 09:52:09 -0400 Subject: [PATCH] GT-2735 - Function Graph - show selection color when nodes are zoomed out --- .../FGVertexPickableBackgroundPaintTransformer.java | 10 ++++++++++ .../graph/vertex/AbstractFunctionGraphVertex.java | 5 +++++ .../graph/vertex/AbstractGraphComponentPanel.java | 2 ++ .../core/functiongraph/graph/vertex/FGVertex.java | 4 ++++ .../vertex/GroupedFunctionGraphComponentPanel.java | 8 ++++++++ .../graph/vertex/ListingGraphComponentPanel.java | 5 +++++ 6 files changed, 34 insertions(+) diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/jung/transformer/FGVertexPickableBackgroundPaintTransformer.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/jung/transformer/FGVertexPickableBackgroundPaintTransformer.java index e705b3d53f..05717b396b 100644 --- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/jung/transformer/FGVertexPickableBackgroundPaintTransformer.java +++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/jung/transformer/FGVertexPickableBackgroundPaintTransformer.java @@ -23,6 +23,7 @@ import com.google.common.base.Function; import edu.uci.ics.jung.visualization.picking.PickedInfo; import ghidra.app.plugin.core.functiongraph.graph.FGVertexType; import ghidra.app.plugin.core.functiongraph.graph.vertex.FGVertex; +import ghidra.program.util.ProgramSelection; public class FGVertexPickableBackgroundPaintTransformer implements Function { @@ -55,6 +56,15 @@ public class FGVertexPickableBackgroundPaintTransformer implements Function vertices = groupVertex.getVertices(); + FGVertex v = CollectionUtils.any(vertices); + return v.getSelectionColor(); + } + @Override JComponent getHeader() { return genericHeader; diff --git a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/ListingGraphComponentPanel.java b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/ListingGraphComponentPanel.java index dbcb8cf0e4..28c6b2d5e9 100644 --- a/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/ListingGraphComponentPanel.java +++ b/Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/vertex/ListingGraphComponentPanel.java @@ -261,6 +261,11 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel { return listingPanel.getTextBackgroundColor(); } + @Override + Color getSelectionColor() { + return fieldPanel.getSelectionColor(); + } + private void createActions() { String firstGroup = "group1"; String secondGroup = "group2";