use of net.sourceforge.processdash.ui.lib.WrappingText in project processdash by dtuma.
the class EditImportDirectoryPanel method buildMainPanelContents.
protected void buildMainPanelContents() {
DocumentListener listener = (DocumentListener) EventHandler.create(DocumentListener.class, this, "updateInstruction");
if (instr.isUrlOnly()) {
String chooseUrlPrompt = getString("Choose_URL");
add(indentedComponent(2, new WrappingText(chooseUrlPrompt)));
add(verticalSpace(1));
url = new JTextField(instr.getURL());
url.getDocument().addDocumentListener(listener);
add(indentedComponent(4, url));
} else {
String chooseDirectoryPrompt = getString("Choose_Directory");
add(indentedComponent(2, new WrappingText(chooseDirectoryPrompt)));
add(verticalSpace(1));
directory = new DirectoryChooser();
directory.getDocument().addDocumentListener(listener);
add(indentedComponent(4, directory));
}
add(verticalSpace(2));
String choosePrefixPrompt = getString("Choose_Prefix");
add(indentedComponent(2, new WrappingText(choosePrefixPrompt)));
add(verticalSpace(1));
prefix = new JTextField(instr.getPrefix());
prefix.getDocument().addDocumentListener(listener);
add(indentedComponent(4, prefix));
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("");
error.setForeground(Color.red);
add(error);
}
use of net.sourceforge.processdash.ui.lib.WrappingText in project processdash by dtuma.
the class ChoicePanel method buildMainPanelContents.
protected void buildMainPanelContents() {
ButtonGroup buttonGroup = new ButtonGroup();
for (int i = 0; i < choices.length; i++) {
add(verticalSpace(2));
String choice = choices[i];
String title = getRelativeString("Choices." + choice + ".Title");
String description = getOptionalRelativeString("Choices." + choice + ".Description");
String helpTopic = getOptionalRelativeString("Choices." + choice + ".HelpTopicID_");
JRadioButton radioButton = new JRadioButton(title);
radioButton.setHorizontalAlignment(SwingConstants.LEFT);
radioButton.setActionCommand(choice);
radioButton.addActionListener(this);
buttonGroup.add(radioButton);
if (helpTopic != null)
PCSH.enableHelpOnButton(radioButton, helpTopic);
add(indentedComponent(2, radioButton));
add(verticalSpace(1));
if (description != null) {
add(indentedComponent(6, new WrappingText(description)));
}
}
}
use of net.sourceforge.processdash.ui.lib.WrappingText 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);
}
use of net.sourceforge.processdash.ui.lib.WrappingText in project processdash by dtuma.
the class WizardPanel method buildUserInterface.
protected void buildUserInterface() {
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
JLabel promptLabel = new JLabel(getRelativeString("Prompt"));
promptLabel.setHorizontalAlignment(SwingConstants.LEFT);
add(indentedComponent(0, promptLabel));
add(verticalSpace(2));
String header = getOptionalRelativeString("Header");
if (header != null) {
add(indentedComponent(2, new WrappingText(header)));
add(verticalSpace(2));
}
buildMainPanelContents();
add(verticalSpace(2));
String footer = getOptionalRelativeString("Footer");
if (footer != null) {
add(indentedComponent(2, new WrappingText(footer)));
add(verticalSpace(2));
}
add(createButtonBox());
}
Aggregations