myGrid

Connect output list too long, extends beyond bottom of the screen

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.4, 1.5
  • Fix Version/s: 1.6
  • Component/s: Taverna GUI
  • Labels:
    None

Description

Edward Kawas reports on 2006-10-05 to taverna-hackers:

When sufficient services have been added into a workflow, the "connect output
to" popup window extends beyond the bottom of the screen, and you do not have
mouse-access to the bottom-most services in that list to connect them. That
menu needs to have a cascading "More >" option at the bottom of it when it gets
too long.

This issue has also been reported previously by Paul Fisher, but I couldn't find any bugs on that in Jira.

Activity

Hide
Stuart Owen added a comment - 2007-04-27 16:34

Needs checking

Show
Stuart Owen added a comment - 2007-04-27 16:34 Needs checking
Hide
Ian Dunlop added a comment - 2007-08-09 09:37

I have had a look at the latest release and it does happen. You need to add about 45 outputs at which point the ends of the connect to>workflow outputs drop down disappear off the bottom of the screen. I will have a look at the code and see if there is any way to fix it (maybe there is a property on the swing component?). You can actually still access the missing outputs by putting the mouse focus on the list and using the arrow keys but you have to guess when you have selected the output you want.

Show
Ian Dunlop added a comment - 2007-08-09 09:37 I have had a look at the latest release and it does happen. You need to add about 45 outputs at which point the ends of the connect to>workflow outputs drop down disappear off the bottom of the screen. I will have a look at the code and see if there is any way to fix it (maybe there is a property on the swing component?). You can actually still access the missing outputs by putting the mouse focus on the list and using the arrow keys but you have to guess when you have selected the output you want.
Hide
Ian Dunlop added a comment - 2007-08-09 13:53

org.embl.ebi.escience.scufl.shared.LinkingMenus needs some code added to handle when the number of outputs is more than 20 or so. The other outputs will be available via a sub-menu off the main output pop up menu (via putting your mouse on the "More" option). A code sample is below. We may want to have multiple sub-menus every 20 outputs.

JMenu expansion = null;
boolean added = false;

