use of org.gradle.gradleplugin.userinterface.swing.generic.TaskTreeComponent in project gradle by gradle.
the class TaskTreeTab method createTreePanel.
private Component createTreePanel() {
treeComponent = new TaskTreeComponent(gradlePluginLord, new TaskTreeComponent.Interaction() {
public void rightClick(JTree tree, int x, int y) {
enableThingsAppropriately();
popupMenu.show(tree, x, y);
}
public void taskInvoked(TaskView task, boolean isCtrlKeyDown) {
if (isCtrlKeyDown) {
gradlePluginLord.addExecutionRequestToQueue(task, false, "-a");
} else {
gradlePluginLord.addExecutionRequestToQueue(task, false);
}
}
public void projectInvoked(ProjectView project) {
executeDefaultTasksInProject(project);
}
});
treeComponent.getTree().addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
enableThingsAppropriately();
}
});
defaultTreeBackground = treeComponent.getTree().getBackground();
treeScrollPane = new JScrollPane();
//change the color to better indicate that
treeComponent.getTree().setBackground(workingBackgroundColor);
showTextInViewport("Has not built projects/tasks yet.");
return treeScrollPane;
}
Aggregations