use of org.yamcs.studio.commanding.queue.QueuesTableModel.RowCommandQueueInfo in project yamcs-studio by yamcs.
the class CommandQueuesTableViewer method updateCommandQueueState.
private void updateCommandQueueState(CommandQueue commandQueue, QueueState newState) {
/* only set new value if it differs from old one */
if (!commandQueue.getState().equals(newState)) {
commandQueue.setState(newState);
CommandQueueInfo q = null;
for (RowCommandQueueInfo rcqi : commandQueueView.currentQueuesModel.queues) {
if (rcqi.cq == commandQueue)
q = rcqi.commandQueueInfo;
}
// CommandQueueInfo q = queues.get(row);
if (newState == QueueState.BLOCKED) {
blockQueue(q);
} else if (newState == QueueState.DISABLED) {
disableQueue(q);
} else if (newState == QueueState.ENABLED) {
enableQueue(q);
}
}
}
Aggregations