diff --git a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/FigureWidget.java b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/FigureWidget.java index 61c38f3e139a2..dfe6781116152 100644 --- a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/FigureWidget.java +++ b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/FigureWidget.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -164,8 +164,10 @@ protected void notifyStateChanged(ObjectState previousState, ObjectState state) super.notifyStateChanged(previousState, state); Font font = this.figure.getDiagram().getFont(); + int thickness = 1; if (state.isSelected()) { font = this.figure.getDiagram().getBoldFont(); + thickness = 2; } Color borderColor = Color.BLACK; @@ -174,7 +176,7 @@ protected void notifyStateChanged(ObjectState previousState, ObjectState state) innerBorderColor = borderColor = Color.BLUE; } - middleWidget.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(borderColor, 1), BorderFactory.createLineBorder(innerBorderColor, 1))); + middleWidget.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(borderColor, thickness), BorderFactory.createLineBorder(innerBorderColor, 1))); for (LabelWidget labelWidget : labelWidgets) { labelWidget.setFont(font); } diff --git a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/SlotWidget.java b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/SlotWidget.java index 601e2bfed1e53..9e02d9b5c0fcd 100644 --- a/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/SlotWidget.java +++ b/src/utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view/widgets/SlotWidget.java @@ -28,6 +28,7 @@ import com.sun.hotspot.igv.graph.Slot; import com.sun.hotspot.igv.util.DoubleClickHandler; import com.sun.hotspot.igv.view.DiagramScene; +import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; @@ -103,6 +104,9 @@ protected void paintWidget() { Font font = this.getSlot().getFigure().getDiagram().getSlotFont(); if (this.getState().isSelected()) { font = font.deriveFont(Font.BOLD); + g.setStroke(new BasicStroke(1.5f)); + } else { + g.setStroke(new BasicStroke(1f)); } if (getSlot().getShortName() != null && getSlot().getShortName().length() > 0) {