minor fix: avoid too wide dialog by printing each project on a separate line

This commit is contained in:
fros4943 2010-02-03 10:19:58 +00:00
parent fd2a377666
commit d8c32de4db

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: ProjectDirectoriesDialog.java,v 1.11 2010/01/15 10:09:23 adamdunkels Exp $ * $Id: ProjectDirectoriesDialog.java,v 1.12 2010/02/03 10:19:58 fros4943 Exp $
*/ */
package se.sics.cooja.dialogs; package se.sics.cooja.dialogs;
@ -48,7 +48,6 @@ import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Vector;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Box; import javax.swing.Box;
@ -153,9 +152,9 @@ public class ProjectDirectoriesDialog extends JDialog {
newDefaultProjectDirs = newDefaultProjectDirs.replace('\\', '/'); newDefaultProjectDirs = newDefaultProjectDirs.replace('\\', '/');
String question = "External tools setting DEFAULT_PROJECTDIRS will change from:\n" String question = "External tools setting DEFAULT_PROJECTDIRS will change from:\n"
+ GUI.getExternalToolsSetting("DEFAULT_PROJECTDIRS") + GUI.getExternalToolsSetting("DEFAULT_PROJECTDIRS", "").replace(';', '\n')
+ "\n to:\n" + "\n\n to:\n\n"
+ newDefaultProjectDirs; + newDefaultProjectDirs.replace(';', '\n');
String title = "Change external tools settings?"; String title = "Change external tools settings?";
int answer = JOptionPane.showOptionDialog(ProjectDirectoriesDialog.this, question, title, int answer = JOptionPane.showOptionDialog(ProjectDirectoriesDialog.this, question, title,
JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,