Close window when clicking the Save button.
Changed the buttons for moving extensions up and down from icons to text. Added a Remove text message to the remove button, which previously was a red X.
This commit is contained in:
parent
029a14b5be
commit
e90b70e601
1 changed files with 7 additions and 15 deletions
|
@ -204,7 +204,7 @@ public class ProjectDirectoriesDialog extends JDialog {
|
||||||
buttonPane.setBorder(BorderFactory.createEmptyBorder(0,3,3,3));
|
buttonPane.setBorder(BorderFactory.createEmptyBorder(0,3,3,3));
|
||||||
buttonPane.add(Box.createHorizontalGlue());
|
buttonPane.add(Box.createHorizontalGlue());
|
||||||
|
|
||||||
button = new JButton("View merged config");
|
button = new JButton("View config");
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
try {
|
try {
|
||||||
|
@ -277,6 +277,7 @@ public class ProjectDirectoriesDialog extends JDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI.setExternalToolsSetting("DEFAULT_PROJECTDIRS", newDefaultProjectDirs);
|
GUI.setExternalToolsSetting("DEFAULT_PROJECTDIRS", newDefaultProjectDirs);
|
||||||
|
dispose();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
buttonPane.add(button);
|
buttonPane.add(button);
|
||||||
|
@ -289,12 +290,7 @@ public class ProjectDirectoriesDialog extends JDialog {
|
||||||
treePanel = new DirectoryTreePanel(this);
|
treePanel = new DirectoryTreePanel(this);
|
||||||
|
|
||||||
sortPane = new JPanel(new BorderLayout());
|
sortPane = new JPanel(new BorderLayout());
|
||||||
Icon icon = UIManager.getLookAndFeelDefaults().getIcon("Table.ascendingSortIcon");
|
button = new JButton("Move up");
|
||||||
if (icon == null) {
|
|
||||||
button = new JButton("Up");
|
|
||||||
} else {
|
|
||||||
button = new JButton(icon);
|
|
||||||
}
|
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int selectedIndex = table.getSelectedRow();
|
int selectedIndex = table.getSelectedRow();
|
||||||
|
@ -308,12 +304,8 @@ public class ProjectDirectoriesDialog extends JDialog {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sortPane.add(BorderLayout.NORTH, button);
|
sortPane.add(BorderLayout.NORTH, button);
|
||||||
icon = UIManager.getLookAndFeelDefaults().getIcon("Table.descendingSortIcon");
|
|
||||||
if (icon == null) {
|
button = new JButton("Move down");
|
||||||
button = new JButton("Down");
|
|
||||||
} else {
|
|
||||||
button = new JButton(icon);
|
|
||||||
}
|
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int selectedIndex = table.getSelectedRow();
|
int selectedIndex = table.getSelectedRow();
|
||||||
|
@ -332,8 +324,8 @@ public class ProjectDirectoriesDialog extends JDialog {
|
||||||
sortPane.add(BorderLayout.SOUTH, button);
|
sortPane.add(BorderLayout.SOUTH, button);
|
||||||
|
|
||||||
{
|
{
|
||||||
button = new JButton("X");
|
button = new JButton("Remove");
|
||||||
button.setBackground(Color.RED);
|
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int selectedIndex = table.getSelectedRow();
|
int selectedIndex = table.getSelectedRow();
|
||||||
|
|
Loading…
Reference in a new issue