summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/google/gct/testing/TwoPanelTree.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/google/gct/testing/TwoPanelTree.java b/src/com/google/gct/testing/TwoPanelTree.java
index 1f2966b..97c4a98 100644
--- a/src/com/google/gct/testing/TwoPanelTree.java
+++ b/src/com/google/gct/testing/TwoPanelTree.java
@@ -534,8 +534,9 @@ public class TwoPanelTree extends MouseAdapter implements ListSelectionListener,
CheckedTreeNode node = (CheckedTreeNode)value;
NodeState state = getNodeStatus(node);
- myRadioButton.setVisible(leaf);
+ myRadioButton.setVisible(true);
+ myRadioButton.setMargin(new Insets(-5, -3, -5, -5));
myRadioButton.setSelected(state != NodeState.CLEAR);
myRadioButton.setEnabled(node.isEnabled() && state != NodeState.PARTIAL);
myRadioButton.setOpaque(false);
@@ -555,6 +556,16 @@ public class TwoPanelTree extends MouseAdapter implements ListSelectionListener,
UIUtil.changeBackGround(this, UIUtil.TRANSPARENT_COLOR);
}
+ if (!leaf) {
+ // Disable group radio buttons.
+ myRadioButton.setEnabled(false);
+ }
+
+ if (!myRadioButton.isEnabled() && UIUtil.isUnderDarcula()) {
+ // Show visually that radio buttons are disabled (should be done explicitly in Darcula mode).
+ myRadioButton.setBackground(CloudTestingUtils.makeDarker(Color.LIGHT_GRAY, 7));
+ }
+
revalidate();
if (value instanceof DefaultMutableTreeNode) {