Package com.kheops.ui.component
Class ButtonDef
java.lang.Object
com.kheops.ui.component.ButtonDef
- All Implemented Interfaces:
- Cloneable
A ButtonDef is use to define options (icon, text, etc) for a 
Button.- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()Clones this ButtonDefGets the action name for this button definition.Gets the text for this button definition.getFont()Returns the button text font.getIcon()Gets the original icon (set by the constructor).Returns a disabled icon.booleanReturns true if the text and/or the icon is centered on the button.booleanvoidSets the button text font.voidSets the icon to use.voidSets the text for this button definition.voidsetUpdateToPopupSelection(boolean updateToPopupSelection) If true (default), set this ButtonDef active if the main button has a ButtonGroup.
- 
Constructor Details- 
ButtonDefConstructs a ButtonDef.- Parameters:
- actionName- the action name that will be fired (required)
- icon- an icon to display (optional)
- buttonText- the text to display (optional)
- centerIconText- is the icon and / or the text will be centered
 
- 
ButtonDefpublic ButtonDef(String actionName, ImageIcon icon, String buttonText, boolean centerIconText, Font buttonTextFont) Constructs a ButtonDef.- Parameters:
- actionName- the action name that will be fired (required)
- icon- an icon to display (optional)
- buttonText- the text to display (optional)
- centerIconText- is the icon and / or the text will be centered
- buttonTextFont- the button text font
 
 
- 
- 
Method Details- 
getActionNameGets the action name for this button definition.- Returns:
- the action name
 
- 
getIconGets the original icon (set by the constructor). Can benull- Returns:
- the icon
 
- 
setIconSets the icon to use.nullfor none- Parameters:
- icon- an icon
 
- 
getButtonTextGets the text for this button definition. Can benull- Returns:
- the text
 
- 
setTextSets the text for this button definition.nullfor none- Parameters:
- buttonText- the new text
 
- 
isCenterIconTextpublic boolean isCenterIconText()Returns true if the text and/or the icon is centered on the button.- Returns:
- text / icon center status
 
- 
getIconDisabledReturns a disabled icon. This icon is generated when the original icon is set.- Returns:
- a disabled icon
 
- 
getFontReturns the button text font. The default value isUIManager.getFont("Label.font")- Returns:
- button text font
 
- 
setFontSets the button text font. Ifnullis passed, the default UI font will be set.- Parameters:
- font-
 
- 
setUpdateToPopupSelectionpublic void setUpdateToPopupSelection(boolean updateToPopupSelection) If true (default), set this ButtonDef active if the main button has a ButtonGroup.- Parameters:
- updateToPopupSelection-
 
- 
isUpdateToPopupSelectionpublic boolean isUpdateToPopupSelection()
- 
cloneClones this ButtonDef
 
-