public class BasicTemplate extends java.lang.Object implements Template, Closeable
Note: To conform to ui standards and create a consistent user interface a specific template implementation from this package should be used in preference to creating a custom template.
The template also contains a basic action listener framework. Templates can close their hovers by firing ACTION_CLOSE_CMD, or can fire custom actions.
| Modifier and Type | Field and Description | 
|---|---|
protected javax.swing.JComponent | 
content  | 
ACTION_CLOSE_CMD| Constructor and Description | 
|---|
BasicTemplate(javax.swing.JComponent content)
Create a template with custom content. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addActionListener(java.awt.event.ActionListener l)
Add an actionListener to receive actions such as close from the Template. 
 | 
protected void | 
fireActionPerformed(java.lang.String command)
Notifies all listeners that an action has occurred. 
 | 
javax.swing.JComponent | 
getContent()  | 
void | 
removeActionListener(java.awt.event.ActionListener l)
Remove an previously added ActionListener. 
 | 
public BasicTemplate(javax.swing.JComponent content)
content -public javax.swing.JComponent getContent()
getContent in interface Templatepublic void addActionListener(java.awt.event.ActionListener l)
CloseableaddActionListener in interface Closeablepublic void removeActionListener(java.awt.event.ActionListener l)
CloseableremoveActionListener in interface Closeableprotected void fireActionPerformed(java.lang.String command)
command - the cmd string to notify listeners (e.g. Closeable.ACTION_CLOSE_CMD to close the hover).