tomcatLocationPathTextField.addCaretListener(tomcatLocationPathCaretListener);
tomcatLocationPathButton.setText("Browse...");
tomcatLocationPathButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
FileDialog dialog = new FileDialog(PreferencesView.this, "Select Tomcat Folder", FileDialog.LOAD);
System.setProperty("apple.awt.fileDialogForDirectories", "true");
dialog.setVisible(true);
System.setProperty("apple.awt.fileDialogForDirectories", "false");
if (dialog.getDirectory() != null) {
tomcatLocationPathTextField.setText(dialog.getDirectory() + dialog.getFile());
}
}
});
tomcatLocationPathExplanationLabel = new JLabel();
{
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 1;
constraints.gridy = ++currentGridY;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.insets.left = 5;
constraints.insets.bottom = 5;
contentPanel.add(tomcatLocationPathExplanationLabel, constraints);
}
tomcatLocationPathExplanationLabel.setFont(new Font("Lucida Grande", 0, 11));
tomcatLocationPathExplanationLabel.setText("The path to the Tomcat installation root folder");
// java home path
javaHomePathLabel = new JLabel();
{
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 0;
constraints.gridy = ++currentGridY;
constraints.anchor = GridBagConstraints.EAST;
constraints.fill = GridBagConstraints.HORIZONTAL;
contentPanel.add(javaHomePathLabel, constraints);
}
javaHomePathLabel.setHorizontalAlignment(SwingConstants.RIGHT);
javaHomePathLabel.setText("Java installation");
javaHomePathTextField = new JTextField();
javaHomePathButton = new JButton();
{
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 1;
constraints.gridy = currentGridY;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.HORIZONTAL;
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(javaHomePathTextField, BorderLayout.CENTER);
panel.add(javaHomePathButton, BorderLayout.EAST);
contentPanel.add(panel, constraints);
}
javaHomePathTextField.setHorizontalAlignment(JTextField.LEFT);
javaHomePathTextField.addCaretListener(javaHomePathCaretListener);
javaHomePathButton.setText("Browse...");
javaHomePathButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
FileDialog dialog = new FileDialog(PreferencesView.this, "Select Java Folder", FileDialog.LOAD);
System.setProperty("apple.awt.fileDialogForDirectories", "true");
dialog.setVisible(true);
System.setProperty("apple.awt.fileDialogForDirectories", "false");
if (dialog.getDirectory() != null) {
javaHomePathTextField.setText(dialog.getDirectory() + dialog.getFile());
}
}
});
javaHomePathExplanationLabel = new JLabel();
{
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 1;
constraints.gridy = ++currentGridY;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.insets.left = 5;
constraints.insets.bottom = 5;
contentPanel.add(javaHomePathExplanationLabel, constraints);
}
javaHomePathExplanationLabel.setFont(new Font("Lucida Grande", 0, 11));
javaHomePathExplanationLabel.setText("The path to the Java installation home folder");
// log path
logPathLabel = new JLabel();
{
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 0;
constraints.gridy = ++currentGridY;
constraints.anchor = GridBagConstraints.EAST;
constraints.fill = GridBagConstraints.HORIZONTAL;
contentPanel.add(logPathLabel, constraints);
}
logPathLabel.setHorizontalAlignment(SwingConstants.RIGHT);
logPathLabel.setText("Log folder");
logPathTextField = new JTextField();
logPathButton = new JButton();
{
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 1;
constraints.gridy = currentGridY;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.HORIZONTAL;
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(logPathTextField, BorderLayout.CENTER);
panel.add(logPathButton, BorderLayout.EAST);
contentPanel.add(panel, constraints);
}
logPathTextField.setHorizontalAlignment(JTextField.LEFT);
logPathTextField.addCaretListener(logPathCaretListener);
logPathButton.setText("Browse...");
logPathButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
FileDialog dialog = new FileDialog(PreferencesView.this, "Select Log Folder", FileDialog.LOAD);
System.setProperty("apple.awt.fileDialogForDirectories", "true");
dialog.setVisible(true);
System.setProperty("apple.awt.fileDialogForDirectories", "false");
if (dialog.getDirectory() != null) {
logPathTextField.setText(dialog.getDirectory() + dialog.getFile());
}
}
});
logPathExplanationLabel = new JLabel();