Commit bf85a382 authored by Locatelli's avatar Locatelli
Browse files

Commit changes:

- cameo v2
- Re-structure configuration
- compute remaining estimated time
parent 69422157
...@@ -574,4 +574,7 @@ selectFileLabel=Double click on a file to select it ...@@ -574,4 +574,7 @@ selectFileLabel=Double click on a file to select it
fileChooserToolTip=Open file selector fileChooserToolTip=Open file selector
nbBoxesLabel=Current number of command boxes nbBoxesLabel=Current number of command boxes
upDirectoryMessage=Up directory upDirectoryMessage=Up directory
\ No newline at end of file
estimatedRemainingTimeLabel=Estimated remaining time:
\ No newline at end of file
...@@ -355,6 +355,7 @@ public abstract class AbstractCommandZone { ...@@ -355,6 +355,7 @@ public abstract class AbstractCommandZone {
public abstract boolean isInAForLoop(); public abstract boolean isInAForLoop();
public abstract boolean dropAllowed(); public abstract boolean dropAllowed();
public abstract void delete(CommandBox commandBox); public abstract void delete(CommandBox commandBox);
public abstract void setComputeEstimatedTimeState(boolean state);
public abstract void ghostEntersCommandBox(CommandBox commandBox, boolean onTopHalf, int x, int y, boolean scrollTo); public abstract void ghostEntersCommandBox(CommandBox commandBox, boolean onTopHalf, int x, int y, boolean scrollTo);
public abstract void ghostLeavesTarget(); public abstract void ghostLeavesTarget();
......
...@@ -183,4 +183,10 @@ public class CommandZone extends ModifiableCommandZone { ...@@ -183,4 +183,10 @@ public class CommandZone extends ModifiableCommandZone {
commandZonePeer.onHomeEnd(keyCode); commandZonePeer.onHomeEnd(keyCode);
} }
@Override
public void setComputeEstimatedTimeState(boolean state) {
// TODO Auto-generated method stub
}
} }
\ No newline at end of file
...@@ -130,6 +130,8 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -130,6 +130,8 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
*/ */
public final CommandBox addNewCommandBox(SelectionTreeData selectionTreeData) { public final CommandBox addNewCommandBox(SelectionTreeData selectionTreeData) {
setComputeEstimatedTimeState(false);
// Get a CommandBoxPeer instance // Get a CommandBoxPeer instance
CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithCommandBoxPeer(selectionTreeData.isSettings()); CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithCommandBoxPeer(selectionTreeData.isSettings());
...@@ -158,6 +160,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -158,6 +160,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
} else { } else {
commandZonePeer.delete(commandBoxPeer); commandZonePeer.delete(commandBoxPeer);
} }
setComputeEstimatedTimeState(true);
return commandBox; return commandBox;
} }
...@@ -167,6 +170,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -167,6 +170,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* @param selectionTreeData * @param selectionTreeData
*/ */
public final void addCommandBoxAtBeginning(SelectionTreeData selectionTreeData) { public final void addCommandBoxAtBeginning(SelectionTreeData selectionTreeData) {
setComputeEstimatedTimeState(false);
boolean done = false; boolean done = false;
MainWindowPeer.setRefresh(false); MainWindowPeer.setRefresh(false);
...@@ -196,6 +200,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -196,6 +200,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
} }
MainWindowPeer.setRefresh(true); MainWindowPeer.setRefresh(true);
setComputeEstimatedTimeState(true);
if (done) { if (done) {
refreshZone(); refreshZone();
} }
...@@ -208,6 +213,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -208,6 +213,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* @return * @return
*/ */
public final CommandBox addNewScanContainerCommandBox(SelectionTreeData selectionTreeData) { public final CommandBox addNewScanContainerCommandBox(SelectionTreeData selectionTreeData) {
setComputeEstimatedTimeState(false);
// Get a CommandBoxPeer instance // Get a CommandBoxPeer instance
CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithScanContainerCommandBoxPeer(); CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithScanContainerCommandBoxPeer();
...@@ -234,6 +240,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -234,6 +240,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
} else { } else {
commandZonePeer.delete(commandBoxPeer); commandZonePeer.delete(commandBoxPeer);
} }
setComputeEstimatedTimeState(true);
return scanContainerCommandBox; return scanContainerCommandBox;
} }
...@@ -244,6 +251,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -244,6 +251,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* @return * @return
*/ */
public final CommandBox addNewForLoopCommandBox(SelectionTreeData selectionTreeData) { public final CommandBox addNewForLoopCommandBox(SelectionTreeData selectionTreeData) {
setComputeEstimatedTimeState(false);
// Get a CommandBoxPeer instance // Get a CommandBoxPeer instance
CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithForLoopCommandBoxPeer(); CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithForLoopCommandBoxPeer();
...@@ -272,6 +280,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -272,6 +280,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
} else { } else {
commandZonePeer.delete(commandBoxPeer); commandZonePeer.delete(commandBoxPeer);
} }
setComputeEstimatedTimeState(true);
return forLoopCommandBox; return forLoopCommandBox;
} }
...@@ -294,6 +303,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -294,6 +303,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
*/ */
public final CommandBox addNewGenericCommandBox(SelectionTreeData selectionTreeData, String controllerName, String propertyName, String value) { public final CommandBox addNewGenericCommandBox(SelectionTreeData selectionTreeData, String controllerName, String propertyName, String value) {
setComputeEstimatedTimeState(false);
// Get a CommandBoxPeer instance // Get a CommandBoxPeer instance
CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithGenericCommandBoxPeer(); CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithGenericCommandBoxPeer();
...@@ -333,11 +343,13 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -333,11 +343,13 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
} else { } else {
commandZonePeer.delete(commandBoxPeer); commandZonePeer.delete(commandBoxPeer);
} }
setComputeEstimatedTimeState(true);
return genericCommandBox; return genericCommandBox;
} }
public final IfCommandBox addNewIfCommandBox(SelectionTreeData selectionTreeData) { public final IfCommandBox addNewIfCommandBox(SelectionTreeData selectionTreeData) {
setComputeEstimatedTimeState(false);
// Get a CommandBoxPeer instance // Get a CommandBoxPeer instance
CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithIfCommandBoxPeer(); CommandBoxPeer commandBoxPeer = commandZonePeer.replaceGhostWithIfCommandBoxPeer();
...@@ -368,6 +380,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -368,6 +380,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
} else { } else {
commandZonePeer.delete(commandBoxPeer); commandZonePeer.delete(commandBoxPeer);
} }
setComputeEstimatedTimeState(true);
return ifCommandBox; return ifCommandBox;
} }
...@@ -409,6 +422,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -409,6 +422,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
public final void moveCommandBox(CommandBox commandBoxToMove, CommandBox commandBoxToShift, boolean above) { public final void moveCommandBox(CommandBox commandBoxToMove, CommandBox commandBoxToShift, boolean above) {
setComputeEstimatedTimeState(false);
commandBoxToMove.getCommandZone().getCommandBoxes().remove(commandBoxToMove); commandBoxToMove.getCommandZone().getCommandBoxes().remove(commandBoxToMove);
...@@ -424,6 +438,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -424,6 +438,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
// Graphical update // Graphical update
commandZonePeer.moveCommandBoxPeer(commandBoxToMove, commandBoxToShift, above); commandZonePeer.moveCommandBoxPeer(commandBoxToMove, commandBoxToShift, above);
refreshZone(); refreshZone();
setComputeEstimatedTimeState(true);
} }
/** /**
...@@ -432,6 +447,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -432,6 +447,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* @param commandBoxToShift * @param commandBoxToShift
*/ */
public void moveCommandBox(CommandBox commandBoxToMove) { public void moveCommandBox(CommandBox commandBoxToMove) {
setComputeEstimatedTimeState(false);
CommandBox commandBoxToShift = null; CommandBox commandBoxToShift = null;
boolean above = true; boolean above = true;
...@@ -445,6 +461,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -445,6 +461,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
// do nothing if moving onto itself // do nothing if moving onto itself
if (commandBoxToMove == commandBoxToShift) { if (commandBoxToMove == commandBoxToShift) {
setComputeEstimatedTimeState(true);
return; return;
} }
...@@ -458,6 +475,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -458,6 +475,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
// Graphical update // Graphical update
commandZonePeer.moveCommandBoxPeer(commandBoxToMove, commandBoxToShift, above); commandZonePeer.moveCommandBoxPeer(commandBoxToMove, commandBoxToShift, above);
refreshZone(); refreshZone();
setComputeEstimatedTimeState(true);
} }
/** /**
...@@ -1204,6 +1222,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1204,6 +1222,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* *
*/ */
public void delete(CommandBox commandBox) { public void delete(CommandBox commandBox) {
setComputeEstimatedTimeState(false);
if (commandBox.isSelected()) { if (commandBox.isSelected()) {
selectedCommandBox = null; selectedCommandBox = null;
} }
...@@ -1215,6 +1234,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1215,6 +1234,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
commandBoxes.remove(commandBox); commandBoxes.remove(commandBox);
refreshZone(); refreshZone();
setComputeEstimatedTimeState(true);
} }
...@@ -1222,6 +1242,8 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1222,6 +1242,8 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* *
*/ */
public void delete() { public void delete() {
setComputeEstimatedTimeState(false);
Vector<CommandBox> copyCommandBoxes = new Vector<CommandBox>(commandBoxes); Vector<CommandBox> copyCommandBoxes = new Vector<CommandBox>(commandBoxes);
boolean resetRefresh = false; boolean resetRefresh = false;
...@@ -1240,6 +1262,8 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1240,6 +1262,8 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
MainWindowPeer.setRefresh(true); MainWindowPeer.setRefresh(true);
} }
commandZonePeer.delete(); commandZonePeer.delete();
setComputeEstimatedTimeState(true);
} }
...@@ -1501,6 +1525,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1501,6 +1525,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
* @param commandBox * @param commandBox
*/ */
public final void deleteCommandBoxForSynchronization(CommandBox commandBox) { public final void deleteCommandBoxForSynchronization(CommandBox commandBox) {
setComputeEstimatedTimeState(false);
if (commandBox.isSelected()) { if (commandBox.isSelected()) {
selectedCommandBox = null; selectedCommandBox = null;
} }
...@@ -1509,6 +1534,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1509,6 +1534,7 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
commandZonePeer.delete(commandBox.getCommandBoxPeer()); commandZonePeer.delete(commandBox.getCommandBoxPeer());
commandBoxes.remove(commandBox); commandBoxes.remove(commandBox);
refreshZone(); refreshZone();
setComputeEstimatedTimeState(true);
} }
public void printDebug(String prefix) { public void printDebug(String prefix) {
...@@ -1522,6 +1548,11 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone { ...@@ -1522,6 +1548,11 @@ public abstract class ModifiableCommandZone extends AbstractCommandZone {
return dropState; return dropState;
} }
@Override
public void setComputeEstimatedTimeState(boolean state) {
}
protected abstract CommandZoneIteratorWrapper getCommandZoneIterator(); protected abstract CommandZoneIteratorWrapper getCommandZoneIterator();
public abstract void setInParent(ServerAtomicCommandBox commandBox); public abstract void setInParent(ServerAtomicCommandBox commandBox);
protected abstract void setConstructionState(CommandBox commandBox); protected abstract void setConstructionState(CommandBox commandBox);
......
...@@ -553,6 +553,10 @@ public class ServerCommandZone extends CommandZone implements ServerCommandState ...@@ -553,6 +553,10 @@ public class ServerCommandZone extends CommandZone implements ServerCommandState
} }
} }
public void setComputeEstimatedTimeState(boolean state) {
CommandZoneWrapper.getInstance(serverId).setComputeEstimatedTimeState( state);
}
/** /**
* Implements the ServerProgressChangedListener. * Implements the ServerProgressChangedListener.
......
...@@ -153,7 +153,7 @@ public class CommandBox { ...@@ -153,7 +153,7 @@ public class CommandBox {
LOGGER.log(Level.SEVERE, Nomad.getDateAndTime() + " -- SelectionTreeData is null for : " + this); LOGGER.log(Level.SEVERE, Nomad.getDateAndTime() + " -- SelectionTreeData is null for : " + this);
} }
if (isSettings) { if (isSettings) {
settingsHelper = new SettingsHelper(this); settingsHelper = new SettingsHelper(this, commandZone);
((ISettingsCommandBoxPeer)commandBoxPeer).setSettingsHelper(settingsHelper); ((ISettingsCommandBoxPeer)commandBoxPeer).setSettingsHelper(settingsHelper);
((ISettingsCommandBoxPeer)commandBoxPeer).loadSettingsFiles(); ((ISettingsCommandBoxPeer)commandBoxPeer).loadSettingsFiles();
} }
......
...@@ -432,6 +432,7 @@ public class ForLoopCommandBox extends ContainerCommandBox { ...@@ -432,6 +432,7 @@ public class ForLoopCommandBox extends ContainerCommandBox {
* @param mainScanIsEditable * @param mainScanIsEditable
*/ */
public void loadContents(CommandBox parent, ForLoopDescriptor descriptor, boolean mainScanIsEditable) { public void loadContents(CommandBox parent, ForLoopDescriptor descriptor, boolean mainScanIsEditable) {
commandZone.setComputeEstimatedTimeState(false);
Set<ForLoopRangeDescriptor> rangeDescriptors = descriptor.getRangeDescriptors(); Set<ForLoopRangeDescriptor> rangeDescriptors = descriptor.getRangeDescriptors();
Iterator<ForLoopRangeDescriptor> it = rangeDescriptors.iterator(); Iterator<ForLoopRangeDescriptor> it = rangeDescriptors.iterator();
...@@ -446,6 +447,7 @@ public class ForLoopCommandBox extends ContainerCommandBox { ...@@ -446,6 +447,7 @@ public class ForLoopCommandBox extends ContainerCommandBox {
refreshForLoopProperties(); refreshForLoopProperties();
forLoopCommandZone.loadScanOrForLoopContent(parent, descriptor, mainScanIsEditable); forLoopCommandZone.loadScanOrForLoopContent(parent, descriptor, mainScanIsEditable);
commandZone.setComputeEstimatedTimeState(true);
} }
/** /**
...@@ -579,6 +581,8 @@ public class ForLoopCommandBox extends ContainerCommandBox { ...@@ -579,6 +581,8 @@ public class ForLoopCommandBox extends ContainerCommandBox {
* @param index * @param index
*/ */
private void createLineFrom(ForLoopLine sourceForLoopLine, int index) { private void createLineFrom(ForLoopLine sourceForLoopLine, int index) {
commandZone.setComputeEstimatedTimeState(false);
ForLoopLine forLoopLine = createForLoopLine(index); ForLoopLine forLoopLine = createForLoopLine(index);
forLoopLine.setForLoopLineType(sourceForLoopLine.getForLoopLineType()); forLoopLine.setForLoopLineType(sourceForLoopLine.getForLoopLineType());
...@@ -605,6 +609,7 @@ public class ForLoopCommandBox extends ContainerCommandBox { ...@@ -605,6 +609,7 @@ public class ForLoopCommandBox extends ContainerCommandBox {
forLoopLine.setValues(sourceForLoopLine.getValues()); forLoopLine.setValues(sourceForLoopLine.getValues());
break; break;
} }
commandZone.setComputeEstimatedTimeState(true);
} }
...@@ -614,6 +619,7 @@ public class ForLoopCommandBox extends ContainerCommandBox { ...@@ -614,6 +619,7 @@ public class ForLoopCommandBox extends ContainerCommandBox {
* @param index * @param index
*/ */
private void createLineFrom(SourceForLoopLineInfo sourceForLoopLineInfo, int index) { private void createLineFrom(SourceForLoopLineInfo sourceForLoopLineInfo, int index) {
commandZone.setComputeEstimatedTimeState(false);
ForLoopLine forLoopLine = createForLoopLine(index); ForLoopLine forLoopLine = createForLoopLine(index);
forLoopLine.setVariableName(sourceForLoopLineInfo.getVariableName()); forLoopLine.setVariableName(sourceForLoopLineInfo.getVariableName());
forLoopLine.setForLoopLineType(sourceForLoopLineInfo.getForLoopLineType()); forLoopLine.setForLoopLineType(sourceForLoopLineInfo.getForLoopLineType());
...@@ -636,6 +642,7 @@ public class ForLoopCommandBox extends ContainerCommandBox { ...@@ -636,6 +642,7 @@ public class ForLoopCommandBox extends ContainerCommandBox {
forLoopLine.setValues(sourceForLoopLineInfo.getValues()); forLoopLine.setValues(sourceForLoopLineInfo.getValues());
break; break;
} }
commandZone.setComputeEstimatedTimeState(true);
} }
......
...@@ -469,4 +469,12 @@ public class ScanCommandZone extends AbstractCommandZone { ...@@ -469,4 +469,12 @@ public class ScanCommandZone extends AbstractCommandZone {
public void addCommandBox(CommandBox commandBox) { public void addCommandBox(CommandBox commandBox) {
commandBoxes.add(commandBox); commandBoxes.add(commandBox);
} }
@Override
public void setComputeEstimatedTimeState(boolean state) {
// TODO Auto-generated method stub
}
} }
\ No newline at end of file
...@@ -156,6 +156,7 @@ public class ServerForLoopCommandBox extends ForLoopCommandBox implements IServe ...@@ -156,6 +156,7 @@ public class ServerForLoopCommandBox extends ForLoopCommandBox implements IServe
* This method is called only from initiliaseServerScan, that means just to reflect NomadServer's command zone content in the starting client * This method is called only from initiliaseServerScan, that means just to reflect NomadServer's command zone content in the starting client
*/ */
private void initialiseRanges() { private void initialiseRanges() {
commandZone.setComputeEstimatedTimeState(false);
for (int i = 0; i < serverCommandWrapper.getNumberOfLines(); i++) { for (int i = 0; i < serverCommandWrapper.getNumberOfLines(); i++) {
ForLoopLine forLoopLine = createForLoopLine(i, true); ForLoopLine forLoopLine = createForLoopLine(i, true);
if (serverCommandWrapper.getForLoopType(i) == LoopType.RANGE) { if (serverCommandWrapper.getForLoopType(i) == LoopType.RANGE) {
...@@ -174,6 +175,7 @@ public class ServerForLoopCommandBox extends ForLoopCommandBox implements IServe ...@@ -174,6 +175,7 @@ public class ServerForLoopCommandBox extends ForLoopCommandBox implements IServe
variableNames.add(forLoopLine.getVariableName()); variableNames.add(forLoopLine.getVariableName());
forLoopLine.getForLoopLinePeer().refresh(); forLoopLine.getForLoopLinePeer().refresh();
} }
commandZone.setComputeEstimatedTimeState(true);
} }
/** /**
......
...@@ -24,6 +24,7 @@ import java.util.Map.Entry; ...@@ -24,6 +24,7 @@ import java.util.Map.Entry;
import java.util.logging.Logger; import java.util.logging.Logger;
import fr.ill.ics.client.control.MainWindow; import fr.ill.ics.client.control.MainWindow;
import fr.ill.ics.client.control.command.AbstractCommandZone;
import fr.ill.ics.client.control.command.CommandWindow; import fr.ill.ics.client.control.command.CommandWindow;
import fr.ill.ics.client.control.plugin.ControllerPlugin; import fr.ill.ics.client.control.plugin.ControllerPlugin;
import fr.ill.ics.client.control.plugin.selection.SelectionPlugin; import fr.ill.ics.client.control.plugin.selection.SelectionPlugin;
...@@ -45,6 +46,7 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange ...@@ -45,6 +46,7 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange
protected static final Logger LOGGER = Logger.getLogger(SettingsHelper.class.getName()); protected static final Logger LOGGER = Logger.getLogger(SettingsHelper.class.getName());
private CommandBox commandBox; private CommandBox commandBox;
protected AbstractCommandZone commandZone;
private String settingsFileName = ""; // current selected settings file private String settingsFileName = ""; // current selected settings file
private SettingsControllerSetupPlugin settingsSetupPlugin; private SettingsControllerSetupPlugin settingsSetupPlugin;
...@@ -57,8 +59,9 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange ...@@ -57,8 +59,9 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange
* *
* @param commandBox * @param commandBox
*/ */
public SettingsHelper(CommandBox commandBox) { public SettingsHelper(CommandBox commandBox, AbstractCommandZone commandZone) {
this.commandBox = commandBox; this.commandBox = commandBox;
this.commandZone = commandZone;
CommandZoneFileSync.getInstance().addNewSettingsFileListener(this); CommandZoneFileSync.getInstance().addNewSettingsFileListener(this);
} }
...@@ -105,7 +108,9 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange ...@@ -105,7 +108,9 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange
* @return TODO * @return TODO
*/ */
public boolean load(String directory, String fileName) { public boolean load(String directory, String fileName) {
commandZone.setComputeEstimatedTimeState(false);
boolean fileLoaded = false; boolean fileLoaded = false;
if (!fileName.trim().equals("")) { if (!fileName.trim().equals("")) {
...@@ -162,6 +167,9 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange ...@@ -162,6 +167,9 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange
} }
} }
} }
commandZone.setComputeEstimatedTimeState(true);
return fileLoaded; return fileLoaded;
} }
...@@ -192,6 +200,8 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange ...@@ -192,6 +200,8 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange
*/ */
public void setSettingsFileName(String settingsFileName) { public void setSettingsFileName(String settingsFileName) {
commandZone.setComputeEstimatedTimeState(false);
if (!propertiesInitialised) { if (!propertiesInitialised) {
initProperties(); initProperties();
} }
...@@ -221,6 +231,8 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange ...@@ -221,6 +231,8 @@ public class SettingsHelper implements INewSettingsFileListener, IPropertyChange
if (fileNameProperty != null) { if (fileNameProperty != null) {
fileNameProperty.setValue(settingsFileName); fileNameProperty.setValue(settingsFileName);
} }