Class ButtonFactory

java.lang.Object
org.adempiere.webui.factory.ButtonFactory

public class ButtonFactory extends Object
Factory class to create button with consistent look and feel
Author:
hengsin
  • Constructor Details

    • ButtonFactory

      public ButtonFactory()
  • Method Details

    • isWithText

      public static final boolean isWithText()
      Returns:
      true if button should have text label
    • isWithImage

      public static final boolean isWithImage()
      Returns:
      true if button should include an image icon
    • createNamedButton

      public static Button createNamedButton(String name)
      Create named button with default style
      Parameters:
      name -
      Returns:
      new button instance
    • createNamedButton

      public static Button createNamedButton(String name, boolean withText, boolean withImage)
      Parameters:
      name - button name. If withText is true, the name will be used to lookup the button label from ad_message
      withText - text button
      withImage - image button
      Returns:
      new button instance
    • createButton

      public static Button createButton(String label, String image, String tooltiptext)
      Parameters:
      label -
      image -
      tooltiptext -
      Returns:
      new button instance