Class Card

All Implemented Interfaces:
Clickable<Card>, HandleMouseEvents<Card>

public class Card extends Component<Card> implements Clickable<Card>, HandleMouseEvents<Card>
  • Constructor Details

    • Card

      public Card()
    • Card

      public Card(String id, String language)
  • Method Details

    • setHeaderText

      public Card setHeaderText(String headerText)
    • setHeaderText

      public Card setHeaderText(String headerText, Color color)
    • getHeaderText

      public String getHeaderText()
    • createHeader

      public Card createHeader(String headerText)
    • createHeader

      public Card createHeader(Component<?> components)
    • createHeader

      public Card createHeader(String headerText, Color textColor)
    • createHeader

      public Card createHeader(String headerText, Color textColor, Color backgroundColor)
    • createHeader

      public Card createHeader(String text, Color textColor, Color backgroundColor, Component<?>... components)
    • getHeader

      public CardHeader getHeader()
    • setFooterText

      public Card setFooterText(String footerText)
    • setFooterText

      public Card setFooterText(String footerText, Color color)
    • getFooterText

      public String getFooterText()
    • createFooter

      public Card createFooter(String footerText)
    • createFooter

      public Card createFooter(Component<?> components)
    • createFooter

      public Card createFooter(String footerText, Color textColor)
    • createFooter

      public Card createFooter(String footerText, Color textColor, Color backgroundColor)
    • createFooter

      public Card createFooter(String footerText, Color textColor, Color backgroundColor, Component<?>... components)
    • getFooter

      public CardFooter getFooter()
    • addComponent

      public Card addComponent(Component<?> component)
      Description copied from class: Component
      Adds the specified component as a subcomponent, and redraws the component immediately
      Overrides:
      addComponent in class Component<Card>
      Parameters:
      component - The component to be added
      Returns:
      The component
    • removeAllComponents

      public Card removeAllComponents()
      Description copied from class: Component
      Removes every subcomponent from the component
      Overrides:
      removeAllComponents in class Component<Card>
      Returns:
      The component
    • removeComponent

      public Card removeComponent(Component<?> component)
      Description copied from class: Component
      Removes the specified subcomponent.
      Overrides:
      removeComponent in class Component<Card>
      Parameters:
      component - The component instance
      Returns:
      The component
    • setCardTopImage

      public Card setCardTopImage(Image image)
    • getCardTopImage

      public Image getCardTopImage()
    • setCardBottomImage

      public Card setCardBottomImage(Image image)
    • getCardBottomImage

      public Image getCardBottomImage()
    • setCardBackgroundImage

      public Card setCardBackgroundImage(Image image)
    • setVerticalAlignCenter

      public Card setVerticalAlignCenter(boolean centered)
    • isVerticalAlignCenter

      public boolean isVerticalAlignCenter()
    • getCardBackgroundImage

      public Image getCardBackgroundImage()
    • setTextAlign

      public Card setTextAlign(TextAlign align)
      Overrides:
      setTextAlign in class Component<Card>
    • getTextAlign

      public TextAlign getTextAlign()
      Overrides:
      getTextAlign in class Component<Card>
    • addTitle

      public Card addTitle(String title)
    • addTitle

      public Card addTitle(String title, Color color)
    • addSubTitle

      public Card addSubTitle(String title)
    • addSubTitle

      public Card addSubTitle(String title, Color color)
    • addText

      public Card addText(String title)
    • addText

      public Card addText(String title, Color color)
    • 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<Card>
      Returns:
      If the componentwas drawn, true, otherwise false