From bc08a23d30b253ff1b976defe8d9bc9339bd0f75 Mon Sep 17 00:00:00 2001 From: tcarver <tjc> Date: Thu, 11 Aug 2011 15:16:41 +0100 Subject: [PATCH] changes to allow for loading graphs into ACT from the command line with -DuserplotX (where X is the sequence number) system properties --- uk/ac/sanger/artemis/components/GraphMenu.java | 9 +++++---- uk/ac/sanger/artemis/components/MultiComparator.java | 9 +-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/uk/ac/sanger/artemis/components/GraphMenu.java b/uk/ac/sanger/artemis/components/GraphMenu.java index 449c3afb5..72b05f3cd 100644 --- a/uk/ac/sanger/artemis/components/GraphMenu.java +++ b/uk/ac/sanger/artemis/components/GraphMenu.java @@ -107,7 +107,8 @@ public class GraphMenu extends JMenu final BasePlotGroup base_plot_group, final FeatureDisplay feature_display, final String menu_name, - final JSplitPane splitPane) + final JSplitPane splitPane, + final int index) { super (menu_name); this.frame = frame; @@ -244,9 +245,9 @@ public class GraphMenu extends JMenu } // add user plots from the command line JVM option - if(System.getProperty("userplot") != null) + if(System.getProperty("userplot"+ (index > 0 ? index : "")) != null) { - String plots[] = System.getProperty("userplot").split("[\\s,]"); + String plots[] = System.getProperty("userplot"+ (index > 0 ? index : "")).split("[\\s,]"); try { for(int i=0;i<plots.length; i++) @@ -294,7 +295,7 @@ public class GraphMenu extends JMenu final FeatureDisplay feature_display, final JSplitPane splitPane) { - this (frame, entry_group, base_plot_group, feature_display, "Graph",splitPane); + this (frame, entry_group, base_plot_group, feature_display, "Graph",splitPane, -1); } /** diff --git a/uk/ac/sanger/artemis/components/MultiComparator.java b/uk/ac/sanger/artemis/components/MultiComparator.java index f8528bd93..751605414 100644 --- a/uk/ac/sanger/artemis/components/MultiComparator.java +++ b/uk/ac/sanger/artemis/components/MultiComparator.java @@ -711,13 +711,6 @@ public class MultiComparator extends JFrame sub_menu_name); create_menu.add(this_create_menu); - /*final WriteMenu this_write_menu = - new WriteMenu(this, - getSelectionArray()[i], - getEntryGroupArray()[i], - sub_menu_name); - write_menu.add(this_write_menu);*/ - if(Options.isUnixHost()) { final RunMenu this_run_menu = @@ -733,7 +726,7 @@ public class MultiComparator extends JFrame getEntryGroupArray()[i], getBasePlotGroupArray()[i], getFeatureDisplayArray()[i], - sub_menu_name, null); + sub_menu_name, null, i+1); graph_menu.add(this_graph_menu); } -- GitLab