public final class SingleItemTemplate extends BasicTemplate implements ItemTemplate
An item can consist of: A title, a description, and an optional number of actions that can be performed on the item.
Each action can also have a separate 'configure' action associated with it.
| Modifier and Type | Class and Description |
|---|---|
static class |
SingleItemTemplate.Severity |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIGURE
Actions that can be configured will have a 'configure' button placed next to the action.
|
contentACTION_CLOSE_INFOTIP_CMD, ACTION_REMOVE_TEMPLATE_CMD, ACTION_SIZE_CHANGED_CMD| Constructor and Description |
|---|
SingleItemTemplate(SingleItemTemplate.Severity severity,
java.lang.String title,
java.lang.String description,
java.util.List<? extends javax.swing.Action> actions,
InfoTipStyles infoTipStyle) |
SingleItemTemplate(SingleItemTemplate.Severity severity,
java.lang.String title,
java.lang.String description,
java.util.List<? extends javax.swing.Action> actions,
InfoTipStyles infoTipStyle,
int maxWidth) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPreferredWidth()
Returns preffered width of this template regardless of prior calls to
ItemTemplate.setPreferredWidth(int). |
void |
setHover(InfoTipHover hover)
Deprecated.
There is no need to supply the InfoTipHover to the template directly. Request to the info tip are now
handled through action listeners in
ActionTemplate. |
void |
setPreferredWidth(int width)
Sets the preferred width of this template.
|
addActionListener, fireActionPerformed, getContent, removeActionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddActionListener, removeActionListenergetContentpublic static final java.lang.String CONFIGURE
public SingleItemTemplate(SingleItemTemplate.Severity severity, java.lang.String title, java.lang.String description, java.util.List<? extends javax.swing.Action> actions, InfoTipStyles infoTipStyle)
public SingleItemTemplate(SingleItemTemplate.Severity severity, java.lang.String title, java.lang.String description, java.util.List<? extends javax.swing.Action> actions, InfoTipStyles infoTipStyle, int maxWidth)
public void setHover(InfoTipHover hover)
ActionTemplate.public int getPreferredWidth()
ItemTemplateItemTemplate.setPreferredWidth(int). Width
should be derived from some important components in the template (for example from title label).getPreferredWidth in interface ItemTemplatepublic void setPreferredWidth(int width)
ItemTemplatesetPreferredWidth in interface ItemTemplate