Class DialogAttributeBitmask<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendSummary​(@NotNull javax.swing.text.Document doc, @NotNull javax.swing.text.Style style)
      Appends a summary line for this attribute to a Document.
      @Nullable AttributeBitmask getBitmask()  
      @NotNull java.awt.Component getInput()
      Returns the input ui component for editing the value.
      @NotNull java.lang.String getObjectText​(G gameObject, @NotNull Archetype<G,​A,​R> archetype, @NotNull java.lang.String @NotNull [] newMsg, @NotNull ArchetypeType archetypeType)
      Returns the attribute text for this attribute.
      int getValue()
      Get the active bitmask value.
      void setBitmask​(@Nullable AttributeBitmask bitmask)  
      void setEncodedValue​(@NotNull java.lang.String encodedValue)
      Set the active bitmask value in external file representation.
      void setValue​(int value)
      Set the active bitmask value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DialogAttributeBitmask

        public DialogAttributeBitmask​(@NotNull
                                      @NotNull ArchetypeAttributeBitmask ref,
                                      @NotNull
                                      @NotNull javax.swing.text.JTextComponent input)
        Creates a new instance.
        Parameters:
        ref - reference to the attribute data
        input - the input ui component for editing the value
    • Method Detail

      • getObjectText

        @NotNull
        public @NotNull java.lang.String getObjectText​(@NotNull
                                                       G gameObject,
                                                       @NotNull
                                                       @NotNull Archetype<G,​A,​R> archetype,
                                                       @NotNull
                                                       @NotNull java.lang.String @NotNull [] newMsg,
                                                       @NotNull
                                                       @NotNull ArchetypeType archetypeType)
        Description copied from class: DialogAttribute
        Returns the attribute text for this attribute. The returned string is inserted into the owner's game object text.
        Specified by:
        getObjectText in class DialogAttribute<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>,​ArchetypeAttributeBitmask>
        Parameters:
        gameObject - the owner
        archetype - the owner's new archetype; it might differ from gameObject's current archetype
        newMsg - the new "msg" value for the owner
        archetypeType - the owner's archetype type
        Returns:
        the game object text or an empty string
      • getValue

        public int getValue()
        Get the active bitmask value.
        Returns:
        active bitmask value
      • setValue

        public void setValue​(int value)
        Set the active bitmask value.
        Parameters:
        value - new active bitmask value
      • setEncodedValue

        public void setEncodedValue​(@NotNull
                                    @NotNull java.lang.String encodedValue)
        Set the active bitmask value in external file representation.
        Parameters:
        encodedValue - new active bitmask value in external file representation
      • setBitmask

        public void setBitmask​(@Nullable
                               @Nullable AttributeBitmask bitmask)
      • getInput

        @NotNull
        public @NotNull java.awt.Component getInput()
        Returns the input ui component for editing the value.
        Returns:
        the component