Index: gli/trunk/src/org/greenstone/gatherer/gui/OptionsPane.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gui/OptionsPane.java	(revision 16132)
+++ gli/trunk/src/org/greenstone/gatherer/gui/OptionsPane.java	(revision 16133)
@@ -69,8 +69,10 @@
     static final public char CANCELLED = 'c';
     static final public char UNKNOWN = 'x';
+    static final public char SCHEDULED = 'd'; 
 
     static private int BUILD = 0;
     static private int IMPORT = 1;
-    static private int MINIMUM_ROWS = 11;
+    static private int SCHEDULE = 2; 
+    static private int MINIMUM_ROWS = 15;
     
     /** All process messages are written to this log text area. */
@@ -82,4 +84,5 @@
     private ScriptOptions build_options = null;
     private ScriptOptions import_options = null;
+    private ScriptOptions schedule_options = null;
 
     private FileEntry file_entry = null;
@@ -93,7 +96,8 @@
 
     /** The default constructor creates the few session length options, but either retrieves the rest from the current collection, or creates a default set of options. */
-    public OptionsPane(ScriptOptions import_options, ScriptOptions build_options) {
+    public OptionsPane(ScriptOptions import_options, ScriptOptions build_options, ScriptOptions schedule_options) {
 	this.build_options = build_options;
 	this.import_options = import_options;
+	this.schedule_options = schedule_options; 
 	this.current_controls = new ArrayList();
 	this.writing_documents = new Vector();
@@ -172,4 +176,64 @@
       build_arguments = null;
       return pane;
+    }
+
+    /**Wendy's attempt at writing a buildSchedule Jpanel. */
+    public JPanel buildSchedule(JPanel pane) {
+	//reset the arguments
+	if(pane ==  null) {
+	    current_controls.clear(); 
+	}
+
+	ArrayList schedule_arguments = new ArrayList(); 
+	int current_mode = Configuration.getMode(); 
+
+	int total_schedule_argument_count = schedule_options.getArgumentCount();
+      
+      for(int i = 0; i < total_schedule_argument_count; i++) {
+        // Retrieve the argument so we know how to format the control.
+        Argument argument = schedule_options.getArgument(i);
+        
+        //A hack to make the disable_OAI option visible in the GLI for Greenstone 3
+        if(argument.getName().equals(StaticStrings.DISABLEOAI_STR) && Gatherer.GS3) {
+          argument.setHiddenGLI(false);
+        }
+        if(!argument.isHiddenGLI() && argument.getModeLevel() <= current_mode) {
+          // Now attempt to retrieve any existing value for this argument.
+          boolean enabled = schedule_options.getValueEnabled(argument.getName());
+          String value = schedule_options.getValue(argument.getName());
+          MyArgumentControl argument_control = new MyArgumentControl(SCHEDULE, argument, enabled, value);
+          schedule_arguments.add(argument_control);
+        }
+      }
+      current_controls.addAll(schedule_arguments);
+      
+      // Now that we know how many arguments there are we can build the pane to view them on. Modes lower than EXPERT can provide a previous pane on which to add the arguments.
+      if(pane == null || current_mode >= Configuration.EXPERT_MODE) {
+        pane = new JPanel();
+        pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
+        int argument_count = schedule_arguments.size();
+        // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number of lines in the grid layout
+        if(current_mode >= Configuration.EXPERT_MODE) {
+          if(argument_count < MINIMUM_ROWS) {
+            argument_count = MINIMUM_ROWS;
+          }
+          pane.setLayout(new GridLayout(argument_count, 1, 5, 5));
+        }
+        // Otherwise we're just going to throw them on one after another and chuck it in a scroll pane anyway
+        else {
+          // use  GridLayout with 0 rows == as many rows as needed. Unfortunately, rows will
+          // grow fat if space too large, but we don't know how many rows we'll need yet.
+          pane.setLayout(new GridLayout(0, 1, 5, 5));
+        }
+      }
+      
+      for(int j = 0; j < schedule_arguments.size(); j++) {
+        pane.add((JComponent)schedule_arguments.get(j));
+      }
+      pane.addMouseListener(this);
+      schedule_arguments = null;
+      return pane;
+
     }
 
@@ -411,4 +475,7 @@
 		    build_options.removeValue(name);
 		}
+		else if(type == SCHEDULE) {
+		    schedule_options.removeValue(name); 
+		}
 		else {
 		    import_options.removeValue(name);
@@ -419,4 +486,7 @@
 		if(type == BUILD) {
 		    build_options.setValue(name, enable, value);
+		}
+		else if(type == SCHEDULE) {
+		    schedule_options.setValue(name, enable, value); 
 		}
 		else {
@@ -512,4 +582,7 @@
 		case CANCELLED:
 		    d.append(Dictionary.get("OptionsPane.Cancelled"));
+		    break;
+		case SCHEDULED:
+		    d.append(Dictionary.get("OptionsPane.Scheduled"));
 		    break;
 		default:
