|
|
@@ -52,7 +52,8 @@ class SkillLevelUpLine extends JPanel {
|
|
|
IntValue points;
|
|
|
}
|
|
|
|
|
|
- public SkillLevelUpLine(final DDCharacter chara, final DDCharacterClass cclass, final DDSkill skill, IntValue pointsAvaliable) {
|
|
|
+ public SkillLevelUpLine(final DDCharacter chara, final DDCharacterClass cclass,
|
|
|
+ final DDSkill skill, IntValue pointsAvaliable) {
|
|
|
isClassSkill = cclass.isClassSkill(skill.getName());
|
|
|
this.skill = skill;
|
|
|
current = new IntValue(0);
|
|
|
@@ -161,18 +162,18 @@ class SkillLevelUpLine extends JPanel {
|
|
|
add(ranks, gbc_ranks);
|
|
|
ranks.setColumns(10);
|
|
|
|
|
|
- Component horizontalStrut = Box.createHorizontalStrut(20);
|
|
|
- GridBagConstraints gbc_horizontalStrut = new GridBagConstraints();
|
|
|
- gbc_horizontalStrut.insets = new Insets(0, 0, 0, 5);
|
|
|
- gbc_horizontalStrut.gridx = 8;
|
|
|
- gbc_horizontalStrut.gridy = 0;
|
|
|
- add(horizontalStrut, gbc_horizontalStrut);
|
|
|
+ Component horizontalGlue = Box.createHorizontalGlue();
|
|
|
+ GridBagConstraints gbc_horizontalGlue = new GridBagConstraints();
|
|
|
+ gbc_horizontalGlue.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_horizontalGlue.gridx = 8;
|
|
|
+ gbc_horizontalGlue.gridy = 0;
|
|
|
+ add(horizontalGlue, gbc_horizontalGlue);
|
|
|
|
|
|
JButton plus = new JButton("+");
|
|
|
plus.setMargin(new Insets(2, 2, 2, 2));
|
|
|
plus.setFont(new Font("Tahoma", Font.PLAIN, 8));
|
|
|
- plus.setPreferredSize(new Dimension(30, 19));
|
|
|
- plus.setMinimumSize(new Dimension(30, 19));
|
|
|
+ plus.setPreferredSize(new Dimension(25, 19));
|
|
|
+ plus.setMinimumSize(new Dimension(25, 19));
|
|
|
GridBagConstraints gbc_plus = new GridBagConstraints();
|
|
|
gbc_plus.insets = new Insets(0, 0, 1, 5);
|
|
|
gbc_plus.gridx = 9;
|
|
|
@@ -182,8 +183,8 @@ class SkillLevelUpLine extends JPanel {
|
|
|
JButton minus = new JButton("-");
|
|
|
minus.setMargin(new Insets(2, 2, 2, 2));
|
|
|
minus.setFont(new Font("Tahoma", Font.PLAIN, 8));
|
|
|
- minus.setMinimumSize(new Dimension(30, 19));
|
|
|
- minus.setPreferredSize(new Dimension(30, 19));
|
|
|
+ minus.setMinimumSize(new Dimension(25, 19));
|
|
|
+ minus.setPreferredSize(new Dimension(25, 19));
|
|
|
GridBagConstraints gbc_minus = new GridBagConstraints();
|
|
|
gbc_minus.insets = new Insets(0, 0, 1, 5);
|
|
|
gbc_minus.gridx = 10;
|
|
|
@@ -234,7 +235,7 @@ class SkillLevelUpLine extends JPanel {
|
|
|
}
|
|
|
|
|
|
private Optional<Ability.Scores> getAbility(final DDCharacter chara, final DDSkill skill) {
|
|
|
- if (skill.getAbility().isEmpty()) { return Optional.empty(); }
|
|
|
+ if (skill.getAbility() == null || skill.getAbility().isEmpty()) { return Optional.empty(); }
|
|
|
else { return Optional.of(AbilityHelper.get(chara, skill)); }
|
|
|
}
|
|
|
|