Class TextIconTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.ComponentBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.SimpleComponentTag
-
- net.sf.jguiraffe.gui.builder.components.tags.TextIconTag
-
- All Implemented Interfaces:
ConditionalTag
,IconSupport
,org.apache.commons.jelly.Tag
- Direct Known Subclasses:
LabelTag
public abstract class TextIconTag extends SimpleComponentTag implements IconSupport
A base class for simple components that support a display text and an icon.
This abstract base class provides common functionality for maintaining the data needed by components that support text and an icon. A basic set of attributes is supported. Derived classes only have to define their specific attributes and deal with the creation of the corresponding component.
- Version:
- $Id: TextIconTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TextIconTag()
Creates a new instance ofTextIconTag
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkAttributes()
Checks if all mandatory attributes are defined.TextIconData
getTextIconData()
Returns the text icon data object associated with this tag.void
setAlignment(String al)
Setter method of the alignment attribute.void
setIcon(Object icon)
Setter method for the icon attribute.void
setMnemonic(String m)
Setter method of the mnemonic attribute.void
setMnemonicres(String resID)
Setter method of the mnemonicres attribute.void
setResgrp(String resgrp)
Setter method for the resgrp attribute.void
setText(String text)
Setter method for the text attribute.void
setTextres(String textres)
Setter method for the textres attribute.-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.SimpleComponentTag
createComponent, getComponent, process, processBeforeBody
-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.ComponentBaseTag
getBackColor, getBackgroundColor, getConstraints, getFont, getFontRef, getForeColor, getForegroundColor, getName, getToolTipData, insertComponent, setBackColor, setConstraints, setFont, setFontRef, setForeColor, setName, setTooltip, setTooltipres, setTooltipresgrp
-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
canProcess, canProcess, convertToClass, convertToNumberWithUnit, convertToNumberWithUnit, doTag, findContainer, getBuilderData, getBuilderData, getIfName, getResourceText, getResourceText, getUnlessName, setIfName, setUnlessName
-
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
-
-
-
-
Method Detail
-
getTextIconData
public TextIconData getTextIconData()
Returns the text icon data object associated with this tag.- Returns:
- the text icon data object
-
setIcon
public void setIcon(Object icon)
Setter method for the icon attribute.- Specified by:
setIcon
in interfaceIconSupport
- Parameters:
icon
- the icon
-
setText
public void setText(String text)
Setter method for the text attribute.- Parameters:
text
- the text to set
-
setResgrp
public void setResgrp(String resgrp)
Setter method for the resgrp attribute. Defines the group for resolving the resource for the component's text.- Parameters:
resgrp
- the resource group
-
setTextres
public void setTextres(String textres)
Setter method for the textres attribute. Specifies the resource ID for resolving the component's text- Parameters:
textres
- the text resource ID
-
setAlignment
public void setAlignment(String al)
Setter method of the alignment attribute.- Parameters:
al
- the attribute value
-
setMnemonic
public void setMnemonic(String m)
Setter method of the mnemonic attribute.- Parameters:
m
- the attribute value
-
setMnemonicres
public void setMnemonicres(String resID)
Setter method of the mnemonicres attribute.- Parameters:
resID
- the attribute value
-
checkAttributes
protected void checkAttributes() throws org.apache.commons.jelly.MissingAttributeException
Checks if all mandatory attributes are defined.- Throws:
org.apache.commons.jelly.MissingAttributeException
- if attributes are missing
-
-