Class TerraPromptSkin

    • Constructor Detail

      • TerraPromptSkin

        public TerraPromptSkin()
        Default constructor.
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class TerraSheetSkin
        Parameters:
        component - The component to which the skin is being attached.
      • messageTypeChanged

        public void messageTypeChanged​(Prompt prompt,
                                       MessageType previousMessageType)
        Description copied from interface: PromptListener
        Called when a prompt's message type has changed.
        Specified by:
        messageTypeChanged in interface PromptListener
        Parameters:
        prompt - The prompt object that has been changed.
        previousMessageType - The message type before the change.
      • messageChanged

        public void messageChanged​(Prompt prompt,
                                   java.lang.String previousMessage)
        Description copied from interface: PromptListener
        Called when a prompt's message has changed.
        Specified by:
        messageChanged in interface PromptListener
        Parameters:
        prompt - The prompt whose message has changed.
        previousMessage - What the message used to be.
      • bodyChanged

        public void bodyChanged​(Prompt prompt,
                                Component previousBody)
        Description copied from interface: PromptListener
        Called when a prompt's body has changed.
        Specified by:
        bodyChanged in interface PromptListener
        Parameters:
        prompt - The prompt that has changed.
        previousBody - What the body of this prompt used to be.
      • optionInserted

        public void optionInserted​(Prompt prompt,
                                   int index)
        Description copied from interface: PromptListener
        Called when an option has been inserted into a prompt's option sequence.
        Specified by:
        optionInserted in interface PromptListener
        Parameters:
        prompt - The prompt whose options have changed.
        index - The location where the new option was inserted.
      • optionsRemoved

        public void optionsRemoved​(Prompt prompt,
                                   int index,
                                   Sequence<?> removed)
        Description copied from interface: PromptListener
        Called when options have been removed from a prompt's option sequence.
        Specified by:
        optionsRemoved in interface PromptListener
        Parameters:
        prompt - The prompt whose options have changed.
        index - The starting location of the removed options.
        removed - The actual sequence of options removed.
      • selectedOptionChanged

        public void selectedOptionChanged​(Prompt prompt,
                                          int previousSelectedOption)
        Description copied from interface: PromptListener
        Called when a prompt's selected option has changed.
        Specified by:
        selectedOptionChanged in interface PromptListener
        Parameters:
        prompt - The prompt that changed.
        previousSelectedOption - The option that used to be the selected one.
      • previewWindowOpen

        public Vote previewWindowOpen​(Window window)
        Description copied from interface: WindowStateListener
        Called to preview a window open event.
        Specified by:
        previewWindowOpen in interface WindowStateListener
        Parameters:
        window - The window that wants to open.
        Returns:
        The vote from the listener as to whether to allow the open.
      • getMessageFont

        public final java.awt.Font getMessageFont()
        Returns:
        The font used to render the message label's text.
      • setMessageFont

        public final void setMessageFont​(java.lang.Object font)
        Sets the font used to render the message label's text.
        Parameters:
        font - The new font used to render the message label text.
      • getMessageColor

        public final java.awt.Color getMessageColor()
        Returns:
        The foreground color of the text of the message label.
      • setMessageColor

        public final void setMessageColor​(java.lang.Object color)
        Sets the foreground color of the text of the message label.
        Parameters:
        color - The new foreground color for the label text.
      • getMessageBackgroundColor

        public final java.awt.Color getMessageBackgroundColor()
        Returns:
        The background color of the message label.
      • setMessageBackgroundColor

        public final void setMessageBackgroundColor​(java.lang.Object backgroundColor)
        Sets the background color of the message label.
        Parameters:
        backgroundColor - The new background color for the message label (can be null to let the parent background show through).
      • getMessageTextDecoration

        public final TextDecoration getMessageTextDecoration()
        Returns:
        The text decoration of the message label.
      • setMessageTextDecoration

        public final void setMessageTextDecoration​(TextDecoration textDecoration)
        Set the text decoration for the message label.
        Parameters:
        textDecoration - The text decoration for the message label.