diff options
author | Stas Negara <snegara@google.com> | 2015-05-27 16:29:23 -0700 |
---|---|---|
committer | Stas Negara <snegara@google.com> | 2015-05-27 16:31:03 -0700 |
commit | 86c99f1c4cdb4c4478e649610cc3e9ce93cb0e2a (patch) | |
tree | 18a5d15d28cad02355e5b4962c8d9f8e2ce5fa75 | |
parent | c2094cfa0fa74a8606bacad54a26142de09acae1 (diff) | |
download | testing-86c99f1c4cdb4c4478e649610cc3e9ce93cb0e2a.tar.gz |
Fixed radio configs indentation, spacing, and coloring.
Change-Id: I0e27f2412e817fdbf821f2d7b9b64829caaf9191
-rw-r--r-- | src/com/google/gct/testing/TwoPanelTree.java | 13 |
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) { |