use of org.csstudio.display.builder.model.properties.OpenDisplayActionInfo in project org.csstudio.display.builder by kasemir.
the class StandaloneAction method run.
@Override
public void run() {
final DisplayModel parent_model = view.getDisplayModel();
final DisplayInfo info = view.getDisplayInfo();
ActionUtil.handleAction(parent_model, new OpenDisplayActionInfo(Messages.OpenStandalone, info.getPath(), info.getMacros(), OpenDisplayActionInfo.Target.STANDALONE));
}
use of org.csstudio.display.builder.model.properties.OpenDisplayActionInfo in project org.csstudio.display.builder by kasemir.
the class ScriptUtil method openDisplay.
// ====================
// open/close displays
/**
* Open a new display
*
* @param widget Widget in 'current' display, used to resolve relative paths
* @param file Path to the display
* @param target Where to show the display: "REPLACE", "TAB", "WINDOW", "STANDALONE"
* @param macros Macros, may be <code>null</code>
*/
public static void openDisplay(final Widget widget, final String file, final String target, final Map<String, String> macros) {
OpenDisplayActionInfo.Target the_target;
try {
the_target = OpenDisplayActionInfo.Target.valueOf(target);
} catch (Throwable ex) {
the_target = OpenDisplayActionInfo.Target.TAB;
}
final Macros the_macros;
if (macros == null || macros.isEmpty())
the_macros = null;
else {
the_macros = new Macros();
for (String name : macros.keySet()) the_macros.add(name, macros.get(name));
}
final OpenDisplayActionInfo open = new OpenDisplayActionInfo("Open from script", file, the_macros, the_target);
ActionUtil.handleAction(widget, open);
}
Aggregations