use of net.sourceforge.processdash.hier.ui.SelectableHierarchyTree in project processdash by dtuma.
the class EditExportMetricsFilePanel method buildMainPanelContents.
protected void buildMainPanelContents() {
String chooseFilePrompt = getString("Choose_File");
add(indentedComponent(2, new WrappingText(chooseFilePrompt)));
add(verticalSpace(1));
file = new FileChooser();
file.getDocument().addDocumentListener((DocumentListener) EventHandler.create(DocumentListener.class, this, "updateInstruction"));
add(indentedComponent(4, file));
add(verticalSpace(2));
String choosePathsPrompt = getString("Choose_Paths");
add(indentedComponent(2, new WrappingText(choosePathsPrompt)));
add(verticalSpace(1));
ProcessDashboard dashboard = ExportManager.getInstance().getProcessDashboard();
paths = new SelectableHierarchyTree(dashboard.getHierarchy(), instr.getPaths());
paths.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting())
updateInstruction();
}
});
JScrollPane scrollPane = new JScrollPane(paths);
scrollPane.setPreferredSize(new Dimension(999, 300));
add(indentedComponent(4, scrollPane));
if (fromManagePanel == false) {
add(verticalSpace(2));
String makeAutomaticPrompt = getString("Make_Automatic");
add(indentedComponent(2, new WrappingText(makeAutomaticPrompt)));
makeAutomatic = new ButtonGroup();
Box autoButtonBox = Box.createHorizontalBox();
autoButtonBox.add(createAutomaticButton("Yes"));
autoButtonBox.add(createAutomaticButton("No"));
add(indentedComponent(4, autoButtonBox));
}
add(verticalSpace(4));
error = new WrappingText("X");
error.setMinimumSize(error.getPreferredSize());
error.setText("");
error.setForeground(Color.red);
add(error);
}
Aggregations