public class DialogAttributeZSpell<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends DialogAttribute<G,A,R,ArchetypeAttributeZSpell>
Constructor and Description |
---|
DialogAttributeZSpell(ArchetypeAttributeZSpell ref,
javax.swing.JComboBox input,
Spells<NumberSpell> numberSpells,
int undefinedSpellIndex)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
appendSummary(javax.swing.text.Document doc,
javax.swing.text.Style style)
Appends a summary line for this attribute to a
Document . |
java.lang.String |
getObjectText(G gameObject,
Archetype<G,A,R> archetype,
java.lang.String[] newMsg,
ArchetypeType archetypeType)
Returns the attribute text for this attribute.
|
addLine, getRef
public DialogAttributeZSpell(@NotNull ArchetypeAttributeZSpell ref, @NotNull javax.swing.JComboBox input, @NotNull Spells<NumberSpell> numberSpells, int undefinedSpellIndex)
ref
- reference to the attribute datainput
- the input ui component for editing the valuenumberSpells
- the number spells to displayundefinedSpellIndex
- the index used for "no" spell@NotNull public java.lang.String getObjectText(@NotNull G gameObject, @NotNull Archetype<G,A,R> archetype, @NotNull java.lang.String[] newMsg, @NotNull ArchetypeType archetypeType)
getObjectText
in class DialogAttribute<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,ArchetypeAttributeZSpell>
gameObject
- the ownerarchetype
- the owner's new archetype; it might differ from gameObject
's current archetypenewMsg
- the new "msg" value for the ownerarchetypeType
- the owner's archetype typepublic void appendSummary(@NotNull javax.swing.text.Document doc, @NotNull javax.swing.text.Style style)
Document
.appendSummary
in class DialogAttribute<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,ArchetypeAttributeZSpell>
doc
- the document to append tostyle
- the style for the new text