Class ModalWindow.ModalHeader

Enclosing class:
ModalWindow

public class ModalWindow.ModalHeader extends Component<ModalWindow.ModalHeader>

The modal window header component

This component is only used by the modal window to display the header. The use of this component on its own is not supported.

Since:
4.0
Author:
JBStrap
  • Constructor Details

    • ModalHeader

      protected ModalHeader(String id)
      Parameters:
      id - The component ID. The ID specified here will appear in the HTML tag as an ID attribute. If there are multiple components displayed, that have the same ID, the ID numbers will be numbered, in the order they are displayed. (For example, if the ID is 'COMPONENT' then it will be numbered like this: COMPONENT, COMPONENT_1, COMPONENT_2 etc.)
  • Method Details

    • setIcon

      public ModalWindow.ModalHeader setIcon(Icon icon)
      Sets the icon of the modal window header.
      Parameters:
      icon - The icon to be used. For usable icons, see the Icon enum
      Returns:
      The modal window header component
    • setHeaderText

      public ModalWindow.ModalHeader setHeaderText(String text)
      Sets the header text
      Parameters:
      text - The header text
      Returns:
      The modal window header component
    • writeHTML

      public boolean writeHTML(StringWriter writer)
      Description copied from class: Component
      Creates the component's HTML equivalent

      This method doesn't need to be used during application development. This method is used when developing a custom component. When creating a custom component, this method needs to be implemented. In the parameter (StringWriter class) the component's HTML equivalent must be specified, and the method has to return with a Boolean value. This boolean value determines if the component was drawn. If the user doesn't have access right to the component, or if the component couldn't be drawn, it should return with false. Otherwise, it must return with true.

      Specified by:
      writeHTML in class Component<ModalWindow.ModalHeader>
      Returns:
      If the componentwas drawn, true, otherwise false