...
 
Commits (3)
......@@ -27,6 +27,7 @@ import fr.ill.ics.bridge.listeners.ServerExpressionChangeListener;
import fr.ill.ics.bridge.listeners.ServerProgressChangeListener;
import fr.ill.ics.bridge.listeners.ServerPropertyChangeListener;
import fr.ill.ics.bridge.listeners.ServerResetCommandListener;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ForLoopType;
import fr.ill.ics.nscclient.command.ServerCommandBox;
import fr.ill.ics.nscclient.notification.commandzone.CommandZoneEventClient;
import fr.ill.ics.nscclient.notification.commandzone.sync.CommandZoneSyncEventClient;
......@@ -81,7 +82,7 @@ public abstract class CommandWrapper implements IServerCommand, ICommandBoxEvent
this.resetCommandListener = null;
}
public void removeServerCommandBoxSyncListener() {
public void removeServerCommandBoxSyncListener(ServerCommandBoxSyncListener listener) {
this.commandBoxSyncListener = null;
}
......@@ -208,4 +209,69 @@ public abstract class CommandWrapper implements IServerCommand, ICommandBoxEvent
commandBoxSyncListener.onToggleBackground();
}
@Override
public void onSetSettingsFileName(String fileName) {
commandBoxSyncListener.onSetSettingsFileName(fileName);
}
@Override
public void onSetControllerName(String value) {
commandBoxSyncListener.onSetControllerName(value);
}
@Override
public void onSetPropertyName(String value) {
commandBoxSyncListener.onSetPropertyName(value);
}
@Override
public void onSetValue(String value) {
commandBoxSyncListener.onSetValue(value);
}
@Override
public void onSetExpression(String value) {
commandBoxSyncListener.onSetExpression(value);
}
@Override
public void onSetForLoopType(ForLoopType type) {
commandBoxSyncListener.onSetForLoopType(type);
}
@Override
public void onSetForLoopValues(int lineIndex, String value) {
commandBoxSyncListener.onSetForLoopValues(lineIndex, value);
}
@Override
public void onSetForLoopVariableName(int lineIndex, String value) {
commandBoxSyncListener.onSetForLoopVariableName(lineIndex, value);
}
@Override
public void onSetForLoopStartValue(int lineIndex, double value) {
commandBoxSyncListener.onSetForLoopStartValue(lineIndex, value);
}
@Override
public void onSetForLoopEndValue(int lineIndex, double value) {
commandBoxSyncListener.onSetForLoopEndValue(lineIndex, value);
}
@Override
public void onSetForLoopStepSize(int lineIndex, double value) {
commandBoxSyncListener.onSetForLoopStepSize(lineIndex, value);
}
@Override
public void onAddForLoopLine(int lineIndex) {
commandBoxSyncListener.onAddForLoopLine(lineIndex);
}
@Override
public void onRemoveForLoopLine(int lineIndex) {
commandBoxSyncListener.onRemoveForLoopLine(lineIndex);
}
}
\ No newline at end of file
......@@ -26,15 +26,18 @@ import fr.ill.ics.bridge.events.ServerCommandStateChangeEvent.CommandState;
import fr.ill.ics.bridge.events.ServerResetCommandEvent;
import fr.ill.ics.bridge.listeners.ServerCommandStateChangeListener;
import fr.ill.ics.bridge.listeners.ServerCommandZoneErrorListener;
import fr.ill.ics.bridge.listeners.ServerCommandZoneSyncListener;
import fr.ill.ics.bridge.listeners.ServerProgressChangeListener;
import fr.ill.ics.bridge.listeners.ServerResetCommandListener;
import fr.ill.ics.nscclient.command.CommandZoneAccessor;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
import fr.ill.ics.nscclient.command.ServerCommandZone;
import fr.ill.ics.nscclient.dataprovider.CommandDatabase;
import fr.ill.ics.nscclient.dataprovider.ServantDatabase;
import fr.ill.ics.nscclient.notification.commandzone.CommandZoneEventClient;
import fr.ill.ics.nscclient.notification.commandzone.sync.CommandZoneSyncEventClient;
public class CommandZoneWrapper implements ICommandZoneEventListener {
public class CommandZoneWrapper implements ICommandZoneEventListener, ICommandZoneSyncEventListener {
public final static String SERVER_ID = "real";
public final static String EDITOR_ID = "editor";
......@@ -49,32 +52,20 @@ public class CommandZoneWrapper implements ICommandZoneEventListener {
private ServerProgressChangeListener commandProgressListener;
private ServerResetCommandListener resetCommandListener;
private ServerCommandZoneErrorListener commandZoneErrorListener;
private ServerCommandZoneSyncListener commandZoneSyncListener;
// private static Map<Integer, CommandZoneWrapper> commandZoneWrappers = new HashMap<Integer, CommandZoneWrapper>();
public CommandZoneWrapper(String serverId, int commandZoneId) {
public CommandZoneWrapper(String serverId) {
this.serverId = serverId;
serverCommandZone = new ServerCommandZone(serverId, commandZoneId);
serverCommandZone = new ServerCommandZone(serverId, 0);
}
public static CommandZoneWrapper getInstance(String serverId) {
if (!instances.containsKey(serverId)) {
CommandZoneWrapper instance = new CommandZoneWrapper(serverId, 0);
CommandZoneWrapper instance = new CommandZoneWrapper(serverId);
instances.put(serverId, instance);
}
return instances.get(serverId);
}
/*
public static CommandZoneWrapper getInstance(int id) {
return commandZoneWrappers.get(id);
}
public static void initInstance(int id) {
CommandZoneWrapper wrapper = new CommandZoneWrapper(id);
commandZoneWrappers.put(id, wrapper);
}
*/
public void release() {
// do nothing for new server
......@@ -104,6 +95,11 @@ public class CommandZoneWrapper implements ICommandZoneEventListener {
public void addServerCommandZoneErrorListener(ServerCommandZoneErrorListener listener) {
this.commandZoneErrorListener = listener;
}
public void addServerCommandZoneSyncListener(ServerCommandZoneSyncListener listener) {
this.commandZoneSyncListener = listener;
CommandZoneSyncEventClient.getInstance().addCommandZoneListener(this);
}
public void removeServerProgressChangeListener(ServerProgressChangeListener listener) {
this.commandProgressListener = null;
......@@ -121,6 +117,11 @@ public class CommandZoneWrapper implements ICommandZoneEventListener {
public void removeServerCommandZoneErrorListener(ServerCommandZoneErrorListener listener) {
this.commandZoneErrorListener = null;
}
public void removeServerCommandZoneSyncListener(ServerCommandZoneSyncListener listener) {
this.commandZoneSyncListener = null;
CommandZoneSyncEventClient.getInstance().removeCommandZoneListener(this);
}
public void commandZoneStarted() {
if (commandStateListener != null) {
......@@ -294,4 +295,69 @@ public class CommandZoneWrapper implements ICommandZoneEventListener {
return serverCommandZone.print();
}
@Override
public void onAddNewAtomicCommandBoxAtEnd(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int newCommandBoxId) {
commandZoneSyncListener.onAddNewAtomicCommandBoxAtEnd(type, commandBoxId, commandId, isSettings, newCommandBoxId);
}
@Override
public void onAddNewAtomicCommandBox(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
commandZoneSyncListener.onAddNewAtomicCommandBox(type, commandBoxId, commandId, isSettings, commandBoxIdToMove, above, newCommandBoxId);
}
@Override
public void onAddNewControlCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId) {
commandZoneSyncListener.onAddNewControlCommandBoxAtEnd(type, commandBoxId, boxType, newCommandBoxId);
}
@Override
public void onAddNewControlCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
commandZoneSyncListener.onAddNewControlCommandBox(type, commandBoxId, boxType, commandBoxIdToMove, above, newCommandBoxId);
}
@Override
public void onAddNewForLoopCommandBoxAtEnd(ContainerType type, int commandBoxId, String variableName, int newCommandBoxId) {
commandZoneSyncListener.onAddNewForLoopCommandBoxAtEnd(type, commandBoxId, variableName, newCommandBoxId);
}
@Override
public void onAddNewForLoopCommandBox(ContainerType type, int commandBoxId, String variableName, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
commandZoneSyncListener.onAddNewForLoopCommandBox(type, commandBoxId, variableName, commandBoxIdToMove, above, newCommandBoxId);
}
@Override
public void onAddNewGenericCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId) {
commandZoneSyncListener.onAddNewGenericCommandBoxAtEnd(type, commandBoxId, boxType, newCommandBoxId);
}
@Override
public void onAddNewGenericCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
commandZoneSyncListener.onAddNewGenericCommandBox(type, commandBoxId, boxType, commandBoxIdToMove, above, newCommandBoxId);
}
@Override
public void onAddNewScanCommandBox(ContainerType type, int commandBoxId, String scanName, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
commandZoneSyncListener.onAddNewScanCommandBox(type, commandBoxId, scanName, commandBoxIdToMove, above, newCommandBoxId);
}
@Override
public void onAddNewScanCommandBoxAtEnd(ContainerType type, int commandBoxId, String scanName, int newCommandBoxId) {
commandZoneSyncListener.onAddNewScanCommandBoxAtEnd(type, commandBoxId, scanName, newCommandBoxId);
}
@Override
public void onMoveCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToMove, int commandBoxIdToShift, boolean above) {
commandZoneSyncListener.onMoveCommandBox(type, commandBoxId, commandBoxIdToMove, commandBoxIdToShift, above);
}
@Override
public void onMoveCommandBoxToEnd(ContainerType type, int commandBoxId, int commandBoxIdToMove) {
commandZoneSyncListener.onMoveCommandBoxToEnd(type, commandBoxId, commandBoxIdToMove);
}
@Override
public void onDeleteCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToDelete) {
commandZoneSyncListener.deleteCommandBox(type, commandBoxId, commandBoxIdToDelete);
}
}
\ No newline at end of file
......@@ -18,10 +18,28 @@
package fr.ill.ics.bridge.command;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ForLoopType;
public interface ICommandBoxSyncEventListener {
int getCommandBoxID();
void onToggleParallel();
void onToggleBackground();
void onSetSettingsFileName(String fileName);
void onSetControllerName(String value);
void onSetPropertyName(String value);
void onSetValue(String value);
void onSetExpression(String value);
void onSetForLoopType(ForLoopType type);
void onSetForLoopValues(int lineIndex, String value);
void onSetForLoopVariableName(int lineIndex, String value);
void onSetForLoopStartValue(int lineIndex, double value);
void onSetForLoopEndValue(int lineIndex, double value);
void onSetForLoopStepSize(int lineIndex, double value);
void onAddForLoopLine(int lineIndex);
void onRemoveForLoopLine(int lineIndex);
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.bridge.command;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public interface ICommandZoneSyncEventListener {
public void onAddNewAtomicCommandBoxAtEnd(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int newCommandBoxId);
public void onAddNewAtomicCommandBox(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewControlCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId);
public void onAddNewControlCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewForLoopCommandBoxAtEnd(ContainerType type, int commandBoxId, String variableName, int newCommandBoxId);
public void onAddNewForLoopCommandBox(ContainerType type, int commandBoxId, String variableName, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewGenericCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId);
public void onAddNewGenericCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewScanCommandBox(ContainerType type, int commandBoxId, String scanName, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewScanCommandBoxAtEnd(ContainerType type, int commandBoxId, String scanName, int newCommandBoxId);
public void onMoveCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToMove, int commandBoxIdToShift, boolean above);
public void onMoveCommandBoxToEnd(ContainerType type, int commandBoxId, int commandBoxIdToMove);
public void onDeleteCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToDelete);
}
\ No newline at end of file
......@@ -18,8 +18,23 @@
package fr.ill.ics.bridge.listeners;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ForLoopType;
public interface ServerCommandBoxSyncListener {
void onToggleParallel();
void onToggleBackground();
void onSetSettingsFileName(String fileName);
void onSetControllerName(String value);
void onSetPropertyName(String value);
void onSetValue(String value);
void onSetExpression(String value);
void onSetForLoopType(ForLoopType type);
void onSetForLoopValues(int lineIndex, String value);
void onSetForLoopVariableName(int lineIndex, String value);
void onSetForLoopStartValue(int lineIndex, double value);
void onSetForLoopEndValue(int lineIndex, double value);
void onSetForLoopStepSize(int lineIndex, double value);
void onAddForLoopLine(int lineIndex);
void onRemoveForLoopLine(int lineIndex);
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.bridge.listeners;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public interface ServerCommandZoneSyncListener {
public void onAddNewAtomicCommandBoxAtEnd(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int newCommandBoxId);
public void onAddNewAtomicCommandBox(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewControlCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId);
public void onAddNewControlCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewForLoopCommandBoxAtEnd(ContainerType type, int commandBoxId, String variableName, int newCommandBoxId);
public void onAddNewForLoopCommandBox(ContainerType type, int commandBoxId, String variableName, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewGenericCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId);
public void onAddNewGenericCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewScanCommandBox(ContainerType type, int commandBoxId, String scanName, int commandBoxIdToMove, boolean above, int newCommandBoxId);
public void onAddNewScanCommandBoxAtEnd(ContainerType type, int commandBoxId, String scanName, int newCommandBoxId);
public void onMoveCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToMove, int commandBoxIdToShift, boolean above);
public void onMoveCommandBoxToEnd(ContainerType type, int commandBoxId, int commandBoxIdToMove);
public void deleteCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToMove);
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class AddForLoopLine extends CommandBoxSyncEvent {
private int lineIndex;
public AddForLoopLine(int commandBoxId, int lineIndex) {
super(commandBoxId);
this.lineIndex = lineIndex;
}
public int getLineIndex() {
return lineIndex;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewAtomicCommandBox extends CommandZoneSyncEvent {
private int commandId;
private boolean isSettings;
private int commandBoxIdToMove;
private boolean above;
private int newCommandBoxId;
public AddNewAtomicCommandBox(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
super(type, commandBoxId);
this.commandId = commandId;
this.isSettings = isSettings;
this.commandBoxIdToMove = commandBoxIdToMove;
this.above = above;
this.newCommandBoxId = newCommandBoxId;
}
public int getCommandId() {
return commandId;
}
public boolean isSettings() {
return isSettings;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
public boolean isAbove() {
return above;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewAtomicCommandBoxAtEnd extends CommandZoneSyncEvent {
private int commandId;
private boolean isSettings;
private int newCommandBoxId;
public AddNewAtomicCommandBoxAtEnd(ContainerType type, int commandBoxId, int commandId, boolean isSettings, int newCommandBoxId) {
super(type, commandBoxId);
this.commandId = commandId;
this.isSettings = isSettings;
this.newCommandBoxId = newCommandBoxId;
}
public int getCommandId() {
return commandId;
}
public boolean isSettings() {
return isSettings;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewControlCommandBox extends CommandZoneSyncEvent {
private int boxType;
private int commandBoxIdToMove;
private boolean above;
private int newCommandBoxId;
public AddNewControlCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
super(type, commandBoxId);
this.boxType = boxType;
this.commandBoxIdToMove = commandBoxIdToMove;
this.above = above;
this.newCommandBoxId = newCommandBoxId;
}
public int getBoxType() {
return boxType;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
public boolean isAbove() {
return above;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewControlCommandBoxAtEnd extends CommandZoneSyncEvent {
private int boxType;
private int newCommandBoxId;
public AddNewControlCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId) {
super(type, commandBoxId);
this.boxType = boxType;
this.newCommandBoxId = newCommandBoxId;
}
public int getBoxType() {
return boxType;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewForLoopCommandBox extends CommandZoneSyncEvent {
private String variableName;
private int commandBoxIdToMove;
private boolean above;
private int newCommandBoxId;
public AddNewForLoopCommandBox(ContainerType type, int commandBoxId, String variableName, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
super(type, commandBoxId);
this.variableName = variableName;
this.commandBoxIdToMove = commandBoxIdToMove;
this.above = above;
this.newCommandBoxId = newCommandBoxId;
}
public String getVariableName() {
return variableName;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
public boolean isAbove() {
return above;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewForLoopCommandBoxAtEnd extends CommandZoneSyncEvent {
private String variableName;
private int newCommandBoxId;
public AddNewForLoopCommandBoxAtEnd(ContainerType type, int commandBoxId, String variableName, int newCommandBoxId) {
super(type, commandBoxId);
this.variableName = variableName;
this.newCommandBoxId = newCommandBoxId;
}
public String getVariableName() {
return variableName;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewGenericCommandBox extends CommandZoneSyncEvent {
private int boxType;
private int commandBoxIdToMove;
private boolean above;
private int newCommandBoxId;
public AddNewGenericCommandBox(ContainerType type, int commandBoxId, int boxType, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
super(type, commandBoxId);
this.boxType = boxType;
this.commandBoxIdToMove = commandBoxIdToMove;
this.above = above;
this.newCommandBoxId = newCommandBoxId;
}
public int getBoxType() {
return boxType;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
public boolean isAbove() {
return above;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewGenericCommandBoxAtEnd extends CommandZoneSyncEvent {
private int boxType;
private int newCommandBoxId;
public AddNewGenericCommandBoxAtEnd(ContainerType type, int commandBoxId, int boxType, int newCommandBoxId) {
super(type, commandBoxId);
this.boxType = boxType;
this.newCommandBoxId = newCommandBoxId;
}
public int getBoxType() {
return boxType;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewScanCommandBox extends CommandZoneSyncEvent {
private String scanName;
private int commandBoxIdToMove;
private boolean above;
private int newCommandBoxId;
public AddNewScanCommandBox(ContainerType type, int commandBoxId, String scanName, int commandBoxIdToMove, boolean above, int newCommandBoxId) {
super(type, commandBoxId);
this.scanName = scanName;
this.commandBoxIdToMove = commandBoxIdToMove;
this.above = above;
this.newCommandBoxId = newCommandBoxId;
}
public String getScanName() {
return scanName;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
public boolean isAbove() {
return above;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class AddNewScanCommandBoxAtEnd extends CommandZoneSyncEvent {
private String scanName;
private int newCommandBoxId;
public AddNewScanCommandBoxAtEnd(ContainerType type, int commandBoxId, String scanName, int newCommandBoxId) {
super(type, commandBoxId);
this.scanName = scanName;
this.newCommandBoxId = newCommandBoxId;
}
public String getScanName() {
return scanName;
}
public int getNewCommandBoxId() {
return newCommandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class CommandZoneSyncEvent implements ICommandZoneSyncEvent {
private ContainerType type;
private int commandBoxId;
public CommandZoneSyncEvent(ContainerType type, int commandBoxId) {
this.commandBoxId = commandBoxId;
this.type = type;
}
public ContainerType getType() {
return type;
}
public int getCommandBoxId() {
return commandBoxId;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class DeleteCommandBox extends CommandZoneSyncEvent {
private int commandBoxIdToDelete;
public DeleteCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToDelete) {
super(type, commandBoxId);
this.commandBoxIdToDelete = commandBoxIdToDelete;
}
public int getCommandBoxIdToDelete() {
return commandBoxIdToDelete;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class MoveCommandBox extends CommandZoneSyncEvent {
private int commandBoxIdToMove;
private int commandBoxIdToShift;
private boolean above;
public MoveCommandBox(ContainerType type, int commandBoxId, int commandBoxIdToMove, int commandBoxIdToShift, boolean above) {
super(type, commandBoxId);
this.commandBoxIdToMove = commandBoxIdToMove;
this.commandBoxIdToShift = commandBoxIdToShift;
this.above = above;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
public int getCommandBoxIdToShift() {
return commandBoxIdToShift;
}
public boolean isAbove() {
return above;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ContainerType;
public class MoveCommandBoxToEnd extends CommandZoneSyncEvent {
private int commandBoxIdToMove;
public MoveCommandBoxToEnd(ContainerType type, int commandBoxId, int commandBoxIdToMove) {
super(type, commandBoxId);
this.commandBoxIdToMove = commandBoxIdToMove;
}
public int getCommandBoxIdToMove() {
return commandBoxIdToMove;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class RemoveForLoopLine extends CommandBoxSyncEvent {
private int lineIndex;
public RemoveForLoopLine(int commandBoxId, int lineIndex) {
super(commandBoxId);
this.lineIndex = lineIndex;
}
public int getLineIndex() {
return lineIndex;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetControllerName extends CommandBoxSyncEvent {
private String value;
public SetControllerName(int commandBoxId, String value) {
super(commandBoxId);
this.value = value;
}
public String getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetExpression extends CommandBoxSyncEvent {
private String value;
public SetExpression(int commandBoxId, String value) {
super(commandBoxId);
this.value = value;
}
public String getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetForLoopEndValue extends CommandBoxSyncEvent {
private int lineIndex;
private double value;
public SetForLoopEndValue(int commandBoxId, int lineIndex, double value) {
super(commandBoxId);
this.lineIndex = lineIndex;
this.value = value;
}
public int getLineIndex() {
return lineIndex;
}
public double getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetForLoopStartValue extends CommandBoxSyncEvent {
private int lineIndex;
private double value;
public SetForLoopStartValue(int commandBoxId, int lineIndex, double value) {
super(commandBoxId);
this.lineIndex = lineIndex;
this.value = value;
}
public int getLineIndex() {
return lineIndex;
}
public double getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetForLoopStepSize extends CommandBoxSyncEvent {
private int lineIndex;
private double value;
public SetForLoopStepSize(int commandBoxId, int lineIndex, double value) {
super(commandBoxId);
this.lineIndex = lineIndex;
this.value = value;
}
public int getLineIndex() {
return lineIndex;
}
public double getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
import fr.ill.ics.nscclient.command.CommandZoneAccessor.ForLoopType;
public class SetForLoopType extends CommandBoxSyncEvent {
private ForLoopType forLoopType;
public SetForLoopType(int commandBoxId, ForLoopType forLoopType) {
super(commandBoxId);
this.forLoopType = forLoopType;
}
public ForLoopType getForLoopType() {
return forLoopType;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetForLoopValues extends CommandBoxSyncEvent {
private int lineIndex;
private String value;
public SetForLoopValues(int commandBoxId, int lineIndex, String value) {
super(commandBoxId);
this.lineIndex = lineIndex;
this.value = value;
}
public int getLineIndex() {
return lineIndex;
}
public String getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetForLoopVariableName extends CommandBoxSyncEvent {
private int lineIndex;
private String value;
public SetForLoopVariableName(int commandBoxId, int lineIndex, String value) {
super(commandBoxId);
this.lineIndex = lineIndex;
this.value = value;
}
public int getLineIndex() {
return lineIndex;
}
public String getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetPropertyName extends CommandBoxSyncEvent {
private String value;
public SetPropertyName(int commandBoxId, String value) {
super(commandBoxId);
this.value = value;
}
public String getValue() {
return value;
}
}
\ No newline at end of file
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.nscclient.notification.commandzone.sync;
public class SetSettingsFileName extends CommandBoxSyncEvent {
private String fileName;
public SetSettingsFileName(int commandBoxId, String fileName) {
super(commandBoxId);
this.fileName = fileName;
}
public String getFileName() {
return fileName;
}
}
\ No newline at end of file