Class WStyledText

    • Constructor Detail

      • WStyledText

        public WStyledText()
        Creates a plain WStyledText with no text.
      • WStyledText

        public WStyledText​(String text)
        Creates a plain WStyledText with the given text.
        Parameters:
        text - the text.
      • WStyledText

        public WStyledText​(String text,
                           WStyledText.Type type)
        Creates a plain WStyledText with the given text and type.
        Parameters:
        text - the text.
        type - the type of styling to use.
    • Method Detail

      • setType

        public void setType​(WStyledText.Type type)
        Parameters:
        type - The type to set.
      • getComponentModel

        protected WStyledText.StyledTextModel getComponentModel()
        Returns the effective component model for this component. Subclass may override this method to narrow the return type to their specific model type.
        Overrides:
        getComponentModel in class WText
        Returns:
        the effective component model
      • getOrCreateComponentModel

        protected WStyledText.StyledTextModel getOrCreateComponentModel()
        Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.
        Overrides:
        getOrCreateComponentModel in class WText
        Returns:
        the model for this component