Class WebButtonDepictor<C extends ActionControl>

Type Parameters:
C - The type of component being depicted.
All Implemented Interfaces:
ComponentDepictor<C>, Depictor<C>, WebComponentDepictor<C>, WebDepictor<C>
Direct Known Subclasses:
WebToolButtonDepictor

public class WebButtonDepictor<C extends ActionControl> extends AbstractWebActionControlDepictor<C>
Strategy for rendering an action control as an XHTML <button> element. This depictor renders a selected SelectActionControl with a depressed border.
Author:
Garret Wilson
  • Constructor Details

    • WebButtonDepictor

      public WebButtonDepictor()
      Default constructor using the XHTML <button> element.
  • Method Details

    • getBodyStyles

      protected Map<String,Object> getBodyStyles()
      Retrieves the styles for the body element of the component.

      This version returns the style for background color.

      This version lowers the opacity if the control is disabled.

      This version adds special borders for a selected SelectActionControl.

      Overrides:
      getBodyStyles in class AbstractWebActionControlDepictor<C extends ActionControl>
      Returns:
      The styles for the body element of the component, mapped to CSS property names.
    • depictBegin

      protected void depictBegin() throws IOException
      Description copied from class: AbstractSimpleWebComponentDepictor
      Begins the depiction process.

      This version renders the beginning XML element information, if there is any, leaving the beginning tag open for attributes.

      This version writes common XHTML attributes.

      This version writes the body ID and class attributes, along with the direction attribute.

      Overrides:
      depictBegin in class AbstractSimpleWebComponentDepictor<C extends ActionControl>
      Throws:
      IOException - if there is an error updating the depiction.