|
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.pivot.AggregateTablePopupMenuCustomizer
public class AggregateTablePopupMenuCustomizer
A TableHeaderPopupMenuCustomizer
for AggregateTable
and AggregateTablePane
. 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. For AggregateTablePane
, you need to install the installer to both the main
table and the row header table.
Field Summary | |
---|---|
static String |
CONTEXT_MENU_AUTOMATIC
|
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_SET_SUBTOTAL
|
static String |
CONTEXT_MENU_SET_SUMMARY
|
static String |
CONTEXT_MENU_SHOW_GRAND_TOTAL
|
static String |
CONTEXT_MENU_UNGROUP
CONTEXT_MENU_... |
Constructor Summary | |
---|---|
AggregateTablePopupMenuCustomizer()
|
Method Summary | |
---|---|
void |
customizePopupMenu(JTableHeader header,
JPopupMenu popup,
int clickingColumn)
The method generates the context menu items by clickingColumn. |
int[] |
getAggregatableColumns()
Gets the aggregatable columns. |
protected String |
getResourceString(String key)
Gets the localized string from resource bundle. |
void |
setAggregatableColumns(int[] aggregatableColumns)
Sets the aggregatable 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
public static final String CONTEXT_MENU_SET_SUBTOTAL
public static final String CONTEXT_MENU_SHOW_GRAND_TOTAL
public static final String CONTEXT_MENU_SET_SUMMARY
public static final String CONTEXT_MENU_AUTOMATIC
Constructor Detail |
---|
public AggregateTablePopupMenuCustomizer()
Method Detail |
---|
public int[] getAggregatableColumns()
setAggregatableColumns(int[])
to set the columns.
public void setAggregatableColumns(int[] aggregatableColumns)
aggregatableColumns
- the aggregatable 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_COLLAPSE.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 |