for (int i = 0; i < wsp.length; i++) {
if (i>20) { //new line
if (!added) { //new line expansion = new JMenu("More"); //new line workflowSinks.add(expansion); //new line added = true; // new line }
expansion.add(new AddDataConstraintAction(model, fromPort,
wsp[i])); //new line
} else { workflowSinks.add(new AddDataConstraintAction(model, fromPort, wsp[i])); }

Show
Ian Dunlop added a comment - 2007-08-09 13:53 org.embl.ebi.escience.scufl.shared.LinkingMenus needs some code added to handle when the number of outputs is more than 20 or so. The other outputs will be available via a sub-menu off the main output pop up menu (via putting your mouse on the "More" option). A code sample is below. We may want to have multiple sub-menus every 20 outputs. JMenu expansion = null; boolean added = false; for (int i = 0; i < wsp.length; i++) { if (i>20) { //new line if (!added) { //new line expansion = new JMenu("More"); //new line workflowSinks.add(expansion); //new line added = true; // new line } expansion.add(new AddDataConstraintAction(model, fromPort, wsp[i])); //new line } else { workflowSinks.add(new AddDataConstraintAction(model, fromPort, wsp[i])); }
Hide
Ian Dunlop added a comment - 2007-08-10 10:31

It seems that swing has no default way to pop up multiple menus so I have written some code do do cascading menus based on an arbitrary size of items in each pop-up list. The code is not very pretty but it works (suggestions welcome). It will create a new "Menu" every 20 items. It starts by adding the first 20 items to the original JMenu and then iterates through the rest, adding a sub menu every 20 items.

//code for multiple cascading menus
JMenu tempMenu = null;
JMenu newTempMenu = null;
boolean set = false;
int cascadeSize = 20; //how many outputs do we want in a pop-up menu
for (int i = 0; i < wsp.length; i++) {
if (i>(cascadeSize-1) && !set) {
//add inner menus
set = true;
for (int j=1; j< (Math.ceil((wsp.length)/cascadeSize))1;j+) {
JMenu exp = new JMenu("More");
for (int x=(j*cascadeSize);x<((j*cascadeSize)cascadeSize);x+) {
if (x<wsp.length) { //don't add any null values exp.add(new AddDataConstraintAction(model, fromPort, wsp[x])); }
}
newTempMenu = exp;
tempMenu.add(newTempMenu);
tempMenu=newTempMenu;
}
} else {
if (!set) { //add outer menu workflowSinks.add(new AddDataConstraintAction(model, fromPort, wsp[i])); tempMenu = workflowSinks; }
}
}

Show
Ian Dunlop added a comment - 2007-08-10 10:31 It seems that swing has no default way to pop up multiple menus so I have written some code do do cascading menus based on an arbitrary size of items in each pop-up list. The code is not very pretty but it works (suggestions welcome). It will create a new "Menu" every 20 items. It starts by adding the first 20 items to the original JMenu and then iterates through the rest, adding a sub menu every 20 items. //code for multiple cascading menus JMenu tempMenu = null; JMenu newTempMenu = null; boolean set = false; int cascadeSize = 20; //how many outputs do we want in a pop-up menu for (int i = 0; i < wsp.length; i++) { if (i>(cascadeSize-1) && !set) { //add inner menus set = true; for (int j=1; j< (Math.ceil((wsp.length)/cascadeSize))1;j+) { JMenu exp = new JMenu("More"); for (int x=(j*cascadeSize);x<((j*cascadeSize)cascadeSize);x+) { if (x<wsp.length) { //don't add any null values exp.add(new AddDataConstraintAction(model, fromPort, wsp[x])); } } newTempMenu = exp; tempMenu.add(newTempMenu); tempMenu=newTempMenu; } } else { if (!set) { //add outer menu workflowSinks.add(new AddDataConstraintAction(model, fromPort, wsp[i])); tempMenu = workflowSinks; } } }
Hide
Stian Soiland-Reyes added a comment - 2007-08-13 13:05

Seems all-right until you reach about 600 inputs. See attached workflow biggie.xml and try to connect to something in the nested workflow.

However, the bug reported by Fisher is really concerned about the number of processors, not their inputs. So the same trick will have to be used for the listing of processors. Again, see attached workflow.

BTW, is it possible to say "Abracadabra to Fishsoup" instead of "1 to 15" ? Ie. the name of the first and last item.. would be neat.

Show
Stian Soiland-Reyes added a comment - 2007-08-13 13:05 Seems all-right until you reach about 600 inputs. See attached workflow biggie.xml and try to connect to something in the nested workflow. However, the bug reported by Fisher is really concerned about the number of processors, not their inputs. So the same trick will have to be used for the listing of processors. Again, see attached workflow. BTW, is it possible to say "Abracadabra to Fishsoup" instead of "1 to 15" ? Ie. the name of the first and last item.. would be neat.
Hide
Ian Dunlop added a comment - 2007-08-15 14:29

Changed the menu code in ScuflContextMenuFactory.getProcessorMenu & LinkingMenus.linkFrom. These now cascade instead of going outside the screen. Changed the Inputs x to y dialogue to say the name of the output (althought the only workflow I had to test it had the inputs as 1,2,3, etc!).

Show
Ian Dunlop added a comment - 2007-08-15 14:29 Changed the menu code in ScuflContextMenuFactory.getProcessorMenu & LinkingMenus.linkFrom. These now cascade instead of going outside the screen. Changed the Inputs x to y dialogue to say the name of the output (althought the only workflow I had to test it had the inputs as 1,2,3, etc!).

People

Vote (0)
Watch (0)

Dates

  • Created:
    2006-10-06 10:05
    Updated:
    2007-08-16 10:13
    Resolved:
    2007-08-16 10:13