public abstract class DialogAttribute<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,T extends ArchetypeAttribute>
extends java.lang.Object
ArchetypeAttribute with its input
component(s).| Modifier | Constructor and Description |
|---|---|
protected |
DialogAttribute(T ref)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLine(@NotNull javax.swing.text.Document doc,
@NotNull javax.swing.text.AttributeSet style,
@NotNull java.lang.String prefix,
@NotNull java.lang.String postfix)
Appends a line to a
Document. |
abstract void |
appendSummary(@NotNull javax.swing.text.Document doc,
@NotNull javax.swing.text.Style style)
Appends a summary line for this attribute to a
Document. |
abstract @NotNull java.lang.String |
getObjectText(G gameObject,
@NotNull Archetype<G,A,R> archetype,
@NotNull java.lang.String[] newMsg,
@NotNull ArchetypeType archetypeType)
Returns the attribute text for this attribute.
|
T |
getRef()
Returns the attribute data.
|
protected DialogAttribute(@NotNull
T ref)
ref - reference to the attribute data@NotNull public T getRef()
@NotNull
public abstract @NotNull java.lang.String getObjectText(@NotNull
G gameObject,
@NotNull
@NotNull Archetype<G,A,R> archetype,
@NotNull
@NotNull java.lang.String[] newMsg,
@NotNull
@NotNull ArchetypeType archetypeType)
throws InvalidAttributeException
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 typeInvalidAttributeException - if the attribute cannot be encodedpublic abstract void appendSummary(@NotNull
@NotNull javax.swing.text.Document doc,
@NotNull
@NotNull javax.swing.text.Style style)
Document.doc - the document to append tostyle - the style for the new textprotected void addLine(@NotNull
@NotNull javax.swing.text.Document doc,
@NotNull
@NotNull javax.swing.text.AttributeSet style,
@NotNull
@NotNull java.lang.String prefix,
@NotNull
@NotNull java.lang.String postfix)
Document. The line consists of the name of
this attribute, possibly with some text prepended and/or appended.doc - the document to add tostyle - the style for the new textprefix - the text to prepend; may be emptypostfix - the text to append; may be empty