mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GT-2698 refactor UI elements to lock down HTML rendering
This commit is contained in:
parent
a03c96d37b
commit
e0c25b0590
360 changed files with 3895 additions and 4563 deletions
|
@ -24,6 +24,7 @@ import javax.swing.*;
|
|||
|
||||
import com.google.common.base.Function;
|
||||
|
||||
import docking.DockingUtils;
|
||||
import docking.DockingWindowManager;
|
||||
import docking.ToolTipManager;
|
||||
import docking.help.HelpService;
|
||||
|
@ -417,7 +418,7 @@ public class GraphComponent<V extends VisualVertex, E extends VisualEdge<V>, G e
|
|||
String tooltip = "Bring satellite view to the front";
|
||||
|
||||
Icon icon = ResourceManager.loadImage("images/network-wireless.png");
|
||||
JLabel iconLabel = new JLabel(icon);
|
||||
JLabel iconLabel = DockingUtils.createNonHtmlLabel(icon);
|
||||
iconLabel.setOpaque(false);
|
||||
iconLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
iconLabel.setToolTipText(tooltip);
|
||||
|
@ -457,7 +458,7 @@ public class GraphComponent<V extends VisualVertex, E extends VisualEdge<V>, G e
|
|||
"options to have the graph update automatically.";
|
||||
|
||||
Icon icon = Icons.REFRESH_ICON;
|
||||
JLabel iconLabel = new JLabel(icon);
|
||||
JLabel iconLabel = DockingUtils.createNonHtmlLabel(icon);
|
||||
iconLabel.setOpaque(false);
|
||||
iconLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
iconLabel.setToolTipText(tooltip);
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.function.Supplier;
|
|||
|
||||
import javax.swing.*;
|
||||
|
||||
import docking.DockingUtils;
|
||||
import edu.uci.ics.jung.visualization.RenderContext;
|
||||
import edu.uci.ics.jung.visualization.VisualizationViewer;
|
||||
import edu.uci.ics.jung.visualization.control.ScalingControl;
|
||||
|
@ -341,7 +342,7 @@ public class VisualGraphView<V extends VisualVertex,
|
|||
|
||||
viewContentPanel.removeAll();
|
||||
viewContentPanel.paintImmediately(viewContentPanel.getBounds());
|
||||
JLabel messageLabel = new JLabel(errorMessage);
|
||||
JLabel messageLabel = DockingUtils.createNonHtmlLabel(errorMessage);
|
||||
Font font = messageLabel.getFont();
|
||||
messageLabel.setFont(font.deriveFont(22f)); // make a bit bigger for readability
|
||||
messageLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
|
|
|
@ -20,12 +20,14 @@ import java.awt.Dimension;
|
|||
|
||||
import javax.swing.*;
|
||||
|
||||
import docking.DockingUtils;
|
||||
|
||||
/**
|
||||
* A test vertex that renders using a {@link JLabel}.
|
||||
*/
|
||||
public class LabelTestVertex extends AbstractTestVertex {
|
||||
|
||||
private JLabel label = new JLabel();
|
||||
private JLabel label = DockingUtils.createNonHtmlLabel();
|
||||
|
||||
public LabelTestVertex(String name) {
|
||||
super(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue