package commands.viewCommands;

import backendExceptions.BackendException;

import commands.ViewCommand;
import commands.information.BaseGridContainer;

public class SetBackgroundCommand extends ViewCommand {

    // TODO: Add the GUI function to call
    private static final String SET_BACKGROUND_IMAGE = "";

    public SetBackgroundCommand (String command, boolean isExpression) throws BackendException {
        super(command, isExpression);
    }

    @Override
    protected double onExecute () throws BackendException {
        BaseGridContainer grid = getGridContainer();
        double bgIndex = getExpressionList()[0].execute();
        grid.updateDisplayOptions(SET_BACKGROUND_IMAGE, bgIndex);
        return bgIndex;
    }

    @Override
    protected int getArgumentCount () {
        return 1;
    }

}

@@ -25,16 +25,68 @@
 mands;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0A
 import b
@@ -120,17 +120,16 @@
 eption;%0A
-%0A
 import c
@@ -352,16 +352,31 @@
 MAGE = %22
+backgroundColor
 %22;%0A%0A    
@@ -695,24 +695,118 @@
 .execute();%0A
+        List%3CDouble%3E bgIndexList = new ArrayList%3CDouble%3E();%0A        bgIndexList.add(bgIndex);%0A
         grid
@@ -852,24 +852,28 @@
 AGE, bgIndex
+List
 );%0A        r

Set background change