diff --git a/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/Constants.java b/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/Constants.java index 43bf0f4d0c..ca77c9268b 100644 --- a/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/Constants.java +++ b/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/Constants.java @@ -28,13 +28,13 @@ * Constants used on the script generator page. */ final class Constants { - protected static final String BUTTON_TITLE_SAVE = "Save Script"; - protected static final String BUTTON_TITLE_SAVE_AS = "Save Script As"; - protected static final String BUTTON_TITLE_LOAD = "Load Script"; + protected static final String BUTTON_TITLE_SAVE = "Save"; + protected static final String BUTTON_TITLE_SAVE_AS = "Save As"; + protected static final String BUTTON_TITLE_LOAD = "Load"; - protected static final String BUTTON_TITLE_ADD_ROW_TO_END = "Add Row to End"; - protected static final String BUTTON_TITLE_INSERT_ROW_BELOW = "Insert Row Below"; - protected static final String BUTTON_TITLE_DELETE_ROWS = "Clear All Rows"; + protected static final String BUTTON_TITLE_ADD_ROW_TO_END = "Add to End"; + protected static final String BUTTON_TITLE_INSERT_ROW_BELOW = "Insert Below"; + protected static final String BUTTON_TITLE_DELETE_ROWS = "Clear All"; protected static final String CHECKBOX_TITLE_PARAM_TRANSFER = "Transfer Compatible Parameters"; protected static final String CHECKBOX_TITLE_INVALID_PAUSE = "Invalid Actions are Paused on"; diff --git a/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/ScriptGeneratorView.java b/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/ScriptGeneratorView.java index c461bd1767..2f9b429d1e 100644 --- a/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/ScriptGeneratorView.java +++ b/base/uk.ac.stfc.isis.ibex.ui.scriptgenerator/src/uk/ac/stfc/isis/ibex/ui/scriptgenerator/views/ScriptGeneratorView.java @@ -51,6 +51,7 @@ import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.Group; import uk.ac.stfc.isis.ibex.preferences.PreferenceSupplier; import uk.ac.stfc.isis.ibex.scriptgenerator.ScriptGeneratorProperties; @@ -344,6 +345,7 @@ private Composite makeGrid(Composite parent, int columns, boolean equal, int mar private void makeToggleParameterTransfer(Composite parent) { Composite actionsControlsGrp = makeGrid(parent, 1, true, 10); + actionsControlsGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); new IBEXButton(actionsControlsGrp, SWT.CHECK, event -> { boolean enabled = ((Button) event.widget).getSelection(); @@ -356,6 +358,7 @@ private void makeToggleParameterTransfer(Composite parent) { private void makeToggleInvalidPauseSkip(Composite parent) { Composite actionsControlsGrp = makeGrid(parent, 1, true, 10); + actionsControlsGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); // Pause new IBEXButton(actionsControlsGrp, SWT.RADIO, event -> { @@ -375,13 +378,16 @@ private void makeToggleInvalidPauseSkip(Composite parent) { } /** - * Creates a column containing three buttons for table row modifications. + * Creates a row containing three buttons for table row modifications. * * @param parent the containing Composite */ private void makeTableRowControlButtons(Composite parent) { - // Composite for laying out new/delete/duplicate action buttons - Composite actionsControlsGrp = makeGrid(parent, 1, true, 10); + // Group for laying out new/delete/duplicate action buttons + Group actionsControlsGrp = new Group(parent, SWT.NONE); + actionsControlsGrp.setText("Row Operations"); + actionsControlsGrp.setLayout(new GridLayout(3, false)); + actionsControlsGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); // Make buttons for insert new/delete/duplicate actions btnAddAction = new IBEXButton(actionsControlsGrp, SWT.NONE, event -> { @@ -407,13 +413,16 @@ private void makeTableRowControlButtons(Composite parent) { } /** - * Creates a column containing three buttons for save, save as, and load script. + * Creates a row containing three buttons for save, save as, and load script. * * @param parent the containing Composite */ private void makeScriptSaveLoadButtons(Composite parent) { - // Composite for generate buttons - Composite generateButtonsGrp = makeGrid(parent, 1, true, 10); + // Group for script operation buttons + Group generateButtonsGrp = new Group(parent, SWT.NONE); + generateButtonsGrp.setText("Script Operations"); + generateButtonsGrp.setLayout(new GridLayout(3, false)); + generateButtonsGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); // Buttons to generate a script generateScriptButton = new IBEXButton(generateButtonsGrp, SWT.NONE, event -> { @@ -449,8 +458,11 @@ private void makeDynamicScriptingControlButtons(Composite parent) { errorLabel.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true)); errorLabel.setForeground(new Color(255, 0, 0)); - // Composite for generate buttons - Composite dynamicScriptingButtonsGrp = makeGrid(parent, 3, true, 10); + // Group for dynamic scripting buttons + Group dynamicScriptingButtonsGrp = new Group(parent, SWT.NONE); + dynamicScriptingButtonsGrp.setText("Run Operations"); + dynamicScriptingButtonsGrp.setLayout(new GridLayout(3, false)); + dynamicScriptingButtonsGrp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); // Button to run/pause/stop script in nicos runButton = new IBEXButton(dynamicScriptingButtonsGrp, SWT.NONE)