use of com.intellij.ui.CheckedTreeNode in project intellij-community by JetBrains.
the class BreakpointsFavoriteListProvider method updateChildren.
private void updateChildren() {
if (myProject.isDisposed())
return;
myChildren.clear();
List<BreakpointItem> items = new ArrayList<>();
for (final BreakpointPanelProvider provider : myBreakpointPanelProviders) {
provider.provideBreakpointItems(myProject, items);
}
getEnabledGroupingRules(myRulesEnabled);
myTreeController.setGroupingRules(myRulesEnabled);
myTreeController.rebuildTree(items);
CheckedTreeNode root = myTreeController.getRoot();
for (int i = 0; i < root.getChildCount(); i++) {
TreeNode child = root.getChildAt(i);
if (child instanceof DefaultMutableTreeNode) {
replicate((DefaultMutableTreeNode) child, myNode, myChildren);
}
}
myFavoritesManager.fireListeners(getListName(myProject));
}
use of com.intellij.ui.CheckedTreeNode in project intellij-plugins by JetBrains.
the class FlexBCTree method setChildrenCheckedRecursively.
private static void setChildrenCheckedRecursively(final CheckedTreeNode node, final boolean checked) {
final Enumeration children = node.children();
while (children.hasMoreElements()) {
final CheckedTreeNode childNode = (CheckedTreeNode) children.nextElement();
childNode.setChecked(checked);
setChildrenCheckedRecursively(childNode, checked);
}
}
use of com.intellij.ui.CheckedTreeNode in project intellij-plugins by JetBrains.
the class FlexBCTree method selectRow.
public void selectRow(final Module module, final FlexBuildConfiguration bc) {
clearSelection();
final CheckedTreeNode node = getBCNode(module.getName(), bc.getName());
if (node != null) {
TreeUtil.selectInTree(node, true, this);
}
}
use of com.intellij.ui.CheckedTreeNode in project intellij-plugins by JetBrains.
the class FlexBCTree method createRenderer.
private static CheckboxTreeCellRenderer createRenderer() {
return new CheckboxTree.CheckboxTreeCellRenderer() {
public void customizeRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
if (!(value instanceof CheckedTreeNode))
return;
final CheckedTreeNode node = (CheckedTreeNode) value;
final Object userObject = node.getUserObject();
if (userObject instanceof Project) {
getTextRenderer().append(((Project) userObject).getName());
} else if (userObject instanceof Module) {
getTextRenderer().setIcon(ModuleType.get((Module) userObject).getIcon());
getTextRenderer().append(((Module) userObject).getName());
} else if (userObject instanceof FlexBuildConfiguration) {
BCUtils.renderBuildConfiguration((FlexBuildConfiguration) userObject, null, false).appendToComponent(getTextRenderer());
getTextRenderer().setIcon(((FlexBuildConfiguration) userObject).getIcon());
}
}
};
}
use of com.intellij.ui.CheckedTreeNode in project intellij-plugins by JetBrains.
the class FlexBCTree method setCheckedStatusForAll.
public void setCheckedStatusForAll(final boolean checked) {
final CheckedTreeNode node = (CheckedTreeNode) getModel().getRoot();
node.setChecked(checked);
setChildrenCheckedRecursively(node, checked);
}
Aggregations