Package org.adempiere.webui.factory
Class ButtonFactory
java.lang.Object
org.adempiere.webui.factory.ButtonFactory
Factory class to create button with consistent look and feel
- Author:
- hengsin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ButtoncreateButton(String label, String image, String tooltiptext) Create buttonstatic ButtoncreateNamedButton(String name) Create named button with default stylestatic ButtoncreateNamedButton(String name, boolean withText, boolean withImage) Create named buttonstatic final booleanIs button with image icon the current default UI preferencestatic final booleanIs button with text label the current default UI preference
-
Constructor Details
-
ButtonFactory
public ButtonFactory()
-
-
Method Details
-
isWithText
public static final boolean isWithText()Is button with text label the current default UI preference- Returns:
- true if button should have text label
-
isWithImage
public static final boolean isWithImage()Is button with image icon the current default UI preference- Returns:
- true if button should include an image icon
-
createNamedButton
Create named button with default style- Parameters:
name-- Returns:
- new button instance
-
createNamedButton
Create named button- Parameters:
name- button name.
Button created with name="btn"+name and include css class of "btn-"+lower(name).
If withText is true, the name will be used to lookup the button label from ad_message.withText- text buttonwithImage- image button- Returns:
- new button instance
-
createButton
Create button- Parameters:
label-image-tooltiptext-- Returns:
- new button instance
-