public class ContextMenuItem
extends java.lang.Object
The ContextMenuItem defines a context menu item shown in the context menu of the query result table. ContextMenuItem can be defined declaratively in the tpc-config.xml in the connector as follows,
<contextMenuDef>
<menuItemDef label="${ctransBean.label}"
enabled="${ctransBean.enabled}"
listenerRef="ctransBean"/>
</contextMenuDef>
Here ctransBean is a managed bean defined and implemented in the connector and registered in the tpc-config.xml. For more detail, please see the tpc conenctor development guideline.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_ENABLED |
static java.lang.String |
ATTR_LABEL |
static java.lang.String |
ATTR_VISIBLE |
static java.lang.String |
NAME |
static ContextMenuItem |
SEPARATOR |
| Constructor and Description |
|---|
ContextMenuItem()
Constructor
|
ContextMenuItem(java.lang.String name)
Constuct the context menu item with name.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getActionListener() |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
The attribute map contains all attribtue setting on the context menu item object, currently, there are three published attributes: ContextMenuItem.ATTR_LABEL(of String type), ContextMenuItem.ATTR_VISIBLE (of boolean type), ContextMenuItem.ATTR_ENABLED (of boolean type)
|
java.lang.String |
getName()
Return the name of the context menu item.
|
void |
release() |
void |
setActionListener(java.lang.Object listener)
Set the listener object on the context menu item.
|
void |
setName(java.lang.String name)
Set the name of the context menu item.
|
public static final java.lang.String ATTR_LABEL
public static final java.lang.String ATTR_ENABLED
public static final java.lang.String ATTR_VISIBLE
public static final java.lang.String NAME
public static final ContextMenuItem SEPARATOR
public ContextMenuItem()
public ContextMenuItem(java.lang.String name)
name - The name of the context menu item.public void setName(java.lang.String name)
name - the name of the context menu item.public java.lang.String getName()
public void setActionListener(java.lang.Object listener)
java.awt.ActionListener.listener - The corresponding listener objectpublic java.lang.Object getActionListener()
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
public void release()