|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.GroupTablePopupMenuCustomizer
public class GroupTablePopupMenuCustomizer
A TableHeaderPopupMenuCustomizer
for AggregateTable
. To use it, you can use the code like
this.
The
TableHeaderPopupMenuInstaller installer = new TableHeaderPopupMenuInstaller(aggregateTable)
installer.addTableHeaderPopupMenuCustomizer(new AggregateTablePopupMenuCustomizer());
AggregateTablePopupMenuCustomizer
will add the "Group", "Ungroup", "Expand" and "Collapse" etc menu
items to the popup menu.
Field Summary | |
---|---|
static String |
CONTEXT_MENU_COLLAPSE
|
static String |
CONTEXT_MENU_COLLAPSE_ALL
|
static String |
CONTEXT_MENU_EXPAND
|
static String |
CONTEXT_MENU_EXPAND_ALL
|
static String |
CONTEXT_MENU_GROUP
|
static String |
CONTEXT_MENU_UNGROUP
CONTEXT_MENU_... |
Constructor Summary | |
---|---|
GroupTablePopupMenuCustomizer()
|
Method Summary | |
---|---|
void |
customizePopupMenu(JTableHeader header,
JPopupMenu popup,
int clickingColumn)
The method generates the context menu items by clickingColumn. |
int[] |
getGroupableColumns()
Gets the grouped columns. |
protected String |
getResourceString(String key)
Gets the localized string from resource bundle. |
void |
setGroupableColumns(int[] groupableColumns)
Sets the groupable columns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONTEXT_MENU_UNGROUP
customizePopupMenu(javax.swing.table.JTableHeader, javax.swing.JPopupMenu, int)
,
Constant Field Valuespublic static final String CONTEXT_MENU_GROUP
public static final String CONTEXT_MENU_EXPAND
public static final String CONTEXT_MENU_COLLAPSE
public static final String CONTEXT_MENU_EXPAND_ALL
public static final String CONTEXT_MENU_COLLAPSE_ALL
Constructor Detail |
---|
public GroupTablePopupMenuCustomizer()
Method Detail |
---|
public int[] getGroupableColumns()
setGroupableColumns(int[])
to set the columns.
public void setGroupableColumns(int[] groupableColumns)
groupableColumns
- the groupable columnsprotected String getResourceString(String key)
key
- the resource string key
public void customizePopupMenu(JTableHeader header, JPopupMenu popup, int clickingColumn)
for (int i = 0; i < popup.getComponentCount(); i++) {
if (CONTEXT_MENU_UNGROUP.equals(popup.getComponent(i).getName())) {
popup.remove(popup.getComponent(i));
}
}
customizePopupMenu
in interface TableHeaderPopupMenuCustomizer
header
- the table headerpopup
- the popup menu to be displayedclickingColumn
- the column index clicked
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |