use of org.cytoscape.task.TableColumnTaskFactory in project cytoscape-impl by cytoscape.
the class PopupMenuHelper method createColumnHeaderMenu.
public void createColumnHeaderMenu(final CyColumn column, final Class<? extends CyIdentifiable> tableType, final Component invoker, final int x, final int y) {
if (tableColumnFactoryMap.isEmpty())
return;
final JPopupMenu menu = new JPopupMenu();
final PopupMenuGravityTracker tracker = new PopupMenuGravityTracker(menu);
for (final Map.Entry<TableColumnTaskFactory, Map<?, ?>> mapEntry : tableColumnFactoryMap.entrySet()) {
TableColumnTaskFactory taskFactory = mapEntry.getKey();
TaskFactory provisioner = factoryProvisioner.createFor(taskFactory, column);
createMenuItem(provisioner, tracker, mapEntry.getValue(), tableType);
}
if (menu.getSubElements().length > 0)
menu.show(invoker, x, y);
}
Aggregations