IDEA-91261 Code Style | Arrangement: grayed out modifiers are available for selection

This commit is contained in:
Denis.Zhdanov
2012-09-12 10:50:36 +04:00
parent 41c95e2941
commit 3423dce4ee
2 changed files with 5 additions and 1 deletions
@@ -196,6 +196,10 @@ public class ArrangementAtomNodeComponent implements ArrangementNodeComponent {
myBackgroundColor = myColorsService.getBackgroundColor(selected);
}
public boolean isEnabled() {
return myEnabled;
}
/**
* Instructs current component that it should {@link #getUiComponent() draw} itself according to the given 'enabled' state.
*
@@ -136,7 +136,7 @@ public class ArrangementRuleEditor extends JPanel {
return;
}
ArrangementAtomNodeComponent clickedComponent = getNodeComponentAt(e.getLocationOnScreen());
if (clickedComponent == null) {
if (clickedComponent == null || !clickedComponent.isEnabled()) {
return;
}
ArrangementAtomMatchCondition chosenCondition = clickedComponent.getMatchCondition();