use of org.csstudio.trends.databrowser3.propsheet.ChangeTimerangeCommand in project org.csstudio.display.builder by kasemir.
the class StartEndTimeAction method run.
/**
* Change start/end time
* @param model Model to change
* @param operations_manager Undo/Redo operations manager
* @param start_time Desired start time specification
* @param end_time .. end time
* @throws Exception on error in start/end time
*/
public static void run(final Model model, final UndoableActionManager operations_manager, final String start_time, final String end_time) throws Exception {
// Parsing somewhat redundant, but gives exception 'right away' for better error display
final StartEndTimeParser parser = new StartEndTimeParser(start_time, end_time);
new ChangeTimerangeCommand(model, operations_manager, parser.isEndNow(), start_time, end_time);
}
use of org.csstudio.trends.databrowser3.propsheet.ChangeTimerangeCommand in project org.csstudio.display.builder by kasemir.
the class StartEndTimeAction method run.
/**
* Prompt user for new start/end time
* @param shell Parent shell
* @param model Model to change
* @param operations_manager Undo/Redo operations manager
*/
public static void run(final Shell shell, final Model model, final UndoableActionManager operations_manager) {
final String start_time = model.getStartSpecification();
final String end_time = model.getEndSpecification();
final StartEndDialog dlg = new StartEndDialog(shell, start_time, end_time);
if (dlg.open() != Window.OK)
return;
new ChangeTimerangeCommand(model, operations_manager, dlg.isEndNow(), dlg.getStartSpecification(), dlg.getEndSpecification());
}
Aggregations