|
@@ -10,7 +10,7 @@ import java.util.function.Function;
|
|
|
import java.awt.Dimension;
|
|
import java.awt.Dimension;
|
|
|
import java.awt.Color;
|
|
import java.awt.Color;
|
|
|
|
|
|
|
|
-import org.leumasjaffe.charsheet.model.AbilityScores;
|
|
|
|
|
|
|
+import org.leumasjaffe.charsheet.model.Ability;
|
|
|
import org.leumasjaffe.charsheet.model.observable.IntValue;
|
|
import org.leumasjaffe.charsheet.model.observable.IntValue;
|
|
|
|
|
|
|
|
import lombok.AccessLevel;
|
|
import lombok.AccessLevel;
|
|
@@ -23,9 +23,9 @@ public class AbilityPanel extends JPanel {
|
|
|
*/
|
|
*/
|
|
|
private static final long serialVersionUID = 1L;
|
|
private static final long serialVersionUID = 1L;
|
|
|
private static final String[] abils = new String[] { "STR", "DEX", "CON", "INT", "WIS", "CHA" };
|
|
private static final String[] abils = new String[] { "STR", "DEX", "CON", "INT", "WIS", "CHA" };
|
|
|
- private static final List<Function<AbilityScores.Scores, IntValue>> funcs = Arrays.asList(
|
|
|
|
|
- AbilityScores.Scores::getStr, AbilityScores.Scores::getDex, AbilityScores.Scores::getCon,
|
|
|
|
|
- AbilityScores.Scores::getInt, AbilityScores.Scores::getWis, AbilityScores.Scores::getCha
|
|
|
|
|
|
|
+ private static final List<Function<Ability.Scores, IntValue>> funcs = Arrays.asList(
|
|
|
|
|
+ Ability.Scores::getStr, Ability.Scores::getDex, Ability.Scores::getCon,
|
|
|
|
|
+ Ability.Scores::getInt, Ability.Scores::getWis, Ability.Scores::getCha
|
|
|
);
|
|
);
|
|
|
AbilityLine[] lines = new AbilityLine[6];
|
|
AbilityLine[] lines = new AbilityLine[6];
|
|
|
|
|
|
|
@@ -46,7 +46,7 @@ public class AbilityPanel extends JPanel {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private AbilityLine addAbility(int y, String name, Function<AbilityScores.Scores, IntValue> func) {
|
|
|
|
|
|
|
+ private AbilityLine addAbility(int y, String name, Function<Ability.Scores, IntValue> func) {
|
|
|
AbilityLine abilityLine = new AbilityLine(name, func);
|
|
AbilityLine abilityLine = new AbilityLine(name, func);
|
|
|
abilityLine.setOpaque(false);
|
|
abilityLine.setOpaque(false);
|
|
|
GridBagConstraints gbc_abilityLine = new GridBagConstraints();
|
|
GridBagConstraints gbc_abilityLine = new GridBagConstraints();
|
|
@@ -58,7 +58,7 @@ public class AbilityPanel extends JPanel {
|
|
|
return abilityLine;
|
|
return abilityLine;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void setModel(AbilityScores model) {
|
|
|
|
|
|
|
+ public void setModel(Ability model) {
|
|
|
for (int i = 0; i < abils.length; ++i) {
|
|
for (int i = 0; i < abils.length; ++i) {
|
|
|
lines[i].setModel(model);
|
|
lines[i].setModel(model);
|
|
|
}
|
|
}
|