|
@@ -2,14 +2,13 @@ package org.leumasjaffe.charsheet.view.dev;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
-import javax.swing.JDialog;
|
|
|
|
|
import javax.swing.JMenu;
|
|
import javax.swing.JMenu;
|
|
|
import javax.swing.JMenuItem;
|
|
import javax.swing.JMenuItem;
|
|
|
import javax.swing.JOptionPane;
|
|
import javax.swing.JOptionPane;
|
|
|
|
|
|
|
|
import org.leumasjaffe.charsheet.model.DDCharacter;
|
|
import org.leumasjaffe.charsheet.model.DDCharacter;
|
|
|
import org.leumasjaffe.charsheet.model.DDCharacterClass;
|
|
import org.leumasjaffe.charsheet.model.DDCharacterClass;
|
|
|
-import org.leumasjaffe.charsheet.view.skills.SkillLevelUpDialogue;
|
|
|
|
|
|
|
+import org.leumasjaffe.charsheet.view.builders.DialogBuilder;
|
|
|
|
|
|
|
|
public class DeveloperMenu extends JMenu {
|
|
public class DeveloperMenu extends JMenu {
|
|
|
/**
|
|
/**
|
|
@@ -26,14 +25,7 @@ public class DeveloperMenu extends JMenu {
|
|
|
String clazz = (String) JOptionPane.showInputDialog(this.getParent(), "Which Class is Leveling Up?", "Level Up - Skill",
|
|
String clazz = (String) JOptionPane.showInputDialog(this.getParent(), "Which Class is Leveling Up?", "Level Up - Skill",
|
|
|
JOptionPane.QUESTION_MESSAGE, null, choices, choices[0]);
|
|
JOptionPane.QUESTION_MESSAGE, null, choices, choices[0]);
|
|
|
if (clazz != null) {
|
|
if (clazz != null) {
|
|
|
- final JDialog dialog = new JDialog();
|
|
|
|
|
- dialog.setTitle("Level Up - Skill Allocation");
|
|
|
|
|
- dialog.setModal(true);
|
|
|
|
|
- dialog.setSize(510, 600);
|
|
|
|
|
-
|
|
|
|
|
- dialog.setContentPane(new SkillLevelUpDialogue(model[0], model[0].getClasses().stream().filter(c -> c.getName().equals(clazz)).findFirst().get()));
|
|
|
|
|
- dialog.setVisible(true);
|
|
|
|
|
- dialog.pack();
|
|
|
|
|
|
|
+ DialogBuilder.createSkillDialog(model[0], model[0].getClasses().stream().filter(c -> c.getName().equals(clazz)).findFirst().get());
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
add(mntmLevelUp);
|
|
add(mntmLevelUp);
|